From 41ca7ae719f328851323b76ef90549ba55726602 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Tue, 30 Sep 2014 23:40:59 -0700 Subject: [PATCH 001/283] Update History.md --- History.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/History.md b/History.md index a585ed5ed1..1a0a69279f 100644 --- a/History.md +++ b/History.md @@ -7,9 +7,6 @@ * Allow more than one dash in package versions. #2715 -* Fix `meteor update` on an app built from a checkout version - of Meteor. - ## v0.9.3 From 9dd097257296affa5e409f6d2b85a778eea59efb Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 2 Oct 2014 16:14:27 -0700 Subject: [PATCH 002/283] Fix JSDoc template --- docs/client/data.js | 2 +- scripts/admin/jsdoc/docdata-jsdoc-template/publish.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/client/data.js b/docs/client/data.js index 43d2526f1e..51c63c9e68 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; -DocsData = {"Accounts":{"kind":"namespace","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","longname":"Accounts.ui","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Accounts.config","kind":"function","memberof":"Accounts","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Accounts.createUser","kind":"function","memberof":"Accounts","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","longname":"EJSON","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"longname":"EJSON.addType","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"EJSON.stringify","kind":"function","memberof":"EJSON","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"longname":"EJSON.parse","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"EJSON.equals","kind":"function","memberof":"EJSON","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"longname":"EJSON.clone","kind":"function","memberof":"EJSON","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","longname":"Meteor.users","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","longname":"Meteor.settings","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","longname":"Meteor.release","kind":"member","memberof":"Meteor","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","longname":"Meteor.userId","kind":"function","memberof":"Meteor","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","longname":"Meteor.user","kind":"function","memberof":"Meteor","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Meteor.logout","kind":"function","memberof":"Meteor","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","options":[],"locus":"Client"},"loginWith":{"memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"longname":"Meteor.subscribe","kind":"function","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"longname":"Meteor.call","kind":"function","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"longname":"Meteor.apply","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","longname":"Meteor.status","kind":"function","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","longname":"Meteor.reconnect","kind":"function","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","longname":"Meteor.disconnect","kind":"function","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","longname":"Meteor.onConnection","kind":"function","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"longname":"Meteor.publish","kind":"function","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","longname":"Meteor.methods","kind":"function","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"longname":"Meteor.wrapAsync","kind":"function","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"longname":"Meteor.startup","kind":"function","memberof":"Meteor","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"longname":"Meteor.setTimeout","kind":"function","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"longname":"Meteor.setInterval","kind":"function","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"longname":"Meteor.clearInterval","kind":"function","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"longname":"Meteor.clearTimeout","kind":"function","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"longname":"Meteor.Error","memberof":"Meteor","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","longname":"Mongo","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","memberof":"Mongo.Collection","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","memberof":"Mongo.Collection","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","memberof":"Mongo.Collection","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","memberof":"Mongo.Collection","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","memberof":"Mongo.Collection","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection","memberof":"Mongo","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"longname":"Mongo.ObjectID","memberof":"Mongo","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","longname":"Mongo.Cursor","memberof":"Mongo","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"longname":"Assets.getText","kind":"function","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"longname":"Assets.getBinary","kind":"function","options":[],"locus":"Server"}},"Package":{"summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Package.describe","kind":"function","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number, to follow the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with the _. For example,\n'1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers:\n'1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. You need to specify a version to publish to the package\nserver.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"longname":"Package.onUse","kind":"function","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"longname":"Package.onTest","kind":"function","options":[],"locus":"package.js"}},"Npm":{"kind":"namespace","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","longname":"Npm.depends","kind":"function","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","longname":"Npm.require","kind":"function","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","longname":"Cordova.depends","kind":"function","options":[],"locus":"package.js"}},"currentUser":{"summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"memberof":"Blaze.TemplateInstance","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"memberof":"Blaze.TemplateInstance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"memberof":"Blaze.TemplateInstance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"memberof":"Blaze.TemplateInstance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"longname":"Blaze.With","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"longname":"Blaze.If","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"longname":"Blaze.Unless","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"longname":"Blaze.Each","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"longname":"Blaze.render","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"longname":"Blaze.remove","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"longname":"Blaze.getData","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"longname":"Blaze.getView","kind":"function","memberof":"Blaze","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"longname":"Blaze.Template","memberof":"Blaze","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"longname":"Blaze.TemplateInstance","memberof":"Blaze","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"longname":"Blaze.View","memberof":"Blaze","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","memberof":"MethodInvocation","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","memberof":"MethodInvocation","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","memberof":"MethodInvocation","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","memberof":"Subscription","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","longname":"Template.body","kind":"member","memberof":"Template","locus":"Client"},"instance":{"kind":"function","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","longname":"Template.currentData","memberof":"Template","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"longname":"Template.parentData","memberof":"Template","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"longname":"Template.registerHelper","memberof":"Template","options":[],"locus":"Client"},"summary":"The class for defining templates","kind":"class","longname":"Template","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","longname":"Tracker.active","kind":"member","memberof":"Tracker","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","longname":"Tracker.flush","kind":"function","memberof":"Tracker","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"longname":"Tracker.autorun","kind":"function","memberof":"Tracker","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","longname":"Tracker.Dependency","memberof":"Tracker","options":[],"params":[],"instancename":"dependency"}},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"longname":"Template#helpers","kind":"function","memberof":"Template","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"longname":"Template#events","kind":"function","memberof":"Template","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"longname":"check","kind":"function","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"longname":"Match.test","kind":"function","memberof":"Match","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"MethodInvocation","kind":"function","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"longname":"DDP.connect","kind":"function","memberof":"DDP","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"memberof":"Subscription","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","memberof":"Subscription","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"longname":"Email.send","kind":"function","memberof":"Email","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"longname":"HTTP.call","kind":"function","memberof":"HTTP","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"longname":"HTTP.get","kind":"function","memberof":"HTTP","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"longname":"HTTP.post","kind":"function","memberof":"HTTP","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"longname":"HTTP.put","kind":"function","memberof":"HTTP","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"longname":"HTTP.del","kind":"function","memberof":"HTTP","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"longname":"Session.equals","options":[],"locus":"Client"}},"UI":{"dynamic":{"memberof":"UI","kind":"function","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"longname":"UI.dynamic","options":[],"istemplate":"true","locus":"Templates"}},"PackageAPI#use":{"memberof":"PackageAPI","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'.","params":[{"type":{"names":["String"]},"description":"

Specification of a release: track@version. Just 'version' (ex: "0.9.0") is sufficient if using the default release track

","name":"meteorRelease"}],"longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"longname":"ReactiveVar","options":[],"instancename":"reactiveVar","locus":"Client"},"PackageAPI":{"kind":"class","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number, to follow the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with the _. For example,\n'1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers:\n'1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. You need to specify a version to publish to the package\nserver.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"UI":{"dynamic":{"memberof":"UI","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"UI.dynamic","options":[],"istemplate":"true","locus":"Templates"}},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'.","params":[{"type":{"names":["String"]},"description":"

Specification of a release: track@version. Just 'version' (ex: "0.9.0") is sufficient if using the default release track

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js b/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js index 358f98d74a..cc23a48414 100644 --- a/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js +++ b/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js @@ -48,9 +48,7 @@ root.meta = undefined; root.___id = undefined; root.___s = undefined; - root.name = undefined; root.tags = undefined; - root.scope = undefined; _.extend(root, getTagDict(data)); names.push(location); From ded0601d0a4634f68ad56807342ce253a2f7a36a Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Mon, 6 Oct 2014 13:44:32 -0700 Subject: [PATCH 003/283] Minor clarifications to self-tests code --- tools/selftest.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index 3b87098a5d..86bc276648 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1435,7 +1435,10 @@ var runTests = function (options) { testState = { version: 1, lastPassedHashes: {} }; var currentHashes = {}; - // _.keys(skipCounts) is the set of tags to skip + // _.keys(skipCounts) is the set of tags to skip. + // skipCounts also holds counts of tests skipped for other reasons + // (like not matching the test regex) and is used for printing + // messages about how many tests were skipped. var skipCounts = {}; if (! files.inCheckout()) skipCounts['checkout'] = 0; @@ -1461,7 +1464,7 @@ var runTests = function (options) { tests = _.filter(tests, function (test) { return test.fileHash !== testState.lastPassedHashes[test.file]; }); - skipCounts.unchanged = lengthBeforeOnlyChanged - tests.length; + skipCounts['unchanged'] = lengthBeforeOnlyChanged - tests.length; } var failuresInFile = {}; @@ -1569,10 +1572,10 @@ var runTests = function (options) { if (totalRun > 0) process.stderr.write("\n"); - var totalSkipCount = 0; + var skippedSome = false; _.each(skipCounts, function (count, tag) { - totalSkipCount += count; if (count) { + skippedSome = true; process.stderr.write("Skipped " + count + " " + tag + " test" + (count > 1 ? "s" : "") + " (" + tagDescriptions[tag] + ")\n"); @@ -1584,7 +1587,7 @@ var runTests = function (options) { return 0; } else if (failureCount === 0) { var disclaimers = ''; - if (totalSkipCount > 0) + if (skippedSome) disclaimers += " other"; process.stderr.write("All" + disclaimers + " tests passed.\n"); return 0; From ceda65f24be058157b31bde8a7ac8d3ea0bc71fc Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Mon, 6 Oct 2014 17:20:39 -0700 Subject: [PATCH 004/283] Refactor selftest.runTests and create listTests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not extensively tested. Needs comments describing options to the new functions (e.g. getFilteredTests) and updated usage for `meteor self-test ––list`. Filtering and running tests now proceeds in stages - Add “pseudo-tags” like non-matching and unchanged - Remove tests whose tags are in a list of “tags to skip” - Run or list the resulting TestList - Optionally report skipped tests - Optionally save the testState --- tools/commands.js | 14 ++- tools/selftest.js | 293 ++++++++++++++++++++++++++++++---------------- 2 files changed, 205 insertions(+), 102 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index 004f9c6302..d65cf193b3 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1708,7 +1708,8 @@ main.registerCommand({ 'force-online': { type: Boolean }, slow: { type: Boolean }, browserstack: { type: Boolean }, - history: { type: Number } + history: { type: Number }, + list: { type: Boolean } }, hidden: true }, function (options) { @@ -1737,6 +1738,17 @@ main.registerCommand({ } } + if (options.list) { + selftest.listTests({ + onlyChanged: options.changed, + offline: offline, + includeSlowTests: options.slow, + testRegexp: testRegexp + }); + + return 0; + } + var clients = { browserstack: options.browserstack }; diff --git a/tools/selftest.js b/tools/selftest.js index 86bc276648..7766274326 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -18,6 +18,7 @@ var webdriver = require('browserstack-webdriver'); var phantomjs = require('phantomjs'); var catalogRemote = require('./catalog-remote.js'); var Package = uniload.load({ packages: ["ejson"] }); +var Console = require('./console.js').Console; var toolPackageName = "meteor-tool"; @@ -1385,10 +1386,8 @@ var define = function (name, tagsList, f) { tagsList = []; } - var tags = {}; - _.each(tagsList, function (tag) { - tags[tag] = true; - }); + var tags = tagsList.slice(); + tags.sort(); allTests.push(new Test({ name: name, @@ -1399,94 +1398,201 @@ var define = function (name, tagsList, f) { })); }; - /////////////////////////////////////////////////////////////////////////////// -// Running tests +// Choosing tests /////////////////////////////////////////////////////////////////////////////// var tagDescriptions = { checkout: 'can only run from checkouts', net: 'require an internet connection', slow: 'take quite a long time', - // these last two are not actually test tags; they reflect the use of - // --changed and --tests + // these last two are pseudo-tags, assigned to tests when you specify + // --changed or a regex pattern unchanged: 'unchanged since last pass', 'non-matching': "don't match specified pattern" }; -// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp -// clients: -// - browserstack (need s3cmd credentials) -var runTests = function (options) { - var failureCount = 0; +var getFilteredTests = function (options) { + options = options || {}; - var tests = getAllTests(); + var allTests = getAllTests(); - if (! tests.length) { - process.stderr.write("No tests defined.\n"); - return 0; + if (allTests.length) { + var testState = readTestState(); + + // Add pseudo-tags 'non-matching' and 'unchanged' + allTests = allTests.map(function (test) { + var newTags = []; + + if (options.testRegexp && ! options.testRegexp.test(test.name)) { + newTags.push('non-matching'); + } else if (options.onlyChanged && + test.fileHash === testState.lastPassedHashes[test.file]) { + newTags.push('unchanged'); + } + + if (! newTags.length) { + return test; + } + + return _.extend({}, test, { tags: test.tags.concat(newTags) }); + }); } - var testStateFile = path.join(process.env.HOME, '.meteortest'); + // (order of tags is significant to the "skip counts" that are displayed) + var tagsToSkip = []; + if (options.testRegexp) { + tagsToSkip.push('non-matching'); + } + if (options.onlyChanged) { + tagsToSkip.push('unchanged'); + } + if (! files.inCheckout()) { + tagsToSkip.push('checkout'); + } + if (options.offline) { + tagsToSkip.push('net'); + } + if (! options.includeSlowTests) { + tagsToSkip.push('slow'); + } + + return new TestList(allTests, tagsToSkip, testState); +}; + +var TestList = function (allTests, tagsToSkip, testState) { + tagsToSkip = (tagsToSkip || []); + testState = (testState || null); + + var self = this; + self.allTests = allTests; + self.skippedTags = tagsToSkip; + self.skipCounts = {}; + self.testState = testState; + + _.each(tagsToSkip, function (tag) { + self.skipCounts[tag] = 0; + }); + + self.fileInfo = {}; // path -> {hash, hasSkips, hasFailures} + + self.filteredTests = _.filter(allTests, function (test) { + + if (! self.fileInfo[test.file]) { + self.fileInfo[test.file] = { + hash: test.fileHash, + hasSkips: false, + hasFailures: false + }; + } + var fileInfo = self.fileInfo[test.file]; + + return !_.any(tagsToSkip, function (tag) { + if (_.contains(test.tags, tag)) { + self.skipCounts[tag]++; + fileInfo.hasSkips = true; + return true; + } else { + return false; + } + }); + }); +}; + +TestList.prototype.notifyFailed = function (test) { + this.fileInfo[test.file].hasFailures = true; +}; + +TestList.prototype.saveTestState = function () { + var self = this; + var testState = self.testState; + if (! (testState && self.filteredTests.length)) { + return; + } + + _.each(self.fileInfo, function (info, f) { + if (info.hasFailures) { + delete testState.lastPassedHashes[f]; + } else if (! info.hasSkips) { + testState.lastPassedHashes[f] = info.hash; + } + }); + + writeTestState(testState); +}; + +TestList.prototype.generateSkipReport = function () { + var self = this; + var result = ''; + + _.each(self.skippedTags, function (tag) { + var count = self.skipCounts[tag]; + if (count) { + result += ("Skipped " + count + " " + tag + " test" + + (count > 1 ? "s" : "") + " (" + + tagDescriptions[tag] + ")\n"); + } + }); + + return result; +}; + +var getTestStateFilePath = function () { + return path.join(process.env.HOME, '.meteortest'); +}; + +var readTestState = function () { + var testStateFile = getTestStateFilePath(); var testState; if (fs.existsSync(testStateFile)) testState = JSON.parse(fs.readFileSync(testStateFile, 'utf8')); if (! testState || testState.version !== 1) testState = { version: 1, lastPassedHashes: {} }; - var currentHashes = {}; + return testState; +}; - // _.keys(skipCounts) is the set of tags to skip. - // skipCounts also holds counts of tests skipped for other reasons - // (like not matching the test regex) and is used for printing - // messages about how many tests were skipped. - var skipCounts = {}; - if (! files.inCheckout()) - skipCounts['checkout'] = 0; +var writeTestState = function (testState) { + var testStateFile = getTestStateFilePath(); + fs.writeFileSync(testStateFile, JSON.stringify(testState), 'utf8'); +}; - if (options.offline) - skipCounts['net'] = 0; +var listTests = function (options) { + var testList = getFilteredTests(options); - if (! options.includeSlowTests) - skipCounts['slow'] = 0; - - if (options.testRegexp) { - var lengthBeforeTestRegexp = tests.length; - // Filter out tests whose name doesn't match. - tests = _.filter(tests, function (test) { - return options.testRegexp.test(test.name); - }); - skipCounts['non-matching'] = lengthBeforeTestRegexp - tests.length; + if (! testList.allTests.length) { + Console.stderr.write("No tests defined.\n"); + return; } - if (options.onlyChanged) { - var lengthBeforeOnlyChanged = tests.length; - // Filter out tests that haven't changed since they last passed. - tests = _.filter(tests, function (test) { - return test.fileHash !== testState.lastPassedHashes[test.file]; - }); - skipCounts['unchanged'] = lengthBeforeOnlyChanged - tests.length; + _.each(_.sortBy(testList.filteredTests, 'file'), function (test) { + Console.stdout.write(test.file + ': ' + test.name + ' [' + + test.tags.join(' ') + ']'); + }); + + Console.stderr.write(testList.generateSkipReport()); +}; + +/////////////////////////////////////////////////////////////////////////////// +// Running tests +/////////////////////////////////////////////////////////////////////////////// + +// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp +// clients: +// - browserstack (need s3cmd credentials) +var runTests = function (options) { + var testList = getFilteredTests(options); + + if (! testList.allTests.length) { + Console.stderr.write("No tests defined.\n"); + return 0; } - var failuresInFile = {}; - var skipsInFile = {}; var totalRun = 0; - _.each(tests, function (test) { - currentHashes[test.file] = test.fileHash; - // Is this a test we're supposed to skip? - var shouldSkip = false; - _.each(_.keys(test.tags), function (tag) { - if (_.has(skipCounts, tag)) { - shouldSkip = true; - skipCounts[tag] ++; - } - }); - if (shouldSkip) { - skipsInFile[test.file] = true; - return; - } + var failureCount = 0; + _.each(testList.filteredTests, function (test) { totalRun++; - process.stderr.write(test.name + "... "); + Console.stderr.write(test.name + "... "); var failure = null; try { @@ -1496,7 +1602,7 @@ var runTests = function (options) { if (e instanceof TestFailure) { failure = e; } else { - process.stderr.write("exception\n\n"); + Console.stderr.write("exception\n\n"); throw e; } } finally { @@ -1505,12 +1611,14 @@ var runTests = function (options) { } if (failure) { - process.stderr.write("fail!\n"); + Console.stderr.write("fail!\n"); failureCount++; + testList.notifyFailed(test); + var frames = parseStack.parse(failure); var relpath = path.relative(files.getCurrentToolsDir(), frames[0].file); - process.stderr.write(" => " + failure.reason + " at " + + Console.stderr.write(" => " + failure.reason + " at " + relpath + ":" + frames[0].line + "\n"); if (failure.reason === 'no-match') { } @@ -1519,28 +1627,28 @@ var runTests = function (options) { return status.signal || ('' + status.code) || "???"; }; - process.stderr.write(" => Expected: " + s(failure.details.expected) + + Console.stderr.write(" => Expected: " + s(failure.details.expected) + "; actual: " + s(failure.details.actual) + "\n"); } if (failure.reason === 'expected-exception') { } if (failure.reason === 'not-equal') { - process.stderr.write( -" => Expected: " + JSON.stringify(failure.details.expected) + -"; actual: " + JSON.stringify(failure.details.actual) + "\n"); + Console.stderr.write( + " => Expected: " + JSON.stringify(failure.details.expected) + + "; actual: " + JSON.stringify(failure.details.actual) + "\n"); } if (failure.details.run) { failure.details.run.outputLog.end(); var lines = failure.details.run.outputLog.get(); if (! lines.length) { - process.stderr.write(" => No output\n"); + Console.stderr.write(" => No output\n"); } else { var historyLines = options.historyLines || 100; - process.stderr.write(" => Last " + historyLines + " lines:\n"); + Console.stderr.write(" => Last " + historyLines + " lines:\n"); _.each(lines.slice(-historyLines), function (line) { - process.stderr.write(" " + + Console.stderr.write(" " + (line.channel === "stderr" ? "2| " : "1| ") + line.text + (line.bare ? "%" : "") + "\n"); @@ -1549,50 +1657,32 @@ var runTests = function (options) { } if (failure.details.messages) { - process.stderr.write(" => Errors while building:\n"); - process.stderr.write(failure.details.messages.formatMessages()); + Console.stderr.write(" => Errors while building:\n"); + Console.stderr.write(failure.details.messages.formatMessages()); } - - failuresInFile[test.file] = true; } else { - process.stderr.write("ok\n"); + Console.stderr.write("ok\n"); } }); - _.each(_.keys(currentHashes), function (f) { - if (failuresInFile[f]) - delete testState.lastPassedHashes[f]; - else if (! skipsInFile[f]) - testState.lastPassedHashes[f] = currentHashes[f]; - }); - - if (tests.length) - fs.writeFileSync(testStateFile, JSON.stringify(testState), 'utf8'); + testList.saveTestState(); if (totalRun > 0) - process.stderr.write("\n"); + Console.stderr.write("\n"); - var skippedSome = false; - _.each(skipCounts, function (count, tag) { - if (count) { - skippedSome = true; - process.stderr.write("Skipped " + count + " " + tag + " test" + - (count > 1 ? "s" : "") + " (" + - tagDescriptions[tag] + ")\n"); - } - }); + Console.stderr.write(testList.generateSkipReport()); - if (tests.length === 0) { - process.stderr.write("No tests run.\n"); + if (testList.filteredTests.length === 0) { + Console.stderr.write("No tests run.\n"); return 0; } else if (failureCount === 0) { var disclaimers = ''; - if (skippedSome) + if (testList.filteredTests.length < testList.allTests.length) disclaimers += " other"; - process.stderr.write("All" + disclaimers + " tests passed.\n"); + Console.stderr.write("All" + disclaimers + " tests passed.\n"); return 0; } else { - process.stderr.write(failureCount + " failure" + + Console.stderr.write(failureCount + " failure" + (failureCount > 1 ? "s" : "") + ".\n"); return 1; } @@ -1631,6 +1721,7 @@ var runTests = function (options) { _.extend(exports, { runTests: runTests, + listTests: listTests, markStack: markStack, define: define, Sandbox: Sandbox, From 94cbba6dad06b89630d18c10899343c53c46dc14 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 6 Oct 2014 17:37:33 -0700 Subject: [PATCH 005/283] Look at correct constraint field Old: $ curmeteor add iron:router@9.9.9 Got error during resolve; trying refresh { [Error: conflict: constraints on iron:router cannot be satisfied. Constraints come from: ] constraintSolverError: true } Could not satisfy all the specified constraints: Error: conflict: constraints on iron:router cannot be satisfied. Constraints come from: New: $ curmeteor add iron:router@9.9.9 iron:router@9.9.9: no such version --- tools/commands-packages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index ed305c26a4..f4a5b14761 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1944,7 +1944,7 @@ main.registerCommand({ }); // If the version was specified, check that the version exists. - _.each(constraint.constraint, function (constr) { + _.each(constraint.constraints, function (constr) { if (constr.version !== null) { var versionInfo = doOrDie({ title: 'Fetching packages' }, function () { return catalog.complete.getVersion(constraint.name, constr.version); From 94ab470b2f2ef5d995c51c071c09a4a07c0319b4 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 6 Oct 2014 21:17:56 -0700 Subject: [PATCH 006/283] fix test-packages and clarify utils.parseUrl docs --- tools/commands.js | 4 ++-- tools/utils.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index 004f9c6302..98e1dbc42e 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -31,7 +31,7 @@ var Console = require('./console.js').Console; var DEPLOY_ARCH = 'os.linux.x86_64'; // The default port that the development server listens on. -var DEFAULT_PORT = 3000; +var DEFAULT_PORT = '3000'; // Given a site name passed on the command line (eg, 'mysite'), return // a fully-qualified hostname ('mysite.meteor.com'). @@ -135,7 +135,7 @@ var runCommandOptions = { requiresApp: true, maxArgs: Infinity, options: { - port: { type: String, short: "p", default: '' + DEFAULT_PORT }, + port: { type: String, short: "p", default: DEFAULT_PORT }, 'mobile-server': { type: String }, // XXX COMPAT WITH 0.9.2.2 'mobile-port': { type: String }, diff --git a/tools/utils.js b/tools/utils.js index d8ddad8a61..c2f9ecc718 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -15,8 +15,8 @@ var utils = exports; // Parses ://: into an object { protocol: *, host: // *, port: * }. The input can also be of the form : or just // . We're not simply using 'url.parse' because we want '3000' to -// parse as {host: undefined, protocol: undefined, port: 3000}, whereas -// 'url.parse' would give us {protocol:3000, host: undefined, port: +// parse as {host: undefined, protocol: undefined, port: '3000'}, whereas +// 'url.parse' would give us {protocol:' 3000', host: undefined, port: // undefined} or something like that. // // 'defaults' is an optional object with 'host', 'port', and 'protocol' keys. From 1779d62281c4283a9d55c9703e6f54e52e78036a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 6 Oct 2014 21:42:21 -0700 Subject: [PATCH 007/283] some packaging-related docs cleanups also, add instructions to the top of docs.js --- docs/.meteor/versions | 117 +++++++++--------- docs/client/commandline.html | 2 +- docs/client/concepts.html | 7 +- docs/client/data.js | 4 +- .../jsdoc/docdata-jsdoc-template/publish.js | 4 +- tools/package-source.js | 24 ++-- 6 files changed, 80 insertions(+), 78 deletions(-) diff --git a/docs/.meteor/versions b/docs/.meteor/versions index ce3da053a0..73807b599c 100644 --- a/docs/.meteor/versions +++ b/docs/.meteor/versions @@ -1,58 +1,59 @@ -appcache@1.0.1 -application-configuration@1.0.2 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 -callback-hook@1.0.0 -check@1.0.1 -code-prettify@1.0.0 -coffeescript@1.0.3 -ctl-helper@1.0.3 -ctl@1.0.1 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -jquery-waypoints@1.0.0 -jquery@1.0.0 -json@1.0.0 -less@1.0.9 -livedata@1.0.10 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload-safetybelt@1.0.0 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -session@1.0.2 -showdown@1.0.1 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -spiderable@1.0.3 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +appcache@1.0.2-pre.2 +application-configuration@1.0.3-pre.2 +autoupdate@1.1.2-pre.4 +base64@1.0.1-pre.2 +binary-heap@1.0.1-pre.2 +blaze-tools@1.0.1-pre.2 +blaze@2.0.2-pre.2 +boilerplate-generator@1.0.1-pre.4 +callback-hook@1.0.1-pre.2 +check@1.0.2-pre.2 +code-prettify@1.0.1-pre.2 +coffeescript@1.0.4-pre.3 +ctl-helper@1.0.4-pre.2 +ctl@1.0.2-pre.2 +ddp@1.0.10-pre.2 +deps@1.0.5-pre.2 +ejson@1.0.4-pre.2 +fastclick@1.0.1-pre.3 +follower-livedata@1.0.2-pre.2 +geojson-utils@1.0.1-pre.2 +html-tools@1.0.2-pre.2 +htmljs@1.0.2-pre.3 +http@1.0.7-pre.2 +id-map@1.0.1-pre.2 +jquery-waypoints@1.0.1-pre.2 +jquery@1.0.1-pre.2 +json@1.0.1-pre.2 +less@1.0.10-pre.3 +livedata@1.0.11-pre.2 +logging@1.0.4-pre.2 +markdown@1.0.2-pre.2 +meteor-platform@1.1.2-pre.4 +meteor@1.1.2-pre.3 +minifiers@1.1.1-pre.2 +minimongo@1.0.4-pre.3 +mobile-status-bar@1.0.1-pre.2 +mongo@1.0.7-pre.2 +observe-sequence@1.0.3-pre.2 +ordered-dict@1.0.1-pre.2 +random@1.0.1-pre.2 +reactive-dict@1.0.4-pre.2 +reactive-var@1.0.3-pre.2 +reload-safetybelt@1.0.1-pre.2 +reload@1.1.1-pre.2 +retry@1.0.1-pre.2 +routepolicy@1.0.2-pre.2 +session@1.0.3-pre.2 +showdown@1.0.2-pre.2 +spacebars-compiler@1.0.3-pre.2 +spacebars@1.0.3-pre.2 +spiderable@1.0.4-pre.2 +standard-app-packages@1.0.3-pre.2 +templating@1.0.8-pre.3 +tracker@1.0.3-pre.2 +ui@1.0.4-pre.2 +underscore@1.0.1-pre.2 +url@1.0.1-pre.2 +webapp-hashing@1.0.1-pre.2 +webapp@1.1.3-pre.3 diff --git a/docs/client/commandline.html b/docs/client/commandline.html index 1f5dbf437d..e3963a0e86 100644 --- a/docs/client/commandline.html +++ b/docs/client/commandline.html @@ -149,7 +149,7 @@ can add multiple packages with one command Optionally, adds version constraints. Running `meteor add package@1.1.0` will add the package at version `1.1.0` or higher (but not `2.0.0` or higher). If you want to use version `1.1.0` exactly, use `meteor add package@=1.1.0`. You can also -'or' constraints together: for example, '=1.0.0 || =2.0.1' means either 1.0.0 (exactly) +'or' constraints together: for example, `meteor add 'package@=1.0.0 || =2.0.1'` means either 1.0.0 (exactly) or 2.0.1 (exactly). To remove a version constraint for a specific package, run `meteor add` again diff --git a/docs/client/concepts.html b/docs/client/concepts.html index 6433169c53..71dab6c299 100644 --- a/docs/client/concepts.html +++ b/docs/client/concepts.html @@ -792,9 +792,10 @@ things). However, we will still write the new versions.json file. Meteor uses extended semver versioning for its packages: that means that the version number has three parts separated by dots: major version, minor version and patch version -(for example: 1.2.3) with an optional pre-release version. You can read more about it here -(www.semver.org). Additionally, because some meteor packages wrap external libraries, -Meteor supports the convention of using _ to denote a wrap number. +(for example: 1.2.3) with an optional pre-release version. You can read more about it on +[semver.org](http://www.semver.org). +Additionally, because some meteor packages wrap external libraries, +Meteor supports the convention of using `_` to denote a wrap number. You can read more about [`package.js`](#packagejs) files in the API section. diff --git a/docs/client/data.js b/docs/client/data.js index b0c497ac88..d11bbaee01 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ -// This file is automatically generated by JSDoc; -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number, to follow the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with the _. For example,\n'1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers:\n'1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. You need to specify a version to publish to the package\nserver.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'.","params":[{"type":{"names":["String"]},"description":"

Specification of a release: track@version. Just 'version' (ex: "0.9.0") is sufficient if using the default release track

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +// This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. If you want to publish your package to the package server, you\nmust specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js b/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js index cc23a48414..af22141c71 100644 --- a/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js +++ b/scripts/admin/jsdoc/docdata-jsdoc-template/publish.js @@ -123,7 +123,7 @@ // write full docs JSON var jsonString = JSON.stringify(docTree); var jsString = "DocsData = " + jsonString + ";"; - jsString = "// This file is automatically generated by JSDoc;\n" + jsString; + jsString = "// This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh\n" + jsString; var docsDataFilename = "docs/client/data.js"; fs.writeFileSync(docsDataFilename, jsString); @@ -132,4 +132,4 @@ var nameTreeFilename= "docs/client/names.json"; fs.writeFileSync(nameTreeFilename, jsonString); }; -})(); \ No newline at end of file +})(); diff --git a/tools/package-source.js b/tools/package-source.js index d90d57f008..750b47c6b5 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -480,15 +480,15 @@ _.extend(PackageSource.prototype, { * the package, required for publication. * @param {String} options.version The (extended) * [semver](http://www.semver.org) version for your package. Additionally, - * Meteor allows a wrap number, to follow the version number. If you are + * Meteor allows a wrap number: a positive integer that follows the version number. If you are * porting another package that uses semver versioning, you may want to - * use the original version, postfixed with the _. For example, - * '1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers: - * '1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap - * numbers don't affect compatibility, so 1.2.3_1 is compatible with - * 1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to - * `0.0.0`. You need to specify a version to publish to the package - * server. + * use the original version, postfixed with `_wrapnumber`. For example, + * `1.2.3_1` or `2.4.5-rc1_4`. Wrap numbers sort after the original numbers: + * `1.2.3` < `1.2.3_1` < `1.2.3_2` < `1.2.4-rc.0`. By default, wrap + * numbers don't affect compatibility, so `1.2.3_1` is compatible with + * `1.2.3`, `1.2.3_3`, etc. If no version is specified, this field defaults to + * `0.0.0`. If you want to publish your package to the package server, you + * must specify a version. * @param {String} options.name Optional name override. By default, the * package name comes from the name of its directory. * @param {String} options.git Optional Git URL to the source repository. @@ -1052,8 +1052,8 @@ _.extend(PackageSource.prototype, { * `accounts` package). If you are sourcing core * packages from a Meteor release with `versionsFrom`, you may leave * off version names for core packages. You may also specify constraints, - * such as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly), - * or 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1). + * such as `my:forms@=1.0.0` (this package demands `my:forms` at `1.0.0` exactly), + * or `my:forms@1.0.0 || =2.0.1` (`my:forms` at `1.x.y`, or exactly `2.0.1`). * @param {String} [architecture] If you only use the package on the * server (or the client), you can pass in the second argument (e.g., * `'server'` or `'client'`) to specify what architecture the package is @@ -1193,9 +1193,9 @@ _.extend(PackageSource.prototype, { /** * @memberOf PackageAPI * @instance - * @summary Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'. + * @summary Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the "or" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`. * @locus package.js - * @param {String} meteorRelease Specification of a release: track@version. Just 'version' (ex: `"0.9.0"`) is sufficient if using the default release track + * @param {String | String[]} meteorRelease Specification of a release: track@version. Just 'version' (e.g. `"0.9.0"`) is sufficient if using the default release track `METEOR`. */ versionsFrom: function (releases) { // Uniloaded packages really ought to be in the core release, by From 13861d80e17a0923e7cd5b9b262b82e4bc1829e6 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 6 Oct 2014 23:26:55 -0700 Subject: [PATCH 008/283] `meteor build` outputs apk --- tools/commands-cordova.js | 7 ++++++- tools/commands.js | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index aaa5b03735..a95a617daf 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -793,7 +793,12 @@ var buildCordova = function (localPath, buildCommand, options) { verboseLog('Running the build command:', buildCommand); // Give the buffer more space as the output of the build is really huge try { - execFileSyncOrThrow(localCordova, [buildCommand], + var args = [buildCommand]; + + if (! options.debug) + args.push('--release'); + + execFileSyncOrThrow(localCordova, args, { cwd: cordovaPath, maxBuffer: 2000*1024 }); } catch (err) { // "ld: 100000 duplicate symbols for architecture i386" is a common error diff --git a/tools/commands.js b/tools/commands.js index 98e1dbc42e..12e6148464 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -744,12 +744,29 @@ var buildCommand = function (options) { var buildPath = path.join(localPath, 'cordova-build', 'platforms', platformName); var platformPath = path.join(outputPath, platformName); - files.cp_r(buildPath, platformPath); + + if (platformName === 'ios') { + files.cp_r(buildPath, platformPath); + } else if (platformName === 'android') { + files.cp_r(buildPath, path.join(platformPath, 'project')); + var apkPath = findApkPath(path.join(buildPath, 'ant-build')); + files.copyFile(apkPath, path.join(platformPath, 'unaligned.apk')); + } }); files.rm_recursive(buildDir); }; +var findApkPath = function (dirPath) { + var apkPath = _.find(fs.readdirSync(dirPath), function (filePath) { + return path.extname(filePath) === '.apk'; + }); + + if (! apkPath) + throw new Error('The APK file for the Android build was not found.'); + return path.join(dirPath, apkPath); +}; + /////////////////////////////////////////////////////////////////////////////// // mongo /////////////////////////////////////////////////////////////////////////////// From 497af45dd8b67494da6a6a600d2bae6365cc9826 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 6 Oct 2014 23:27:07 -0700 Subject: [PATCH 009/283] Whitespace --- tools/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/utils.js b/tools/utils.js index c2f9ecc718..47fd6008ac 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -682,7 +682,7 @@ exports.mobileServerForRun = function (options) { // if we are running on a device, use the auto-detected IP - + if (options.runOnDevice) { var myIp = ipAddress(); if (! myIp) { @@ -701,7 +701,7 @@ exports.mobileServerForRun = function (options) { // we are running a simulator, use localhost:3000 - + return { host: "localhost", port: parsedUrl.port, From ea0f431cb302b3c2ba2427fcc20a9eaa46af9045 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 00:27:58 -0700 Subject: [PATCH 010/283] Change AndroidManifest.xml's debuggable property based on mode --- tools/commands-cordova.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index a95a617daf..91c443d26c 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -795,8 +795,20 @@ var buildCordova = function (localPath, buildCommand, options) { try { var args = [buildCommand]; - if (! options.debug) + // depending on the debug mode build the android part in different modes + if (_.contains(project.getPlatforms(), 'android')) { + var manifestPath = + path.join(cordovaPath, 'platforms', 'android', 'AndroidManifest.xml'); + + var manifest = fs.readFileSync(manifestPath, 'utf8'); + manifest = manifest.replace(/android:debuggable=.(true|false)./g, ''); + manifest = manifest.replace(/ Date: Tue, 7 Oct 2014 01:13:10 -0700 Subject: [PATCH 011/283] Workaround Phonegap's inability to distinguish when to rebuild the apk --- tools/commands-cordova.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 91c443d26c..40ca46f321 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -797,13 +797,17 @@ var buildCordova = function (localPath, buildCommand, options) { // depending on the debug mode build the android part in different modes if (_.contains(project.getPlatforms(), 'android')) { - var manifestPath = - path.join(cordovaPath, 'platforms', 'android', 'AndroidManifest.xml'); + var androidBuildPath = path.join(cordovaPath, 'platforms', 'android'); + var manifestPath = path.join(androidBuildPath, 'AndroidManifest.xml'); + // XXX a hack to reset the debuggable mode var manifest = fs.readFileSync(manifestPath, 'utf8'); manifest = manifest.replace(/android:debuggable=.(true|false)./g, ''); manifest = manifest.replace(/ Date: Tue, 7 Oct 2014 08:26:12 -0700 Subject: [PATCH 012/283] Open URLs instead of trying to auto-install stuff --- tools/commands-cordova.js | 143 +++++++++++++++++++++++++++----------- 1 file changed, 104 insertions(+), 39 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 40ca46f321..b7dc2e0919 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -426,8 +426,8 @@ var checkRequestedPlatforms = function (platforms) { if (! _.contains(cordovaPlatforms, platform)) { Console.warn("Platform is not added to the project: " + platform); - var sdkInstalled = checkPlatformRequirements(platform); - if (!sdkInstalled) { + var installed = checkPlatformRequirements(platform); + if (!installed.acceptable) { Console.info("First install the SDK by running: " + Console.bold("meteor install-sdk " + platform)); Console.info("Then run: " + Console.bold("meteor add-platform " + platform)); } else { @@ -1107,20 +1107,21 @@ var checkAgreePlatformTerms = function (platform, name) { }; var checkPlatformRequirements = function (platform, options) { - options = _.extend({ fix: false, log: false }, options); + options = _.extend({fix: false, log: false}, options); if (platform == 'android') { return Android.checkRequirements(options); - } - if (platform == 'ios') { + } else if (platform == 'ios') { return IOS.checkRequirements(options); + } else { + Console.debug("Unknown platform ", platform); + return {acceptable: true}; } - return true; }; var requirePlatformReady = function (platform) { try { - var ok = checkPlatformRequirements(platform); - if (!ok) { + var installed = checkPlatformRequirements(platform); + if (!installed.acceptable) { Console.warn("Platform is not installed; please run: " + Console.bold("meteor install-sdk " + platform)); throw new main.ExitWithCode(2); } @@ -1540,6 +1541,7 @@ _.extend(IOS.prototype, { //files.run('/usr/bin/xcodebuild', '--install'); // XXX: Any way to open direct in AppStore (rather than in browser)? + // Yes: macappstores://itunes.apple.com/us/app/xcode/id497799835 files.run('open', 'https://itunes.apple.com/us/app/xcode/id497799835?mt=12'); }); }, @@ -1584,17 +1586,23 @@ _.extend(IOS.prototype, { return undefined; } + var result = { acceptable: true, missing: [] }; + var okay = true; if (self.hasXcode()) { log && Console.info(Console.success("Xcode is installed")); } else { log && Console.info(Console.fail("Xcode is not installed")); - fix && self.installXcode(); - okay = fix; + if (fix) { + self.installXcode(); + } else { + result.missing.push("xcode"); + result.acceptable = false; + } } - if (!okay) return okay; + if (!result.acceptable) return result; //Check if the full Xcode package is already installed: // @@ -1610,12 +1618,16 @@ _.extend(IOS.prototype, { } else { log && Console.info(Console.fail("You must accept the Xcode license")); - fix && self.launchXcode(); - okay = fix; + if (fix) { + self.launchXcode(); + } else { + result.missing.push("xcode-license"); + result.acceptable = false; + } } } - if (!okay) return okay; + if (!result.acceptable) return result; _.each(['5.0', '5.0.1', '5.1', '6.0', '6.1'], function (version) { if (self.isSdkInstalled(version)) { @@ -1630,7 +1642,7 @@ _.extend(IOS.prototype, { } }); - return okay; + return result; } }); @@ -1891,6 +1903,11 @@ _.extend(Android.prototype, { if (Host.isMac()) { // XXX: Find the magic incantation that invokes the JRE 6 installer var cmd = new processes.RunCommand('open', [ 'http://support.apple.com/kb/DL1572' ]); + + + // Download http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg + // Extract dmg + // This works, but requires some manual steps // This installs, but doesn't provide java (?) //var cmd = new processes.RunCommand('open', [ 'https://www.java.com/en/download/mac_download.jsp' ]); @@ -1921,7 +1938,7 @@ _.extend(Android.prototype, { Console.info(" sudo yum install -y glibc.i686 zlib.i686 libstdc++.i686 ncurses-libs.i686"); } } else { - Console.warn("You should install the JDK; we don't have instructions for your distibution (sorry!)"); + Console.warn("You should install the JDK; we don't have instructions for your distribution (sorry!)"); Console.info("Please do submit the instructions so we can include them.") } @@ -2022,56 +2039,74 @@ _.extend(Android.prototype, { var log = !!options.log; var fix = !!options.fix; - var okay = true; + var result = { acceptable: true, missing: [] }; if (self.hasJava()) { log && Console.info(Console.success("Java is installed")); } else { log && Console.info(Console.fail("Java is not installed")); - fix && self.installJava(); - okay = fix; + if (fix) { + self.installJava(); + } else { + result.missing.push("jdk"); + result.acceptable = false; + } } - if (!okay) return okay; + if (!result.acceptable) return result; // (hasAcceleration can also be undefined) var hasAcceleration = self.hasAcceleration(); if (hasAcceleration === false) { log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); - fix && self.installAcceleration(); - // Not all systems can install the accelerator, so don't block - // XXX: Maybe we should block the emulator (only); it is unusable without it - //okay = fix; + if (fix) { + self.installAcceleration(); + } else { + result.missing.push("haxm"); + + // Not all systems can install the accelerator, so don't block + // XXX: Maybe we should block the emulator (only); it is unusable without it + //result.acceptable = false + } } else if (hasAcceleration === true) { + // (can be undefined) log && Console.info(Console.success("Android emulator acceleration is installed")); } - if (!okay) return okay; + if (!result.acceptable) return result; if (self.hasAndroidBundle()) { log && Console.info(Console.success("Found Android bundle")); } else { log && Console.info(Console.fail("Android bundle not found")); - fix && self.installAndroidBundle(); - okay = fix; + if (fix) { + self.installAndroidBundle(); + } else { + result.missing.push("android-bundle"); + result.acceptable = false; + } } - if (!okay) return okay; + if (!result.acceptable) return result; if (self.hasTarget('19', 'default/x86')) { log && Console.info(Console.success("Found suitable Android API libraries")); } else { log && Console.info(Console.fail("Suitable Android API libraries not found")); - fix && self.installTarget('sys-img-x86-android-19'); - okay = fix; + if (fix) { + self.installTarget('sys-img-x86-android-19'); + } else { + result.missing.push("android-sys-img"); + result.acceptable = false; + } } - if (!okay) return okay; + if (!result.acceptable) return result; var avdName = self.getAvdName(); if (self.hasAvd(avdName)) { @@ -2079,14 +2114,17 @@ _.extend(Android.prototype, { } else { log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); - var avdOptions = {}; - fix && self.createAvd(avdName, avdOptions); - okay = fix; - - (fix && log) && Console.info(Console.success("Created android virtual device (AVD): " + avdName)); + if (fix) { + var avdOptions = {}; + self.createAvd(avdName, avdOptions); + Console.info(Console.success("Created android virtual device (AVD): " + avdName)); + } else { + result.missing.push("android-avd"); + result.acceptable = false; + } } - return okay; + return result; } }); @@ -2264,6 +2302,17 @@ main.registerCommand({ return 0; }); +// XXX: Move to Strings +var capitalize = function (s) { + if (!s.length) return s; + return s.substring(0, 1).toUpperCase() + s.substring(1); +}; + +// XXX: Move to Console (?) +var openUrl = function (url) { + files.run('open', url); +}; + main.registerCommand({ name: "install-sdk", pretty: true, @@ -2284,9 +2333,25 @@ main.registerCommand({ return 1; } - var okay = checkPlatformRequirements(platform, { log:true, fix: true} ); - if (!okay) { + var installed = checkPlatformRequirements(platform, { log:true, fix: false} ); + if (!installed.acceptable) { Console.warn("Platform requirements not yet met"); + + var host = null; + if (Host.isMac()) { + host = "Mac"; + } else if (Host.isLinux()) { + host = "Linux"; + } + if (host) { + var wikiPage = "Cordova-Installation:-" + capitalize(platform) + "-on-" + host; + var url = "https://github.com/meteor/meteor/wiki/" + wikiPage; // URL escape? + openUrl(url); + Console.info("Please follow the instructions here: " + Console.bold(url)); + } else { + Console.info("We don't have installation instructions for your platform") + } + return 1; } From 6fd0b7f9da9ae4164dc58171792cc3d6860af0d0 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 08:30:48 -0700 Subject: [PATCH 013/283] Try to collect the maximum set of missing components and install all we can --- tools/commands-cordova.js | 66 ++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index b7dc2e0919..2564e7938a 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1602,8 +1602,6 @@ _.extend(IOS.prototype, { } } - if (!result.acceptable) return result; - //Check if the full Xcode package is already installed: // // $ xcode-select -p @@ -1627,8 +1625,6 @@ _.extend(IOS.prototype, { } } - if (!result.acceptable) return result; - _.each(['5.0', '5.0.1', '5.1', '6.0', '6.1'], function (version) { if (self.isSdkInstalled(version)) { log && Console.warn("An old version of the iPhone SDK is installed (" + version + "); you should"); @@ -2038,6 +2034,7 @@ _.extend(Android.prototype, { var log = !!options.log; var fix = !!options.fix; + var fixConsole = !!options.fixConsole; var result = { acceptable: true, missing: [] }; @@ -2054,8 +2051,6 @@ _.extend(Android.prototype, { } } - if (!result.acceptable) return result; - // (hasAcceleration can also be undefined) var hasAcceleration = self.hasAcceleration(); if (hasAcceleration === false) { @@ -2076,51 +2071,50 @@ _.extend(Android.prototype, { log && Console.info(Console.success("Android emulator acceleration is installed")); } - if (!result.acceptable) return result; - + var hasAndroid = false; if (self.hasAndroidBundle()) { log && Console.info(Console.success("Found Android bundle")); + hasAndroid = true; } else { log && Console.info(Console.fail("Android bundle not found")); - if (fix) { + if (fix || fixConsole) { self.installAndroidBundle(); + hasAndroid = true; } else { result.missing.push("android-bundle"); result.acceptable = false; } } - if (!result.acceptable) return result; - - if (self.hasTarget('19', 'default/x86')) { - log && Console.info(Console.success("Found suitable Android API libraries")); - } else { - log && Console.info(Console.fail("Suitable Android API libraries not found")); - - if (fix) { - self.installTarget('sys-img-x86-android-19'); + if (hasAndroid) { + if (self.hasTarget('19', 'default/x86')) { + log && Console.info(Console.success("Found suitable Android API libraries")); } else { - result.missing.push("android-sys-img"); - result.acceptable = false; + log && Console.info(Console.fail("Suitable Android API libraries not found")); + + if (fix || fixConsole) { + self.installTarget('sys-img-x86-android-19'); + } else { + result.missing.push("android-sys-img"); + result.acceptable = false; + } } - } - if (!result.acceptable) return result; - - var avdName = self.getAvdName(); - if (self.hasAvd(avdName)) { - log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) found")); - } else { - log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); - - if (fix) { - var avdOptions = {}; - self.createAvd(avdName, avdOptions); - Console.info(Console.success("Created android virtual device (AVD): " + avdName)); + var avdName = self.getAvdName(); + if (self.hasAvd(avdName)) { + log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) found")); } else { - result.missing.push("android-avd"); - result.acceptable = false; + log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); + + if (fix || fixConsole) { + var avdOptions = {}; + self.createAvd(avdName, avdOptions); + Console.info(Console.success("Created android virtual device (AVD): " + avdName)); + } else { + result.missing.push("android-avd"); + result.acceptable = false; + } } } @@ -2333,7 +2327,7 @@ main.registerCommand({ return 1; } - var installed = checkPlatformRequirements(platform, { log:true, fix: false} ); + var installed = checkPlatformRequirements(platform, { log:true, fix: false, fixConsole: true } ); if (!installed.acceptable) { Console.warn("Platform requirements not yet met"); From a9d32c722a167d977a3e66ac1e534f8fa6d66545 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 08:36:20 -0700 Subject: [PATCH 014/283] Jump straight to anchor on wiki instruction page --- tools/commands-cordova.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 2564e7938a..6f5842fba4 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2339,7 +2339,11 @@ main.registerCommand({ } if (host) { var wikiPage = "Cordova-Installation:-" + capitalize(platform) + "-on-" + host; + var anchor = installed.missing.length ? installed.missing[0] : null; var url = "https://github.com/meteor/meteor/wiki/" + wikiPage; // URL escape? + if (anchor) { + url += "#" + anchor; + } openUrl(url); Console.info("Please follow the instructions here: " + Console.bold(url)); } else { From f0155d2b3df7deb33522021741d7b1b42223d715 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 11:43:54 -0700 Subject: [PATCH 015/283] Delete docs about wrap numbers and ECV This sentence is about ECV but nothing else in the docs discusses ECV and it doesn't use that term. So it's actually kind of confusing; to me, it suggested that asking for `1.2.3_1` might give you `1.2.3`, which is not true. --- docs/client/data.js | 2 +- tools/package-source.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/client/data.js b/docs/client/data.js index d11bbaee01..26e5fd26c9 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. If you want to publish your package to the package server, you\nmust specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/tools/package-source.js b/tools/package-source.js index 750b47c6b5..fa3ff6395e 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -484,11 +484,9 @@ _.extend(PackageSource.prototype, { * porting another package that uses semver versioning, you may want to * use the original version, postfixed with `_wrapnumber`. For example, * `1.2.3_1` or `2.4.5-rc1_4`. Wrap numbers sort after the original numbers: - * `1.2.3` < `1.2.3_1` < `1.2.3_2` < `1.2.4-rc.0`. By default, wrap - * numbers don't affect compatibility, so `1.2.3_1` is compatible with - * `1.2.3`, `1.2.3_3`, etc. If no version is specified, this field defaults to - * `0.0.0`. If you want to publish your package to the package server, you - * must specify a version. + * `1.2.3` < `1.2.3_1` < `1.2.3_2` < `1.2.4-rc.0`. If no version is specified, + * this field defaults to `0.0.0`. If you want to publish your package to + * the package server, you must specify a version. * @param {String} options.name Optional name override. By default, the * package name comes from the name of its directory. * @param {String} options.git Optional Git URL to the source repository. From b9db7748348320f69fdb652a6522541651f1773b Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 13:46:00 -0700 Subject: [PATCH 016/283] Fix broken links and release headline --- docs/client/api.html | 2 +- docs/client/data.js | 2 +- docs/client/docs.js | 8 +++++--- tools/package-source.js | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index 8df1929e4e..d0e893f0ed 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -3662,7 +3662,7 @@ App.configurePlugin('com.phonegap.plugins.facebookconnect', { {{/markdown}} {{> autoApiBox "App.info"}} -{{> autoApiBox "App.set"}} +{{> autoApiBox "App.setPreference"}} {{> autoApiBox "App.configurePlugin"}} {{> autoApiBox "App.icons"}} {{> autoApiBox "App.launchScreens"}} diff --git a/docs/client/data.js b/docs/client/data.js index b0c497ac88..f9fbee14b3 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number, to follow the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with the _. For example,\n'1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers:\n'1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. You need to specify a version to publish to the package\nserver.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'.","params":[{"type":{"names":["String"]},"description":"

Specification of a release: track@version. Just 'version' (ex: "0.9.0") is sufficient if using the default release track

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number, to follow the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with the _. For example,\n'1.2.3_1', '2.4.5-rc1_4'. Wrap numbers sort after the original numbers:\n'1.2.3' < '1.2.3_1' < '1.2.3_2' < '1.2.4-rc.0'. By default, wrap\nnumbers don't affect compatibility, so 1.2.3_1 is compatible with\n1.2.3, 1.2.3_3, etc. If no version is specified, this field defaults to\n0.0.0. You need to specify a version to publish to the package\nserver.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as 'my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor 'my:forms@1.0.0 || =2.0.1' (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorversion`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use `api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will automatically depend on jQuery 1.0.0 when it is published. You may specify more than one release, in which case the constraints will be parsed with an or: 'jquery@1.0.0 || 2.0.0'.","params":[{"type":{"names":["String"]},"description":"

Specification of a release: track@version. Just 'version' (ex: "0.9.0") is sufficient if using the default release track

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/docs/client/docs.js b/docs/client/docs.js index 20f06d6f9d..65fd4488df 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -1,6 +1,8 @@ +var release = Meteor.release ? "0.9.4-pre.11" : "(checkout)"; + Template.headline.helpers({ release: function () { - return Meteor.release ? "0.9.4-pre.11" : "(checkout)"; + return release; } }); @@ -103,7 +105,7 @@ var hideMenu = function () { }; var toc = [ - {name: "Meteor " + Template.headline.release(), id: "top"}, [ + {name: "Meteor " + release, id: "top"}, [ "Quick start", "Seven principles", "Resources" @@ -402,7 +404,7 @@ var toc = [ {name: "mobile-config.js", id: "mobileconfigjs"}, [ {name: "App.info", id: "App-info"}, - {name: "App.set", id: "App-set"}, + {name: "App.setPreference", id: "App-setPreference"}, {name: "App.configurePlugin", id: "App-configurePlugin"}, {name: "App.icons", id: "App-icons"}, {name: "App.launchScreens", id: "App-launchScreens"} diff --git a/tools/package-source.js b/tools/package-source.js index d90d57f008..cf658ef8b7 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -610,9 +610,9 @@ _.extend(PackageSource.prototype, { * package. * @param {String|String[]} options.use Meteor packages that this * plugin uses, independent of the packages specified in - * [api.onUse](#PackageAPI-onUse). + * [api.onUse](#pack_onUse). * @param {String[]} options.sources The source files that make up the - * build plugin, independent from [api.addFiles](#PackageAPI-addFiles). + * build plugin, independent from [api.addFiles](#pack_addFiles). * @param {Object} options.npmDependencies An object where the keys * are NPM package names, and the keys are the version numbers of * required NPM packages, just like in [Npm.depends](#Npm-depends). From ce15336d3ea90c54ca06fb4c9899c9f992898771 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 2 Oct 2014 00:08:46 +0200 Subject: [PATCH 017/283] Add tests for the appcache package Currently tests only verify the manifest presence and the header validity. It should also verify the other sections validity cf. #2716 --- packages/appcache/appcache_tests.js | 34 +++++++++++++++++++++++++++++ packages/appcache/package.js | 14 +++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 packages/appcache/appcache_tests.js diff --git a/packages/appcache/appcache_tests.js b/packages/appcache/appcache_tests.js new file mode 100644 index 0000000000..e320547452 --- /dev/null +++ b/packages/appcache/appcache_tests.js @@ -0,0 +1,34 @@ +var manifestURL = '/app.manifest'; + +var appcacheTest = function(cb) { + return function(test, next) { + HTTP.get(manifestURL, function (err, res) { + cb(test, res); + next(); + }); + }; +}; + +Tinytest.addAsync('appcache - presence', appcacheTest(function(test, manifest) { + test.equal(manifest.statusCode, 200, 'manifest not served'); +})); + +Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { + var lines = manifest.content.split("\n"); + var i = 0; + + var nextLinesMatch = function(expectedList) { + _.each(expectedList, function(expected) { + var testFunc = _.isRegExp(expected) ? "matches" : "equal"; + test[testFunc](lines[i++], expected); + }); + }; + + // Verify header validity + nextLinesMatch([ + "CACHE MANIFEST", + "", + /^#\s[0-9a-f]+$/, + /^#\s[0-9a-f]+$/, + ]); +})); diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 4588b5d748..6309c41135 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -3,12 +3,20 @@ Package.describe({ version: "1.0.2-pre.2" }); -Package.on_use(function (api) { +Package.onUse(function (api) { api.use('webapp', 'server'); api.use('reload', 'client'); api.use('routepolicy', 'server'); api.use('underscore', 'server'); api.use('autoupdate', 'server', {weak: true}); - api.add_files('appcache-client.js', 'client'); - api.add_files('appcache-server.js', 'server'); + api.addFiles('appcache-client.js', 'client'); + api.addFiles('appcache-server.js', 'server'); +}); + +Package.onTest(function (api) { + api.use('tinytest'); + api.use('appcache'); + api.use('underscore', 'client'); + api.use('http', 'client'); + api.addFiles('appcache_tests.js', 'client'); }); From 8cf480abd60a20d84547b8301757ec8081ef8326 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 3 Oct 2014 00:00:28 +0200 Subject: [PATCH 018/283] Disable the cache manifest in the tinytest client application to ensure determinitic tests --- .../{appcache_tests.js => appcache_tests-client.js} | 2 ++ packages/appcache/appcache_tests-server.js | 10 ++++++++++ packages/appcache/package.js | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) rename packages/appcache/{appcache_tests.js => appcache_tests-client.js} (95%) create mode 100644 packages/appcache/appcache_tests-server.js diff --git a/packages/appcache/appcache_tests.js b/packages/appcache/appcache_tests-client.js similarity index 95% rename from packages/appcache/appcache_tests.js rename to packages/appcache/appcache_tests-client.js index e320547452..38661b87cb 100644 --- a/packages/appcache/appcache_tests.js +++ b/packages/appcache/appcache_tests-client.js @@ -10,11 +10,13 @@ var appcacheTest = function(cb) { }; Tinytest.addAsync('appcache - presence', appcacheTest(function(test, manifest) { + console.log(manifest) test.equal(manifest.statusCode, 200, 'manifest not served'); })); Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { var lines = manifest.content.split("\n"); + console.log(test) var i = 0; var nextLinesMatch = function(expectedList) { diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js new file mode 100644 index 0000000000..e3fc47a40f --- /dev/null +++ b/packages/appcache/appcache_tests-server.js @@ -0,0 +1,10 @@ +// For our testing purpose, we don't want the cache manifest to be active, all +// we want is the cache manifest to be manually request-able so we can read it +// and verify its validity from the client. +// This is because caching the test files would make tests non deterministic +// depending on the state of the browser cache. +// Do do that we disable the "manifest" attribute of the tag. + +WebApp.addHtmlAttributeHook(function (request) { + return { manifest: "" }; +}); diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 6309c41135..3792b2e62d 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -16,7 +16,11 @@ Package.onUse(function (api) { Package.onTest(function (api) { api.use('tinytest'); api.use('appcache'); + + api.use('webapp', 'server'); + api.addFiles('appcache_tests-server.js', 'server'); + api.use('underscore', 'client'); api.use('http', 'client'); - api.addFiles('appcache_tests.js', 'client'); + api.addFiles('appcache_tests-client.js', 'client'); }); From 87e3b14a8a61ab03cd7e8e872d010b489c317986 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 3 Oct 2014 00:34:09 +0200 Subject: [PATCH 019/283] Improve appcache tests + Verify manifest content-type + Verify all lines validity with regular expressions --- packages/appcache/appcache_tests-client.js | 92 +++++++++++++++++----- packages/appcache/appcache_tests-server.js | 10 +++ 2 files changed, 84 insertions(+), 18 deletions(-) diff --git a/packages/appcache/appcache_tests-client.js b/packages/appcache/appcache_tests-client.js index 38661b87cb..60e286a515 100644 --- a/packages/appcache/appcache_tests-client.js +++ b/packages/appcache/appcache_tests-client.js @@ -1,36 +1,92 @@ -var manifestURL = '/app.manifest'; +var manifestUrl = '/app.manifest'; + +var pathRegex = '[a-z0-9_@\\-^:\\?!#$%&+={}/\\[\\]\\.]+'; +var versionRegex = '[a-z0-9]+'; var appcacheTest = function(cb) { return function(test, next) { - HTTP.get(manifestURL, function (err, res) { - cb(test, res); + HTTP.get(manifestUrl, function (err, res) { + if (err) { + test.fail(err); + } else { + cb(test, res); + } next(); }); }; }; Tinytest.addAsync('appcache - presence', appcacheTest(function(test, manifest) { - console.log(manifest) test.equal(manifest.statusCode, 200, 'manifest not served'); })); -Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { - var lines = manifest.content.split("\n"); - console.log(test) - var i = 0; +Tinytest.addAsync('appcache - content type', + appcacheTest(function(test, manifest) { + test.equal(manifest.headers['content-type'], 'text/cache-manifest'); +})); - var nextLinesMatch = function(expectedList) { - _.each(expectedList, function(expected) { - var testFunc = _.isRegExp(expected) ? "matches" : "equal"; - test[testFunc](lines[i++], expected); +Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { + var lines = manifest.content.split('\n'); + var i = 0; + var currentRegex = null, line = null; + + var nextLine = function() { + return lines[i++]; + } + + var eof = function() { + return i >= lines.length; + } + + var nextLineMatches = function(expected, n) { + n = n || 1; + _.times(n, function() { + var testFunc = _.isRegExp(expected) ? 'matches' : 'equal'; + test[testFunc](nextLine(), expected); }); }; + var regExpConstructor = function(/* arguments */) { + var parts = ['^'].concat(_.toArray(arguments)).concat(['$']); + return new RegExp(parts.join(''), 'i'); + }; + // Verify header validity - nextLinesMatch([ - "CACHE MANIFEST", - "", - /^#\s[0-9a-f]+$/, - /^#\s[0-9a-f]+$/, - ]); + nextLineMatches('CACHE MANIFEST'); + nextLineMatches(''); + nextLineMatches(regExpConstructor('# ', versionRegex), 2); + + + // Verify body validity + while (! eof()) { + line = nextLine(); + + // There are three distinct sections: 'CACHE', 'FALLBACK', and 'NETWORK'. + // A section start with its name suffixed by a colon. When we read a new + // section header, we update the currentRegex expression for the next lines + // of the section. + // XXX There is also a 'SETTINGS' section, not used by this package. + if (line === 'CACHE:' || line === 'NETWORK:') + currentRegex = regExpConstructor(pathRegex); + + else if (line === 'FALLBACK:') + currentRegex = regExpConstructor(pathRegex, ' ', pathRegex); + + // Blank lines and lines starting with a `#` (comments) are valid + else if (line == '' || line.match(/^#.+/)) + continue; + + // Outside sections, only blanks lines and comments are valid + else if (currentRegex === null) + test.fail('Invalid line ' + i + ': ' + line); + + // Inside a section, a star is a valid expression + else if (line === '*') + continue; + + // If it is not a blank line, not a comment, and not a header it must + // match the current section format + else + test.matches(line, currentRegex, 'line ' + i); + } })); diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js index e3fc47a40f..a66dbdccb6 100644 --- a/packages/appcache/appcache_tests-server.js +++ b/packages/appcache/appcache_tests-server.js @@ -8,3 +8,13 @@ WebApp.addHtmlAttributeHook(function (request) { return { manifest: "" }; }); + + +// Let's add some file in the 'ONLINE' section +Meteor.AppCache.config({ + onlineOnly: [ + '/online/', + '/bigimage.jpg', + '/largedata.json' + ] +}); From 9e6568a3e1e5cbfa0bec70c9efa81579470af202 Mon Sep 17 00:00:00 2001 From: Gaelan Date: Sun, 28 Sep 2014 11:17:45 -0700 Subject: [PATCH 020/283] Fix clientHash call in appcache. Appcache was broken because it output the *function* WebApp.clientHash instead of its return value. --- packages/appcache/appcache-server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/appcache/appcache-server.js b/packages/appcache/appcache-server.js index 4d26d2ebce..cefb35e4bd 100644 --- a/packages/appcache/appcache-server.js +++ b/packages/appcache/appcache-server.js @@ -71,7 +71,7 @@ WebApp.connectHandlers.use(function(req, res, next) { // So to ensure that the client updates if client resources change, // include a hash of client resources in the manifest. - manifest += "# " + WebApp.clientHash + "\n"; + manifest += "# " + WebApp.clientHash() + "\n"; // When using the autoupdate package, also include // AUTOUPDATE_VERSION. Otherwise the client will get into an @@ -81,7 +81,7 @@ WebApp.connectHandlers.use(function(req, res, next) { if (Package.autoupdate) { var version = Package.autoupdate.Autoupdate.autoupdateVersion; - if (version !== WebApp.clientHash) + if (version !== WebApp.clientHash()) manifest += "# " + version + "\n"; } From ddc4bc744261ab696df8cdae0ea0341406963813 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 4 Oct 2014 18:29:27 +0200 Subject: [PATCH 021/283] Complete the appcache test suite * Add a test to verify section header unicity * Add a test to verify NETWORK section content * Simplify the regular expressions used in the manifest content test. --- packages/appcache/appcache_tests-client.js | 96 ++++++++++++++++------ packages/appcache/appcache_tests-server.js | 2 +- packages/appcache/package.js | 6 +- 3 files changed, 74 insertions(+), 30 deletions(-) diff --git a/packages/appcache/appcache_tests-client.js b/packages/appcache/appcache_tests-client.js index 60e286a515..f47947008f 100644 --- a/packages/appcache/appcache_tests-client.js +++ b/packages/appcache/appcache_tests-client.js @@ -1,10 +1,7 @@ var manifestUrl = '/app.manifest'; -var pathRegex = '[a-z0-9_@\\-^:\\?!#$%&+={}/\\[\\]\\.]+'; -var versionRegex = '[a-z0-9]+'; - -var appcacheTest = function(cb) { - return function(test, next) { +var appcacheTest = function(name, cb) { + Tinytest.addAsync('appcache - ' + name, function(test, next) { HTTP.get(manifestUrl, function (err, res) { if (err) { test.fail(err); @@ -13,30 +10,50 @@ var appcacheTest = function(cb) { } next(); }); - }; + }); }; -Tinytest.addAsync('appcache - presence', appcacheTest(function(test, manifest) { + +// Verify that the code status of the HTTP response is "OK" +appcacheTest('presence', function(test, manifest) { test.equal(manifest.statusCode, 200, 'manifest not served'); -})); +}); -Tinytest.addAsync('appcache - content type', - appcacheTest(function(test, manifest) { - test.equal(manifest.headers['content-type'], 'text/cache-manifest'); -})); -Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { +// Verify the content-type HTTP header +appcacheTest('content type', function(test, manifest) { + test.equal(manifest.headers['content-type'], 'text/cache-manifest'); +}); + + +// Verify that each section header is only set once. +appcacheTest('sections unicity', function(test, manifest) { + var content = manifest.content; + var sectionHeaders = ['CACHE:', 'NETWORK:', 'FALLBACK:', 'SETTINGS']; + _.each(sectionHeaders, function(sectionHeader) { + var globalSearch = new RegExp(sectionHeader, "g"); + var matches = content.match(globalSearch) || []; + test.isTrue(matches.length <= 1, sectionHeader + ' is set twice'); + }); +}); + + +// Verify the content of the header and of each section of the manifest using +// regular expressions. Regular expressions matches malformed URIs but that's +// not what we're trying to catch here (the user is free to add its own content +// in the manifest -- even malformed). +appcacheTest('sections validity', function(test, manifest) { var lines = manifest.content.split('\n'); var i = 0; var currentRegex = null, line = null; var nextLine = function() { return lines[i++]; - } + }; var eof = function() { return i >= lines.length; - } + }; var nextLineMatches = function(expected, n) { n = n || 1; @@ -46,15 +63,10 @@ Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { }); }; - var regExpConstructor = function(/* arguments */) { - var parts = ['^'].concat(_.toArray(arguments)).concat(['$']); - return new RegExp(parts.join(''), 'i'); - }; - // Verify header validity nextLineMatches('CACHE MANIFEST'); nextLineMatches(''); - nextLineMatches(regExpConstructor('# ', versionRegex), 2); + nextLineMatches(/^# [a-z0-9]+$/i, 2); // Verify body validity @@ -65,12 +77,13 @@ Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { // A section start with its name suffixed by a colon. When we read a new // section header, we update the currentRegex expression for the next lines // of the section. - // XXX There is also a 'SETTINGS' section, not used by this package. + // XXX There is also a 'SETTINGS' section, not used by this package. If this + // section is used, the test will fail. if (line === 'CACHE:' || line === 'NETWORK:') - currentRegex = regExpConstructor(pathRegex); + currentRegex = /^\S+$/; else if (line === 'FALLBACK:') - currentRegex = regExpConstructor(pathRegex, ' ', pathRegex); + currentRegex = /^\S+ \S+$/; // Blank lines and lines starting with a `#` (comments) are valid else if (line == '' || line.match(/^#.+/)) @@ -89,4 +102,37 @@ Tinytest.addAsync('appcache - validity', appcacheTest(function(test, manifest) { else test.matches(line, currentRegex, 'line ' + i); } -})); +}); + + +// Verify that resources declared on the server with the `onlineOnly` parameter +// are present in the network section of the manifest. The `appcache` package +// also automatically add the manifest (`app.manifest`) add the star symbol to +// this list and therefore we also check the presence of these two elements. +appcacheTest('network section content', function(test, manifest) { + var shouldBePresentInNetworkSection = [ + "/app.manifest", + "/online/", + "/bigimage.jpg", + "/largedata.json", + "*" + ]; + var lines = manifest.content.split('\n'); + var startNetworkSection = lines.indexOf('NETWORK:'); + + // We search the end of the 'NETWORK:' section by looking at the beginning + // of any potential other section. By default we set this value to + // `lines.length - 1` which is the index of the last line. + var otherSections = ['CACHE:', 'FALLBACK:', 'SETTINGS']; + var endNetworkSection = _.reduce(otherSections, function(min, sectionName) { + var position = lines.indexOf(sectionName); + return position > startNetworkSection && position < min ? position : min; + }, lines.length - 1); + + // We remove the first line because it's the 'NETWORK:' header line. + var networkLines = lines.slice(startNetworkSection + 1, endNetworkSection); + + _.each(shouldBePresentInNetworkSection, function(item) { + test.include(networkLines, item); + }); +}); diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js index a66dbdccb6..fdd3772406 100644 --- a/packages/appcache/appcache_tests-server.js +++ b/packages/appcache/appcache_tests-server.js @@ -10,7 +10,7 @@ WebApp.addHtmlAttributeHook(function (request) { }); -// Let's add some file in the 'ONLINE' section +// Let's add some ressources in the 'NETWORK' section Meteor.AppCache.config({ onlineOnly: [ '/online/', diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 3792b2e62d..0a9989eccd 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -16,11 +16,9 @@ Package.onUse(function (api) { Package.onTest(function (api) { api.use('tinytest'); api.use('appcache'); - + api.use('http', 'client'); + api.use('underscore', 'client'); api.use('webapp', 'server'); api.addFiles('appcache_tests-server.js', 'server'); - - api.use('underscore', 'client'); - api.use('http', 'client'); api.addFiles('appcache_tests-client.js', 'client'); }); From ee65d216992bca5f01a00208161d27d582464894 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Mon, 6 Oct 2014 23:08:05 -0700 Subject: [PATCH 022/283] Run appcache size check after user code has had a chance to run. This way the size check takes calls to Meteor.AppCache.config() into account, so users can remove files from the cache and get rid of the warning. Also, add an internal option to totally disable the warning and use it in tests. --- packages/appcache/appcache-server.js | 16 +++++++++++++++- packages/appcache/appcache_tests-server.js | 18 ++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/packages/appcache/appcache-server.js b/packages/appcache/appcache-server.js index cefb35e4bd..93ad30bb83 100644 --- a/packages/appcache/appcache-server.js +++ b/packages/appcache/appcache-server.js @@ -2,6 +2,8 @@ var crypto = Npm.require('crypto'); var fs = Npm.require('fs'); var path = Npm.require('path'); +var _disableSizeCheck = false; + Meteor.AppCache = { config: function(options) { _.each(options, function (value, option) { @@ -16,6 +18,10 @@ Meteor.AppCache = { RoutePolicy.declare(urlPrefix, 'static-online'); }); } + // option to suppress warnings for tests. + else if (option === '_disableSizeCheck') { + _disableSizeCheck = value; + } else if (value === false) { disabledBrowsers[option] = true; } @@ -173,4 +179,12 @@ var sizeCheck = function() { } }; -sizeCheck(); +// Run the size check after user code has had a chance to run. That way, +// the size check can take into account files that the user does not +// want cached. Otherwise, the size check warning will still print even +// if the user excludes their large files with +// `Meteor.AppCache.config({onlineOnly: files})`. +Meteor.startup(function() { + if (! _disableSizeCheck) + sizeCheck(); +}); diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js index fdd3772406..b4398cb9a1 100644 --- a/packages/appcache/appcache_tests-server.js +++ b/packages/appcache/appcache_tests-server.js @@ -1,10 +1,11 @@ -// For our testing purpose, we don't want the cache manifest to be active, all -// we want is the cache manifest to be manually request-able so we can read it -// and verify its validity from the client. -// This is because caching the test files would make tests non deterministic -// depending on the state of the browser cache. -// Do do that we disable the "manifest" attribute of the tag. - +// For our testing purpose, we don't want the cache manifest to be +// active, all we want is the cache manifest to be manually request-able +// so we can read it and verify its validity from the client. This is +// because caching the test files would make tests non deterministic +// depending on the state of the browser cache. To do that we disable +// the "manifest" attribute of the tag. This runs after appcache +// registers its hook, so this hook overrides the return value of the +// real hook. WebApp.addHtmlAttributeHook(function (request) { return { manifest: "" }; }); @@ -16,5 +17,6 @@ Meteor.AppCache.config({ '/online/', '/bigimage.jpg', '/largedata.json' - ] + ], + _disableSizeCheck: true // don't print warnings }); From c969263299f43c00af4eee8902e6fe372ec32d95 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Mon, 6 Oct 2014 23:54:42 -0700 Subject: [PATCH 023/283] Point to a non-existent file when testing to clear appcache properly. --- packages/appcache/appcache_tests-server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js index b4398cb9a1..6632db9513 100644 --- a/packages/appcache/appcache_tests-server.js +++ b/packages/appcache/appcache_tests-server.js @@ -5,9 +5,11 @@ // depending on the state of the browser cache. To do that we disable // the "manifest" attribute of the tag. This runs after appcache // registers its hook, so this hook overrides the return value of the -// real hook. +// real hook. We point to a non-existent file to clear the appcache in +// case there was previously a site running with appcache on +// localhost:3000. WebApp.addHtmlAttributeHook(function (request) { - return { manifest: "" }; + return { manifest: "/no-such-file" }; }); From afc45d8386eb3b9dabde3cc40c3a19ba49efd066 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 7 Oct 2014 13:34:38 -0700 Subject: [PATCH 024/283] Add space between `function` and `(` per style guide. No functional changes. --- packages/appcache/appcache-client.js | 6 ++--- packages/appcache/appcache-server.js | 10 ++++---- packages/appcache/appcache_tests-client.js | 28 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/appcache/appcache-client.js b/packages/appcache/appcache-client.js index 1b7297d3aa..bc26714c45 100644 --- a/packages/appcache/appcache-client.js +++ b/packages/appcache/appcache-client.js @@ -13,7 +13,7 @@ var updatingAppcache = false; var reloadRetry = null; var appcacheUpdated = false; -Reload._onMigrate('appcache', function(retry) { +Reload._onMigrate('appcache', function (retry) { if (appcacheUpdated) return [true]; @@ -40,7 +40,7 @@ Reload._onMigrate('appcache', function(retry) { // If we're migrating and the app cache is now up to date, signal that // we're now ready to migrate. -var cacheIsNowUpToDate = function() { +var cacheIsNowUpToDate = function () { if (!updatingAppcache) return; appcacheUpdated = true; @@ -55,7 +55,7 @@ window.applicationCache.addEventListener('noupdate', cacheIsNowUpToDate, false); // cache has now been disabled or the appcache package removed. // Reload to get the new non-cached code. -window.applicationCache.addEventListener('obsolete', (function() { +window.applicationCache.addEventListener('obsolete', (function () { if (reloadRetry) { cacheIsNowUpToDate(); } else { diff --git a/packages/appcache/appcache-server.js b/packages/appcache/appcache-server.js index 93ad30bb83..0323298df3 100644 --- a/packages/appcache/appcache-server.js +++ b/packages/appcache/appcache-server.js @@ -5,7 +5,7 @@ var path = Npm.require('path'); var _disableSizeCheck = false; Meteor.AppCache = { - config: function(options) { + config: function (options) { _.each(options, function (value, option) { if (option === 'browsers') { disabledBrowsers = {}; @@ -35,7 +35,7 @@ Meteor.AppCache = { }; var disabledBrowsers = {}; -var browserDisabled = function(request) { +var browserDisabled = function (request) { return disabledBrowsers[request.browser.name]; }; @@ -46,7 +46,7 @@ WebApp.addHtmlAttributeHook(function (request) { return { manifest: "/app.manifest" }; }); -WebApp.connectHandlers.use(function(req, res, next) { +WebApp.connectHandlers.use(function (req, res, next) { if (req.url !== '/app.manifest') { return next(); } @@ -158,7 +158,7 @@ WebApp.connectHandlers.use(function(req, res, next) { return res.end(body); }); -var sizeCheck = function() { +var sizeCheck = function () { var totalSize = 0; _.each(WebApp.clientPrograms[WebApp.defaultArch].manifest, function (resource) { if (resource.where === 'client' && @@ -184,7 +184,7 @@ var sizeCheck = function() { // want cached. Otherwise, the size check warning will still print even // if the user excludes their large files with // `Meteor.AppCache.config({onlineOnly: files})`. -Meteor.startup(function() { +Meteor.startup(function () { if (! _disableSizeCheck) sizeCheck(); }); diff --git a/packages/appcache/appcache_tests-client.js b/packages/appcache/appcache_tests-client.js index f47947008f..9ea50dec93 100644 --- a/packages/appcache/appcache_tests-client.js +++ b/packages/appcache/appcache_tests-client.js @@ -1,7 +1,7 @@ var manifestUrl = '/app.manifest'; -var appcacheTest = function(name, cb) { - Tinytest.addAsync('appcache - ' + name, function(test, next) { +var appcacheTest = function (name, cb) { + Tinytest.addAsync('appcache - ' + name, function (test, next) { HTTP.get(manifestUrl, function (err, res) { if (err) { test.fail(err); @@ -15,22 +15,22 @@ var appcacheTest = function(name, cb) { // Verify that the code status of the HTTP response is "OK" -appcacheTest('presence', function(test, manifest) { +appcacheTest('presence', function (test, manifest) { test.equal(manifest.statusCode, 200, 'manifest not served'); }); // Verify the content-type HTTP header -appcacheTest('content type', function(test, manifest) { +appcacheTest('content type', function (test, manifest) { test.equal(manifest.headers['content-type'], 'text/cache-manifest'); }); // Verify that each section header is only set once. -appcacheTest('sections unicity', function(test, manifest) { +appcacheTest('sections unicity', function (test, manifest) { var content = manifest.content; var sectionHeaders = ['CACHE:', 'NETWORK:', 'FALLBACK:', 'SETTINGS']; - _.each(sectionHeaders, function(sectionHeader) { + _.each(sectionHeaders, function (sectionHeader) { var globalSearch = new RegExp(sectionHeader, "g"); var matches = content.match(globalSearch) || []; test.isTrue(matches.length <= 1, sectionHeader + ' is set twice'); @@ -42,22 +42,22 @@ appcacheTest('sections unicity', function(test, manifest) { // regular expressions. Regular expressions matches malformed URIs but that's // not what we're trying to catch here (the user is free to add its own content // in the manifest -- even malformed). -appcacheTest('sections validity', function(test, manifest) { +appcacheTest('sections validity', function (test, manifest) { var lines = manifest.content.split('\n'); var i = 0; var currentRegex = null, line = null; - var nextLine = function() { + var nextLine = function () { return lines[i++]; }; - var eof = function() { + var eof = function () { return i >= lines.length; }; - var nextLineMatches = function(expected, n) { + var nextLineMatches = function (expected, n) { n = n || 1; - _.times(n, function() { + _.times(n, function () { var testFunc = _.isRegExp(expected) ? 'matches' : 'equal'; test[testFunc](nextLine(), expected); }); @@ -109,7 +109,7 @@ appcacheTest('sections validity', function(test, manifest) { // are present in the network section of the manifest. The `appcache` package // also automatically add the manifest (`app.manifest`) add the star symbol to // this list and therefore we also check the presence of these two elements. -appcacheTest('network section content', function(test, manifest) { +appcacheTest('network section content', function (test, manifest) { var shouldBePresentInNetworkSection = [ "/app.manifest", "/online/", @@ -124,7 +124,7 @@ appcacheTest('network section content', function(test, manifest) { // of any potential other section. By default we set this value to // `lines.length - 1` which is the index of the last line. var otherSections = ['CACHE:', 'FALLBACK:', 'SETTINGS']; - var endNetworkSection = _.reduce(otherSections, function(min, sectionName) { + var endNetworkSection = _.reduce(otherSections, function (min, sectionName) { var position = lines.indexOf(sectionName); return position > startNetworkSection && position < min ? position : min; }, lines.length - 1); @@ -132,7 +132,7 @@ appcacheTest('network section content', function(test, manifest) { // We remove the first line because it's the 'NETWORK:' header line. var networkLines = lines.slice(startNetworkSection + 1, endNetworkSection); - _.each(shouldBePresentInNetworkSection, function(item) { + _.each(shouldBePresentInNetworkSection, function (item) { test.include(networkLines, item); }); }); From 8014a6be52af883bf683160852076f805135f195 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 7 Oct 2014 13:37:26 -0700 Subject: [PATCH 025/283] comments and naming per review. --- packages/appcache/appcache_tests-client.js | 2 +- packages/appcache/appcache_tests-server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/appcache/appcache_tests-client.js b/packages/appcache/appcache_tests-client.js index 9ea50dec93..0bfda87cc5 100644 --- a/packages/appcache/appcache_tests-client.js +++ b/packages/appcache/appcache_tests-client.js @@ -27,7 +27,7 @@ appcacheTest('content type', function (test, manifest) { // Verify that each section header is only set once. -appcacheTest('sections unicity', function (test, manifest) { +appcacheTest('sections uniqueness', function (test, manifest) { var content = manifest.content; var sectionHeaders = ['CACHE:', 'NETWORK:', 'FALLBACK:', 'SETTINGS']; _.each(sectionHeaders, function (sectionHeader) { diff --git a/packages/appcache/appcache_tests-server.js b/packages/appcache/appcache_tests-server.js index 6632db9513..ffcf1e0994 100644 --- a/packages/appcache/appcache_tests-server.js +++ b/packages/appcache/appcache_tests-server.js @@ -13,7 +13,7 @@ WebApp.addHtmlAttributeHook(function (request) { }); -// Let's add some ressources in the 'NETWORK' section +// Let's add some resources in the 'NETWORK' section Meteor.AppCache.config({ onlineOnly: [ '/online/', From e25670c9c5e94ac761a28e98ad5ebc353aafd047 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 7 Oct 2014 13:43:18 -0700 Subject: [PATCH 026/283] also check for missing section headers. --- packages/appcache/appcache_tests-client.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/appcache/appcache_tests-client.js b/packages/appcache/appcache_tests-client.js index 0bfda87cc5..fe3e6a25c1 100644 --- a/packages/appcache/appcache_tests-client.js +++ b/packages/appcache/appcache_tests-client.js @@ -29,12 +29,17 @@ appcacheTest('content type', function (test, manifest) { // Verify that each section header is only set once. appcacheTest('sections uniqueness', function (test, manifest) { var content = manifest.content; - var sectionHeaders = ['CACHE:', 'NETWORK:', 'FALLBACK:', 'SETTINGS']; - _.each(sectionHeaders, function (sectionHeader) { - var globalSearch = new RegExp(sectionHeader, "g"); - var matches = content.match(globalSearch) || []; - test.isTrue(matches.length <= 1, sectionHeader + ' is set twice'); - }); + var mandatorySectionHeaders = ['CACHE:', 'NETWORK:', 'FALLBACK:']; + var optionalSectionHeaders = ['SETTINGS']; + _.each(_.union(mandatorySectionHeaders, optionalSectionHeaders), + function (sectionHeader) { + var globalSearch = new RegExp(sectionHeader, "g"); + var matches = content.match(globalSearch) || []; + test.isTrue(matches.length <= 1, sectionHeader + ' is set twice'); + if (_.contains(mandatorySectionHeaders, sectionHeader)) { + test.isTrue(matches.length == 1, sectionHeader + ' is not set'); + } + }); }); From d83002cd64f422e8a10b1a67c6309a8ee88fc3a2 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 14:15:42 -0700 Subject: [PATCH 027/283] We need a JDK, not a JVM For jarsigner, needed to sign an app for the Play Store --- tools/commands-cordova.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 6f5842fba4..6e054d3788 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1107,7 +1107,7 @@ var checkAgreePlatformTerms = function (platform, name) { }; var checkPlatformRequirements = function (platform, options) { - options = _.extend({fix: false, log: false}, options); + options = _.extend({log: false, fix: false, fixConsole: false}, options); if (platform == 'android') { return Android.checkRequirements(options); } else if (platform == 'ios') { @@ -1893,6 +1893,16 @@ _.extend(Android.prototype, { } }, + hasJdk: function () { + var self = this; + + if (Host.isMac()) { + return files.statOrNull('/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK') != null; + } else { + return !!Host.which('jarsigner'); + } + }, + installJava: function () { var self = this; @@ -1944,6 +1954,12 @@ _.extend(Android.prototype, { throw new Error("Cannot automatically install Java on host: " + Host.getName()); }, + installJdk: function () { + var self = this; + + throw new Error("Cannot automatically install JDK on host: " + Host.getName()); + }, + hasAndroidBundle: function () { var self = this; @@ -2038,13 +2054,13 @@ _.extend(Android.prototype, { var result = { acceptable: true, missing: [] }; - if (self.hasJava()) { - log && Console.info(Console.success("Java is installed")); + if (self.hasJdk()) { + log && Console.info(Console.success("A JDK is installed")); } else { - log && Console.info(Console.fail("Java is not installed")); + log && Console.info(Console.fail("A JDK is not installed")); if (fix) { - self.installJava(); + self.installJdk(); } else { result.missing.push("jdk"); result.acceptable = false; From 74101370771ab4b0bc4606dd6e7fbf3e91e044b8 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 14:21:28 -0700 Subject: [PATCH 028/283] The android tool requires Java --- tools/commands-cordova.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 6e054d3788..db038a51bb 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2054,13 +2054,16 @@ _.extend(Android.prototype, { var result = { acceptable: true, missing: [] }; + var hasJava = false; if (self.hasJdk()) { log && Console.info(Console.success("A JDK is installed")); + hasJava = true; } else { log && Console.info(Console.fail("A JDK is not installed")); if (fix) { self.installJdk(); + hasJava = true; } else { result.missing.push("jdk"); result.acceptable = false; @@ -2103,7 +2106,7 @@ _.extend(Android.prototype, { } } - if (hasAndroid) { + if (hasAndroid && hasJava) { if (self.hasTarget('19', 'default/x86')) { log && Console.info(Console.success("Found suitable Android API libraries")); } else { From 85a11d7ff9f27014984bb80b69941cb21dd6b17f Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 14:35:29 -0700 Subject: [PATCH 029/283] Kill iOS simulator every time phonegap shell is redeployed Fixes the "black screen" problem that users often see. --- tools/commands-cordova.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index db038a51bb..c4caeccac5 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -854,10 +854,17 @@ _.extend(CordovaRunner.prototype, { var self = this; // android, not android-device - if (self.platformName == 'android') { + if (self.platformName === 'android') { Android.waitForEmulator(); } + if (self.platformName === 'ios') { + // Kill the running simulator before starting one to avoid a black-screen + // bug that happens when you deploy an app to emulator while it is running + // a previous version of it. + IOS.killSimulator(); + } + execCordovaOnPlatform(self.localPath, self.platformName, self.options); @@ -1639,6 +1646,11 @@ _.extend(IOS.prototype, { }); return result; + }, + + killSimulator: function () { + var execFileSync = require('./utils.js').execFileSync; + execFileSync('killall', ['iOS Simulator']); } }); From 18f36bd3c4993f1e87ce3f143a94b872fbf88b14 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Tue, 7 Oct 2014 14:48:04 -0700 Subject: [PATCH 030/283] Add README for publishing mobile apps on `meteor build` 1. Add README files for both the ios/ and android/ subdirectories of a build directory linking to a Wiki page with instructions on how to go through the publish process for both app stores. 2. To make the README file more visible in iOS projects, and to make the ios directory tree mirror the android one, place what used to go in /ios/ into /ios/project/. /ios/ now only contains the README file. --- tools/commands.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/commands.js b/tools/commands.js index 12e6148464..7072220bbd 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -746,11 +746,21 @@ var buildCommand = function (options) { var platformPath = path.join(outputPath, platformName); if (platformName === 'ios') { - files.cp_r(buildPath, platformPath); + files.cp_r(buildPath, path.join(platformPath, 'project')); + fs.writeFileSync( + path.join(platformPath, 'README'), + "Instructions for publishing your iOS app to App Store can be found at:\n" + + "https://github.com/meteor/meteor/wiki/How-to-submit-your-iOS-app-to-App-Store\n", + "utf8"); } else if (platformName === 'android') { files.cp_r(buildPath, path.join(platformPath, 'project')); var apkPath = findApkPath(path.join(buildPath, 'ant-build')); files.copyFile(apkPath, path.join(platformPath, 'unaligned.apk')); + fs.writeFileSync( + path.join(platformPath, 'README'), + "Instructions for publishing your Android app to Play Store can be found at:\n" + + "https://github.com/meteor/meteor/wiki/How-to-submit-your-Android-app-to-Play-Store\n", + "utf8"); } }); From d9b91417c06baefb82e3bc5bc4dffe43bf628a25 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 15:04:07 -0700 Subject: [PATCH 031/283] Install android bundle first, so the not-installed messages appear at the bottom --- tools/commands-cordova.js | 50 +++++++++++-------- .../cordova-scripts/ensure_android_bundle.sh | 2 +- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index c4caeccac5..16e563b6f4 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1114,7 +1114,7 @@ var checkAgreePlatformTerms = function (platform, name) { }; var checkPlatformRequirements = function (platform, options) { - options = _.extend({log: false, fix: false, fixConsole: false}, options); + options = _.extend({log: false, fix: false, fixConsole: false, fixSilent: false}, options); if (platform == 'android') { return Android.checkRequirements(options); } else if (platform == 'ios') { @@ -2063,9 +2063,35 @@ _.extend(Android.prototype, { var log = !!options.log; var fix = !!options.fix; var fixConsole = !!options.fixConsole; + var fixSilent = !!options.fixSilent; + + // fix => fixConsole + if (fix) { + fixConsole = true; + } + // fixConsole => fixSilent + if (fixConsole) { + fixSilent = true; + } var result = { acceptable: true, missing: [] }; + var hasAndroid = false; + if (self.hasAndroidBundle()) { + log && Console.info(Console.success("Found Android bundle")); + hasAndroid = true; + } else { + log && Console.info(Console.fail("Android bundle not found")); + + if (fixConsole) { + self.installAndroidBundle(); + hasAndroid = true; + } else { + result.missing.push("android-bundle"); + result.acceptable = false; + } + } + var hasJava = false; if (self.hasJdk()) { log && Console.info(Console.success("A JDK is installed")); @@ -2102,29 +2128,13 @@ _.extend(Android.prototype, { log && Console.info(Console.success("Android emulator acceleration is installed")); } - var hasAndroid = false; - if (self.hasAndroidBundle()) { - log && Console.info(Console.success("Found Android bundle")); - hasAndroid = true; - } else { - log && Console.info(Console.fail("Android bundle not found")); - - if (fix || fixConsole) { - self.installAndroidBundle(); - hasAndroid = true; - } else { - result.missing.push("android-bundle"); - result.acceptable = false; - } - } - if (hasAndroid && hasJava) { if (self.hasTarget('19', 'default/x86')) { log && Console.info(Console.success("Found suitable Android API libraries")); } else { log && Console.info(Console.fail("Suitable Android API libraries not found")); - if (fix || fixConsole) { + if (fixSilent) { self.installTarget('sys-img-x86-android-19'); } else { result.missing.push("android-sys-img"); @@ -2138,7 +2148,7 @@ _.extend(Android.prototype, { } else { log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); - if (fix || fixConsole) { + if (fixSilent) { var avdOptions = {}; self.createAvd(avdName, avdOptions); Console.info(Console.success("Created android virtual device (AVD): " + avdName)); @@ -2358,7 +2368,7 @@ main.registerCommand({ return 1; } - var installed = checkPlatformRequirements(platform, { log:true, fix: false, fixConsole: true } ); + var installed = checkPlatformRequirements(platform, { log:true, fix: false, fixConsole: true, fixSilent: true } ); if (!installed.acceptable) { Console.warn("Platform requirements not yet met"); diff --git a/tools/cordova-scripts/ensure_android_bundle.sh b/tools/cordova-scripts/ensure_android_bundle.sh index 22312b0bbb..31bbfd6df2 100755 --- a/tools/cordova-scripts/ensure_android_bundle.sh +++ b/tools/cordova-scripts/ensure_android_bundle.sh @@ -15,7 +15,7 @@ fi # import all the environment source "$(dirname "$0")/common_env.sh" -"$(dirname "$0")/ensure_android_prereqs.sh" +#"$(dirname "$0")/ensure_android_prereqs.sh" cd "$ORIG_DIR" From 0c641fd7b3c218a0a2e254ee84e2583b1b713df8 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Tue, 7 Oct 2014 15:09:33 -0700 Subject: [PATCH 032/283] =?UTF-8?q?Improve=20output=20of=20`meteor=20self-?= =?UTF-8?q?test=20=E2=80=93=E2=80=93list`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/selftest.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index 7766274326..28023cc575 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1405,7 +1405,7 @@ var define = function (name, tagsList, f) { var tagDescriptions = { checkout: 'can only run from checkouts', net: 'require an internet connection', - slow: 'take quite a long time', + slow: 'take quite a long time; use --slow to include', // these last two are pseudo-tags, assigned to tests when you specify // --changed or a regex pattern unchanged: 'unchanged since last pass', @@ -1564,11 +1564,17 @@ var listTests = function (options) { return; } - _.each(_.sortBy(testList.filteredTests, 'file'), function (test) { - Console.stdout.write(test.file + ': ' + test.name + ' [' + - test.tags.join(' ') + ']'); + _.each(_.groupBy(testList.filteredTests, 'file'), function (tests, file) { + Console.stdout.write(file + ':\n'); + _.each(tests, function (test) { + Console.stdout.write(' - ' + test.name + + (test.tags.length ? ' [' + test.tags.join(' ') + ']' + : '')); + }); }); + Console.stdout.write('\n'); + Console.stderr.write(testList.filteredTests.length + " tests listed."); Console.stderr.write(testList.generateSkipReport()); }; From e32101edb159a45693ca60f418fcce73efdb21cf Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 15:11:59 -0700 Subject: [PATCH 033/283] For android splash screens, add a special attr in xml --- tools/commands-cordova.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 16e563b6f4..094d6161fe 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1393,6 +1393,21 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { files.mkdir_p(resourcesPath); verboseLog('Copying resources for mobile apps'); + + var imageXmlRec = function (name, width, height, src) { + var androidMatch = /.+(.?.dpi)-(landscape|portrait)/g.exec(name); + var xmlRec = { + src: src, + width: width, + height: height + }; + + // XXX special case for Android + if (androidMatch) + xmlRec.density = androidMatch[2].substr(0, 4) + '-' + androidMatch[1]; + + return xmlRec; + }; var setImages = function (sizes, xmlEle, tag) { _.each(sizes, function (size, name) { var width = size.split('x')[0]; @@ -1404,17 +1419,14 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { var extension = _.last(_.last(suppliedPath.split(path.sep)).split('.')); var fileName = name + '.' + tag + '.' + extension; + var src = path.join('resources', fileName); // copy the file to the build folder with a standardized name files.copyFile(path.join(project.rootDir, suppliedPath), path.join(resourcesPath, fileName)); // set it to the xml tree - xmlEle.ele(tag, { - src: path.join('resources', fileName), - width: width, - height: height - }); + xmlEle.ele(tag, imageXmlRec(name, width, height, src)); // XXX reuse one size for other dimensions var dups = { @@ -1432,11 +1444,9 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { _.each(dups, function (size) { width = size.split('x')[0]; height = size.split('x')[1]; - xmlEle.ele(tag, { - src: path.join('resources', fileName), - width: width, - height: height - }); + // XXX this is fine to not supply a name since it is always iOS, but + // this is a hack right now. + xmlEle.ele(tag, imageXmlRec('n/a', width, height, src)); }); }); }; From 5d2bd77d96e2b958b6bb7a4a5baa1dca104c12a3 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 7 Oct 2014 14:15:56 -0700 Subject: [PATCH 034/283] Add newline to error message --- tools/run-all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run-all.js b/tools/run-all.js index cb0aadf483..36a93c1ed5 100644 --- a/tools/run-all.js +++ b/tools/run-all.js @@ -373,7 +373,7 @@ exports.run = function (appDir, options) { process.stderr.write( "Your app has been updated to Meteor " + to + " from " + "Meteor " + from + ".\n" + -"Restart meteor to use the new release."); +"Restart meteor to use the new release.\n"); return 254; } From c99d7d42a6a2a5db95d26fae96032ac27f135573 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 15:19:34 -0700 Subject: [PATCH 035/283] Call utils.sleepMs(1); during package resolution This is a temporary fix; we should call it less often --- tools/catalog.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/catalog.js b/tools/catalog.js index ccd82a2964..f55f420336 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -327,6 +327,10 @@ _.extend(LayeredCatalog.prototype, { // doesn't have access to it. utils.Patience.nudge(); buildmessage.nudge(); + + // XXX: Call this more judiciously + // (I broke this when I removed Patience; need a quick fix for now) + utils.sleepMs(1); } }); }, From 4b1a781755b0f8c7497f351b8f81bf3e019f4459 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Tue, 7 Oct 2014 15:22:20 -0700 Subject: [PATCH 036/283] =?UTF-8?q?Support=20=E2=80=93=E2=80=93file=20opti?= =?UTF-8?q?on=20to=20self-test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/commands.js | 9 ++++++--- tools/selftest.js | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index d65cf193b3..954a6d8106 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1709,7 +1709,8 @@ main.registerCommand({ slow: { type: Boolean }, browserstack: { type: Boolean }, history: { type: Number }, - list: { type: Boolean } + list: { type: Boolean }, + file: { type: String } }, hidden: true }, function (options) { @@ -1743,7 +1744,8 @@ main.registerCommand({ onlyChanged: options.changed, offline: offline, includeSlowTests: options.slow, - testRegexp: testRegexp + testRegexp: testRegexp, + inFile: options.file }); return 0; @@ -1759,7 +1761,8 @@ main.registerCommand({ includeSlowTests: options.slow, historyLines: options.history, clients: clients, - testRegexp: testRegexp + testRegexp: testRegexp, + inFile: options.file }); }); diff --git a/tools/selftest.js b/tools/selftest.js index 28023cc575..40581acac8 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1409,7 +1409,8 @@ var tagDescriptions = { // these last two are pseudo-tags, assigned to tests when you specify // --changed or a regex pattern unchanged: 'unchanged since last pass', - 'non-matching': "don't match specified pattern" + 'non-matching': "don't match specified pattern", + 'in other files': "" }; var getFilteredTests = function (options) { @@ -1424,7 +1425,9 @@ var getFilteredTests = function (options) { allTests = allTests.map(function (test) { var newTags = []; - if (options.testRegexp && ! options.testRegexp.test(test.name)) { + if (options.inFile && test.file !== options.inFile) { + newTags.push('in other files'); + } else if (options.testRegexp && ! options.testRegexp.test(test.name)) { newTags.push('non-matching'); } else if (options.onlyChanged && test.fileHash === testState.lastPassedHashes[test.file]) { @@ -1441,6 +1444,9 @@ var getFilteredTests = function (options) { // (order of tags is significant to the "skip counts" that are displayed) var tagsToSkip = []; + if (options.inFile) { + tagsToSkip.push('in other files'); + } if (options.testRegexp) { tagsToSkip.push('non-matching'); } @@ -1528,9 +1534,14 @@ TestList.prototype.generateSkipReport = function () { _.each(self.skippedTags, function (tag) { var count = self.skipCounts[tag]; if (count) { - result += ("Skipped " + count + " " + tag + " test" + - (count > 1 ? "s" : "") + " (" + - tagDescriptions[tag] + ")\n"); + var noun = "test" + (count > 1 ? "s" : ""); // "test" or "tests" + // "non-matching tests" or "tests in other files" + var nounPhrase = (/ /.test(tag) ? + (noun + " " + tag) : (tag + " " + noun)); + // " (foo)" or "" + var parenthetical = (tagDescriptions[tag] ? " (" + + tagDescriptions[tag] + ")" : ''); + result += ("Skipped " + count + " " + nounPhrase + parenthetical + '\n'); } }); From c19e133b8b7cf61b045f7e4b0838da3ed0932e33 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Tue, 7 Oct 2014 15:26:15 -0700 Subject: [PATCH 037/283] Show progress bar when downloading a release prior to springboarding --- tools/main.js | 6 ++++++ tools/tropohouse.js | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/main.js b/tools/main.js index da1a2e00db..3d16cdf626 100644 --- a/tools/main.js +++ b/tools/main.js @@ -349,6 +349,9 @@ var springboard = function (rel, releaseOverride) { // XXX split better try { + Console.setPretty(true); + Console.enableProgressBar(true); + var messages = buildmessage.capture({ title: "Downloading tools package " + toolsPkg + "@" + toolsVersion }, function () { @@ -359,6 +362,9 @@ var springboard = function (rel, releaseOverride) { definitelyNotLocal: true }); }); + + Console.setPretty(false); + Console.enableProgressBar(false); } catch (err) { // We have failed to download the tool that we are supposed to springboard // to! That's bad. Let's exit. diff --git a/tools/tropohouse.js b/tools/tropohouse.js index 9f8d67dfbd..ac7538a11a 100644 --- a/tools/tropohouse.js +++ b/tools/tropohouse.js @@ -155,7 +155,7 @@ _.extend(exports.Tropohouse.prototype, { var url = buildRecord.build.url; - var progress = buildmessage.addChildTracker("Download build"); + var progress = buildmessage.addChildTracker("Downloading build"); try { buildmessage.capture({}, function () { var packageTarball = httpHelpers.getUrl({ @@ -253,7 +253,7 @@ _.extend(exports.Tropohouse.prototype, { } buildmessage.enterJob({ - title: " downloading " + packageName + " at version " + version + " ...", + title: " Installing " + packageName + "@" + version + "..." }, function() { var buildTempDirs = []; // If there's already a package in the tropohouse, start with it. From a22a5a3341cb8ddee720afe6ef137cfb557027be Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 7 Oct 2014 15:36:07 -0700 Subject: [PATCH 038/283] Update 'bundler.bundle' comment --- tools/bundler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/bundler.js b/tools/bundler.js index cdc2b89501..03a730018a 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -1841,9 +1841,11 @@ var writeSiteArchive = function (targets, outputPath, options) { * * Returns an object with keys: * - errors: A buildmessage.MessageSet, or falsy if bundling succeeded. - * - watchSet: Information about files and paths that were + * - serverWatchSet: Information about server files and paths that were * inputs into the bundle and that we may wish to monitor for * changes when developing interactively, as a watch.WatchSet. + * - clientWatchSet: Like 'serverWatchSet', but for client files + * - starManifest: The manifest of the outputted star * * On failure ('errors' is truthy), no bundle will be output (in fact, * outputPath will have been removed if it existed). From 14f452e7338c34fa32e36acd0bf580825b7a60b7 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 15:49:35 -0700 Subject: [PATCH 039/283] Oracle JDK 8 installs to yet another path --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 094d6161fe..ec1b3a1cfb 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1919,7 +1919,7 @@ _.extend(Android.prototype, { var self = this; if (Host.isMac()) { - return files.statOrNull('/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK') != null; + return files.statOrNull('/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/jarsigner') != null; } else { return !!Host.which('jarsigner'); } From e0414f2ed50f8a0336603b13c0d147a9438ed2d4 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 14:59:13 -0700 Subject: [PATCH 040/283] allow user to mark packages as debugOnly and not have them bundle in production mode (still outstanding: changes to package publication workflow) A package marked debugOnly in the package source is not to be bundled in production. Moreover, if a package/app depends on a debugOnly package, that entire tree should not be bundled. (But we should take it into account when figuring out versions!) Does the following: - In the catalog, we have a function that takes in a set of versions and a set of original constraints and traverses it, recursively, to build a subset of versions that we *should* bundle, and the corresponding subset of versions that we shouldn't (because they are either debugOnly themselves or pulled in by debugOnly packages). (We do this in the catalog because it is an addon onto the results of the constraint solver, tied deeply into our representation of data) - In the packageLoader, we keep track packages & versions that we should bundle, and also, packages that we should exclude. We do this in the package-loader because, essentially, that's the object that we use to keep the results of the constraint-solver, and we already propagate it to all functions that care about it. (Possibly we should subsequently rename it later). - In the compiler, when we figure out buildTimeDependencies, we ask if we need to bundle debug builds. If not, we filter them out (see above). Also, when we actually build together unibuilds, we don't touch the ones that the packageloader tells us to exclude (which ensures that they don't make it into the final product). - In the project, we keep track of whether this project is building in debug mode. That's because the project is where we keep the state of our curent project that we are building, and if we are ever in the state of building multiple things, then that's the code that we would need to touch (see also that we make a similar assumption when solving constraints). - Adds the option to keepthe project debug-build-free and calls it in commands when approporiate. --- tools/bundler.js | 4 +- tools/catalog-local.js | 1 + tools/catalog.js | 51 +++++++++++++++++++- tools/commands.js | 22 +++++++-- tools/compiler.js | 92 +++++++++++++++++++++++++++++------- tools/package-loader.js | 9 ++++ tools/package-source.js | 14 ++++-- tools/project.js | 64 ++++++++++++++++++++----- tools/tests/package-tests.js | 30 +++++++++++- 9 files changed, 246 insertions(+), 41 deletions(-) diff --git a/tools/bundler.js b/tools/bundler.js index 03a730018a..1cbb939bb6 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -1961,9 +1961,10 @@ exports.bundle = function (options) { if (includeDefaultTargets) { // Create a Isopack object that represents the app + var compileOpts = { forProd: true }; var packageSource = new PackageSource(whichCatalog); packageSource.initFromAppDir(appDir, exports.ignoreFiles); - var app = compiler.compile(packageSource).isopack; + var app = compiler.compile(packageSource, compileOpts).isopack; var clientTargets = []; // Client @@ -2286,4 +2287,3 @@ exports.iterateOverAllUsedIsopacks = callback(unibuild.pkg); }); }; - diff --git a/tools/catalog-local.js b/tools/catalog-local.js index c7d64d59d8..b8392fde76 100644 --- a/tools/catalog-local.js +++ b/tools/catalog-local.js @@ -466,6 +466,7 @@ _.extend(LocalCatalog.prototype, { lastUpdated: null, published: null, isTest: packageSource.isTest, + debugOnly: packageSource.debugOnly, containsPlugins: packageSource.containsPlugins() }; }; diff --git a/tools/catalog.js b/tools/catalog.js index f55f420336..865a5a05b1 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -246,7 +246,9 @@ _.extend(LayeredCatalog.prototype, { constr.push(utils.parseConstraint(name + "@=" + packageSource.version)); }); - var ret = buildmessage.enterJob({ title: "Figuring out the best package versions to use." }, function () { + var ret = buildmessage.enterJob({ + title: "Figuring out the best package versions to use." }, + function () { // Then, call the constraint solver, to get the valid transitive subset of // those versions to record for our solution. (We don't just return the // original version lock because we want to record the correct transitive @@ -298,6 +300,53 @@ _.extend(LayeredCatalog.prototype, { return ret.answer; }, + // Separates out debugOnly packages and their dependencies. Goes through + // constraints recursively, and selects a subset of our versions that we use + // if we omit debug-only packages and their dependencies. + // + // Takes in a set of constraints (list of packages that we explicitly depend + // on) and a set of versions of those packages that we have agreed to use. + // + // Returns an object with news: versions (the versions we will use) and + // excluded (the versions that we will NOT use). + separateOutDebugDeps: function (constraints, versions) { + var self = this; + var processed = {}; + var prodDeps = function (seed, versions) { + _.each(seed, function (s) { + if (processed[s]) + return; + var vRec = self.getVersion(s, versions[s]); + if (vRec && !!vRec.debugOnly) { + // This is a debugOnly dependency. Stop. + return; + } else { + processed[s] = versions[s]; + var next = []; + // Weak dependencies don't lead to packages that get bundled, so we + // don't have to worry if they are debugOnly. (Unless they are + // mentioned as non-weak dependencies elsewhere, in which case we + // will get to them then) + var next = _.filter(_.keys(vRec.dependencies), function (p) { + return _.has(versions, p); + }); + prodDeps(next, versions); + } + }); + }; + prodDeps(constraints, versions); + var excluded = {}; + _.each(versions, function(v, p) { + if (!_.has(processed, p)) { + excluded[p] = v; + } + }); + return { + versions: processed, + excluded: excluded + }; + }, + // Refresh the catalogs referenced by this catalog. // options: // - forceRefresh: even if there is a future in progress, refresh the catalog diff --git a/tools/commands.js b/tools/commands.js index 7072220bbd..9b3b856399 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -175,6 +175,7 @@ function doRunCommand (options) { // seems to fix it in a clear and understandable fashion.) var messages = buildmessage.capture(function () { project.getVersions(); // #StructuredProjectInitialization + project.setDebug(!options.production); }); if (messages.hasMessages()) { Console.stderr.write(messages.formatMessages()); @@ -597,9 +598,7 @@ var buildCommands = { server: { type: String }, // XXX COMPAT WITH 0.9.2.2 "mobile-port": { type: String }, - verbose: { type: Boolean, short: "v" }, - // Undocumented - 'for-deploy': { type: Boolean } + verbose: { type: Boolean, short: "v" } } }; @@ -617,6 +616,11 @@ main.registerCommand(_.extend({ name: 'bundle', hidden: true }, buildCommands), }); var buildCommand = function (options) { + // Set the debug bit if we are bundling in debug mode. By default, + // options.debug will be false, which means that we will bundle for + // production. + project.setDebug(options.debug); + cordova.setVerboseness(options.verbose); // XXX output, to stderr, the name of the file written to (for human // comfort, especially since we might change the name) @@ -712,6 +716,7 @@ var buildCommand = function (options) { outputPath: bundlePath, buildOptions: { minify: ! options.debug, + includeTests: ! options.debug, // XXX is this a good idea, or should linux be the default since // that's where most people are deploying // default? i guess the problem with using DEPLOY_ARCH as default @@ -944,13 +949,18 @@ main.registerCommand({ // issues are concurrency-related, or possibly some weird order-of-execution // of interaction that we are failing to understand. This seems to fix it in a // clear and understandable fashion.) - var messages = buildmessage.capture({ title: "Resolving versions" }, function () { + var messages = buildmessage.capture({ title: "Resolving versions" }, + function () { project.getVersions(); // #StructuredProjectInitialization }); if (messages.hasMessages()) { Console.stderr.write(messages.formatMessages()); return 1; } + // Set the debug bit if we are bundling in debug mode. By default, + // options.debug will be false, which means that we will bundle for + // production. + project.setDebug(options.debug); if (options.password) { if (useGalaxy) { @@ -1251,7 +1261,11 @@ main.registerCommand({ // main project to the test directory. project.setRootDir(testRunnerAppDir); project.setMuted(true); // Mute output where applicable + // Hardset the proper release. project.writeMeteorReleaseVersion(release.current.name || 'none'); + // Set debug mode directly, mostly to avoid running the constraint solver an + // extra time. + project.includeDebug = !options.production; project.forceEditPackages( [options['driver-package'] || 'test-in-browser'], 'add'); diff --git a/tools/compiler.js b/tools/compiler.js index fa6b045a4d..d6f24026f2 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -44,7 +44,6 @@ compiler.BUILT_BY = 'meteor/14'; // - acceptableWeakPackages: if set, include direct weak dependencies // that are on one of these packages (it's an object mapping // package name -> true). Otherwise skip all weak dependencies. -// - constraintSolverOpts // // (Why does we need to list acceptable weak packages here rather than just // implement a skipWeak flag and allow the caller to filter the ones they care @@ -77,12 +76,19 @@ compiler.eachUsedUnibuild = function ( return; if (use.weak && !_.has(acceptableWeakPackages, use.package)) return; + if (packageLoader.excludedPackage(use.package)) { + return; + } usesToProcess.push(use); }); while (!_.isEmpty(usesToProcess)) { var use = usesToProcess.shift(); + if (packageLoader.excludedPackage(use.package)) { + return; + } + var unibuild = packageLoader.getUnibuild(use.package, arch); if (!unibuild) { // The package exists but there's no unibuild for us. A buildmessage has @@ -90,7 +96,6 @@ compiler.eachUsedUnibuild = function ( continue; } - if (_.has(processedBuildId, unibuild.id)) continue; processedBuildId[unibuild.id] = true; @@ -112,12 +117,20 @@ compiler.eachUsedUnibuild = function ( // Output is an object with keys: // - directDependencies: map from package name to version string, for the // package's direct, ordered, strong, non-implied dependencies. -// - pluginDependencies: map from plugin name to complete (transitive) -// version information for all packages used to build the plugin, as -// a map from package name to version string. // - packageDependencies: map from package name to version string to complete // transitive dependency in this package. We need for the version lock file // and to deal with implies. +// - packageExcluded: map from package name to version string of transitive +// dependencies that are not included in packageDependencies because we will +// not bundle them with the package. If we are bundling for production mode +// (default) this is the debugOnly packages and their dependencies. +// - pluginDependencies: map from plugin name to complete (transitive) +// version information for all packages used to build the plugin, as +// a map from package name to version string. +// - pluginExcluded: see: packageExcluded, but per plugin. +// +// Options: +// - (see options for the constraint solver in catalog-local.js) // // XXX You may get different results from this function depending on // when you call it (if, for example, the packages in the catalog @@ -125,14 +138,6 @@ compiler.eachUsedUnibuild = function ( // 'meteor update' for package build-time dependencies? // // XXX deal with _makeBuildTimePackageLoader callsites -// -// XXX this function is probably going to get called a huge number of -// times. For example, the Catalog calls it on every local package -// every time the local package list changes. We could memoize the -// result on packageSource (and presumably make this a method on -// PackgeSource), or we could have some kind of cache (the ideal place -// for such a cache might be inside the constraint solver, since it -// will know how/when to invalidate it). var determineBuildTimeDependencies = function (packageSource, constraintSolverOpts) { var ret = {}; @@ -212,7 +217,7 @@ var determineBuildTimeDependencies = function (packageSource, // the version lock file) and the direct dependencies (which are packages that // we are exactly using) in order to optimize build id generation. ret.directDependencies = {}; - _.each( ret.packageDependencies, function (version, packageName) { + _.each(ret.packageDependencies, function (version, packageName) { // Take only direct dependencies. if (_.has(constraints, packageName)) { ret.directDependencies[packageName] = version; @@ -222,6 +227,7 @@ var determineBuildTimeDependencies = function (packageSource, // -- Dependencies of Plugins -- ret.pluginDependencies = {}; + var pluginConstraints = {}; var pluginVersions = packageSource.dependencyVersions.pluginDependencies; _.each(packageSource.pluginInfo, function (info) { var constraints = {}; @@ -242,6 +248,7 @@ var determineBuildTimeDependencies = function (packageSource, }); var pluginVersion = pluginVersions[info.name] || {}; + pluginConstraints[info.name] = constraints_array; try { ret.pluginDependencies[info.name] = packageSource.catalog.resolveConstraints( @@ -277,6 +284,52 @@ var determineBuildTimeDependencies = function (packageSource, release.current.getCurrentToolsVersion()); } + // If we are building for production mode, we also care about filtering out + // debugOnly dependencies. Note, however, that we still record them in the + // versions file, since they influence the versions of other dependencies. + // + // We build for production mode by default, unless our project says + // otherwise. And we never build in debug mode for uniload, because that makes + // no sense. + _.each(["packageExcluded", "pluginExcluded"], function (key) { + ret[key] = {}; + }); + if (packageSource.catalog !== catalog.complete) { + return ret; + } + var project = require('./project.js').project; + if (project && project.includeDebug) { + return ret; + } + + var directVersions = + packageSource.catalog.separateOutDebugDeps( + _.pluck(constraints_array, 'name'), + ret.directDependencies); + + var packageVersions = + packageSource.catalog.separateOutDebugDeps( + _.pluck(constraints_array, 'name'), + ret.packageDependencies); + + var pluginExcluded = {}; + var pluginVersions = {}; + _.each(ret.pluginDependencies, function (versions, name) { + var filteredVersions = + packageSource.catalog.separateOutDebugDeps( + _.pluck(pluginConstraints[name], 'name'), + versions); + pluginVersions[name] = filteredVersions.versions; + pluginExcluded[name] = filteredVersions.excluded; + }); + + ret = { + directDependencies : directVersions.versions, + packageDependencies: packageVersions.versions, + packageExcluded: packageVersions.excluded, + pluginDependencies: pluginVersions, + pluginExcluded: pluginExcluded + }; return ret; }; @@ -931,6 +984,8 @@ var compileUnibuild = function (isopk, inputSourceArch, packageLoader, // the package's source. You should set it to true when you are // building a package to publish as an official build with the // package server. +// - forProd: defaults to false. If true, we will omit any debugOnly +// dependencies, including build plugins and transitive dependencies. // - buildTimeDependencies: optional. If present with keys // 'directDependencies' and 'pluginDependencies', it will be used // instead of calling 'determineBuildTimeDependencies'. This is used @@ -951,11 +1006,12 @@ compiler.compile = function (packageSource, options) { var pluginWatchSet = packageSource.pluginWatchSet.clone(); var plugins = {}; - options = _.extend({ officialBuild: false }, options); + options = _.extend({ officialBuild: false, forProd: false }, options); // Determine versions of build-time dependencies var buildTimeDeps = determineBuildTimeDependencies(packageSource, { - ignoreProjectDeps: options.ignoreProjectDeps + ignoreProjectDeps: options.ignoreProjectDeps, + forProd: options.forProd }); // Build plugins @@ -968,7 +1024,8 @@ compiler.compile = function (packageSource, options) { var loader = new packageLoader.PackageLoader({ versions: buildTimeDeps.pluginDependencies[info.name], - catalog: packageSource.catalog + catalog: packageSource.catalog, + excluded: buildTimeDeps.pluginExcluded[info.name] }); loader.downloadMissingPackages({serverArch: archinfo.host() }); @@ -1052,6 +1109,7 @@ compiler.compile = function (packageSource, options) { var loader = new packageLoader.PackageLoader({ versions: buildTimeDeps.packageDependencies, catalog: packageSource.catalog, + excluded: buildTimeDeps.packageExcluded, constraintSolverOpts: { ignoreProjectDeps: options.ignoreProjectDeps } diff --git a/tools/package-loader.js b/tools/package-loader.js index be3cbb234a..0af4686cdc 100644 --- a/tools/package-loader.js +++ b/tools/package-loader.js @@ -28,6 +28,7 @@ exports.PackageLoader = function (options) { self.uniloadDir = options.uniloadDir; self.constraintSolverOpts = options.constraintSolverOpts; self.catalog = options.catalog; + self.excluded = options.excluded; }; _.extend(exports.PackageLoader.prototype, { @@ -116,5 +117,13 @@ _.extend(exports.PackageLoader.prototype, { tropohouse.default.downloadMissingPackages(self.versions, { serverArch: options.serverArch }); + }, + + // Sometimes, we have figured out the versions for packages, but we have no + // intention of loading them. In this case, they are considered 'excluded + // packages'. This function lets us know if we have hit one of those. + excludedPackage: function (packageName) { + var self = this; + return self.excluded && self.excluded[packageName]; } }); diff --git a/tools/package-source.js b/tools/package-source.js index b0c59782a2..a50525116f 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -269,6 +269,11 @@ var PackageSource = function (catalog) { // to the catalog), so we need to keep track of them. self.isTest = false; + // Some packages belong to a test framework and should never be bundled into + // production. A package with this flag should not be picked up by the bundler + // for production builds. + self.debugOnly = false; + // If this is set, we will take the currently running git checkout and bundle // the meteor tool from it inside this package as a tool. We will include // built isopacks for all the packages in uniload.ROOT_PACKAGES as well as @@ -511,10 +516,11 @@ _.extend(PackageSource.prototype, { buildmessage.error( "trying to initialize a nonexistent base package " + value); } - } - else { - // Do nothing. We might want to add some keys later, and we should err on - // the side of backwards compatibility. + } else if (key === "debugOnly") { + self.debugOnly = value; + } else { + // Do nothing. We might want to add some keys later, and we should err + // on the side of backwards compatibility. } }); }, diff --git a/tools/project.js b/tools/project.js index 6bd086d12d..c3ba2067eb 100644 --- a/tools/project.js +++ b/tools/project.js @@ -106,9 +106,23 @@ var Project = function () { // to tell the user that we are adding packages to an app during // test-packages. (We still print other messages like packages downloading.) self.muted = false; + + // If we are building this app in debug mode -- either because we are bundling + // for debug, or because we are running in terminal without the production + // flag, then we should include debug packages and build everything that we + // build as part of the app with debug build. Otherwise, don't. + self.includeDebug = true; }; _.extend(Project.prototype, { + setDebug: function (debug) { + var self = this; + self._ensureDepsUpToDate(); + if (self.includeDebug !== debug) { + self.includeDebug = debug; + self._generatePackageLoader(); + } + }, // Sets the mute flag on the project. Muted projects don't print out non-error // output. @@ -160,9 +174,9 @@ _.extend(Project.prototype, { self.viableDepSource = true; }, - // Rereads all the on-disk files by reinitalizing the project with the same directory. - // Caches the old versions, in case we were running with --release (and they don't - // match the ones on disk). + // Rereads all the on-disk files by reinitalizing the project with the same + // directory. Caches the old versions, in case we were running with --release + // (and they don't match the ones on disk). // // We don't automatically reinitialize this singleton when an app is // restarted, but an app restart is very likely caused by changes to our @@ -197,9 +211,9 @@ _.extend(Project.prototype, { if (!self._depsUpToDate) { - // We are calculating this project's dependencies, so we obviously should not - // use it as a source of version locks (unless specified explicitly through - // previousVersions). + // We are calculating this project's dependencies, so we obviously should + // not use it as a source of version locks (unless specified explicitly + // through previousVersions). self.viableDepSource = false; // Use current release to calculate packages & combined constraints. @@ -241,11 +255,9 @@ _.extend(Project.prototype, { process.exit(1); } - // Finally, initialize the package loader. - self.packageLoader = new packageLoader.PackageLoader({ - versions: newVersions, - catalog: catalog.complete - }); + // We have successfully set our versions, so let's generate the package + // loader. + self._generatePackageLoader(); // We are done! self._depsUpToDate = true; @@ -253,6 +265,36 @@ _.extend(Project.prototype, { } }, + // Given a set of versions and combined constraints, generate a package loader + // for this project. + // + // This is part of _ensureDepsUpToDate. Assumes that VERSIONS HAVE BEEN + // GENERATED. If you are not sure if your project is up to date before you + // call this function, call _ensureUpToDate first. + _generatePackageLoader: function () { + var self = this; + // Finally, initialize the package loader. If we are building for prod, we + // are going to not load debug packages, so filter that out here. + if (self.includeDebug) { + self.packageLoader = new packageLoader.PackageLoader({ + versions: self.dependencies, + catalog: catalog.complete, + excluded: {} + }); + } else { + var prodVersions = + catalog.complete.separateOutDebugDeps( + _.pluck(self.combinedConstraints, 'name'), + self.dependencies); + + self.packageLoader = new packageLoader.PackageLoader({ + versions: prodVersions.versions, + catalog: catalog.complete, + excluded: prodVersions.excluded + }); + } + }, + // Given a set of packages from a release, recalculates all the constraints on // a given project: combines the constraints from all the programs, the // packages file and the release packages. diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 1dfce3443d..871023e27d 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -192,8 +192,9 @@ selftest.define("change packages during hot code push", [], function () { run.stop(); }); -// Add packages through the command line, and make sure that the correct set of -// changes is reflected in .meteor/packages, .meteor/versions and list +// Add packages through the command line. Make sure that the correct set of +// changes is reflected in .meteor/packages, .meteor/versions and list. Make +// sure that debugOnly packages don't show up in production mode. selftest.define("add packages to app", ["net"], function () { var s = new Sandbox(); var run; @@ -204,6 +205,13 @@ selftest.define("add packages to app", ["net"], function () { s.set("METEOR_TEST_TMP", files.mkdtemp()); s.set("METEOR_OFFLINE_CATALOG", "t"); + // This is a legit version, but accounts-base started with 1.0.0 and is + // unlikely to backtrack. + run = s.run("add", "accounts-base@0.123.123"); + run.matchErr("no such version"); + run.expectExit(1); + + run = s.run("add", "accounts-base"); run.match("accounts-base: A user account system"); @@ -275,6 +283,24 @@ selftest.define("add packages to app", ["net"], function () { run.match("no-description\n"); run.expectEnd(); run.expectExit(0); + + // Add a debugOnly package. It should work during a normal run, but print + // nothing in production mode. + run = s.run("add", "debug-only"); + run.match("debug-only"); + run.expectExit(0); + run = s.run(); + run.waitSecs(15); + run.match("Testing a thing"); + run.match("Started"); + run.stop(); + + run = s.run("--production"); + run.waitSecs(15); + run.match("Started MongoDB.\n"); + run.waitSecs(5); + run.read("=> Starting your app"); + run.stop(); }); // Add a package that adds files to specific client architectures. From 0aab8e9683b9ac9b8b8ce0bcafc7741bf94b2c00 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 15:09:11 -0700 Subject: [PATCH 041/283] adding the test package used by the debugOnly test --- .../packages/debug-only/debug-only.js | 2 ++ .../package-tests/packages/debug-only/package.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tools/tests/apps/package-tests/packages/debug-only/debug-only.js create mode 100644 tools/tests/apps/package-tests/packages/debug-only/package.js diff --git a/tools/tests/apps/package-tests/packages/debug-only/debug-only.js b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js new file mode 100644 index 0000000000..23162b0db5 --- /dev/null +++ b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js @@ -0,0 +1,2 @@ +// Write your package code here! +console.log("Testing a thing"); diff --git a/tools/tests/apps/package-tests/packages/debug-only/package.js b/tools/tests/apps/package-tests/packages/debug-only/package.js new file mode 100644 index 0000000000..1912e818e6 --- /dev/null +++ b/tools/tests/apps/package-tests/packages/debug-only/package.js @@ -0,0 +1,15 @@ +Package.describe({ + name: 'debug-only', + debugOnly: true +}); + +Package.onUse(function(api) { +// api.versionsFrom('0.9.3.1'); + api.addFiles('debug-only.js'); +}); + +Package.onTest(function(api) { + api.use('tinytest'); + api.use('debug-only'); + api.addFiles('debug-only-tests.js'); +}); From 43eace5af85f79c29687612a02eff2366478ed40 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 15:41:33 -0700 Subject: [PATCH 042/283] allow publication of debugOnly packages --- tools/commands-packages.js | 3 ++- tools/commands.js | 1 - tools/compiler.js | 7 +++++++ tools/package-client.js | 7 +++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index f4a5b14761..32ba9c1f65 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -206,7 +206,8 @@ main.registerCommand({ return; // already have errors, so skip the build var deps = - compiler.determineBuildTimeDependencies(packageSource).packageDependencies; + compiler.determineBuildTimeDependencies(packageSource) + .packageDependencies; tropohouse.default.downloadMissingPackages(deps); compileResult = compiler.compile(packageSource, { officialBuild: true }); diff --git a/tools/commands.js b/tools/commands.js index 9b3b856399..ef2737c45a 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -716,7 +716,6 @@ var buildCommand = function (options) { outputPath: bundlePath, buildOptions: { minify: ! options.debug, - includeTests: ! options.debug, // XXX is this a good idea, or should linux be the default since // that's where most people are deploying // default? i guess the problem with using DEPLOY_ARCH as default diff --git a/tools/compiler.js b/tools/compiler.js index d6f24026f2..45344f4f8a 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -294,9 +294,16 @@ var determineBuildTimeDependencies = function (packageSource, _.each(["packageExcluded", "pluginExcluded"], function (key) { ret[key] = {}; }); + // Don't bother filtering things if we are in uniload. That's too complicated. if (packageSource.catalog !== catalog.complete) { return ret; } + // If you have decided to build this package already, and this package is + // debugOnly, then it doesn't make sense to filter out its debugOnly subtrees. + if (packageSource.debugOnly) { + return ret; + } + // If the project tells us to include debugOnly packages, we shall do it. var project = require('./project.js').project; if (project && project.includeDebug) { return ret; diff --git a/tools/package-client.js b/tools/package-client.js index 878c424896..2bfaf642a7 100644 --- a/tools/package-client.js +++ b/tools/package-client.js @@ -528,8 +528,10 @@ exports.publishPackage = function (packageSource, compileResult, conn, options) } if (!exports.amIAuthorized(name, conn, false)) { - Console.stderr.write('You are not an authorized maintainer of ' + name + ".\n"); - Console.stderr.write('Only authorized maintainers may publish new versions. \n'); + Console.stderr.write( + 'You are not an authorized maintainer of ' + name + ".\n"); + Console.stderr.write( + 'Only authorized maintainers may publish new versions. \n'); return 1; } } @@ -661,6 +663,7 @@ exports.publishPackage = function (packageSource, compileResult, conn, options) earliestCompatibleVersion: packageSource.earliestCompatibleVersion, compilerVersion: compiler.BUILT_BY, containsPlugins: packageSource.containsPlugins(), + debugOnly: packageSource.debugOnly, dependencies: packageDeps }; try { From e784341cf5d65505ce52540b3ce279f4bd846329 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 15:43:33 -0700 Subject: [PATCH 043/283] clean out the forProd option which we no longer use --- tools/bundler.js | 3 +-- tools/compiler.js | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/bundler.js b/tools/bundler.js index 1cbb939bb6..ce06c1a0d0 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -1961,10 +1961,9 @@ exports.bundle = function (options) { if (includeDefaultTargets) { // Create a Isopack object that represents the app - var compileOpts = { forProd: true }; var packageSource = new PackageSource(whichCatalog); packageSource.initFromAppDir(appDir, exports.ignoreFiles); - var app = compiler.compile(packageSource, compileOpts).isopack; + var app = compiler.compile(packageSource).isopack; var clientTargets = []; // Client diff --git a/tools/compiler.js b/tools/compiler.js index 45344f4f8a..13d7c77d96 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -991,8 +991,6 @@ var compileUnibuild = function (isopk, inputSourceArch, packageLoader, // the package's source. You should set it to true when you are // building a package to publish as an official build with the // package server. -// - forProd: defaults to false. If true, we will omit any debugOnly -// dependencies, including build plugins and transitive dependencies. // - buildTimeDependencies: optional. If present with keys // 'directDependencies' and 'pluginDependencies', it will be used // instead of calling 'determineBuildTimeDependencies'. This is used @@ -1013,12 +1011,11 @@ compiler.compile = function (packageSource, options) { var pluginWatchSet = packageSource.pluginWatchSet.clone(); var plugins = {}; - options = _.extend({ officialBuild: false, forProd: false }, options); + options = _.extend({ officialBuild: false }, options); // Determine versions of build-time dependencies var buildTimeDeps = determineBuildTimeDependencies(packageSource, { - ignoreProjectDeps: options.ignoreProjectDeps, - forProd: options.forProd + ignoreProjectDeps: options.ignoreProjectDeps }); // Build plugins From 58c3a355e4f5a5f7c4c076d66fa96b50296fc871 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 15:55:05 -0700 Subject: [PATCH 044/283] allow velocity to search for debug-only packages --- tools/commands-packages.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 32ba9c1f65..217040bb98 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1180,7 +1180,9 @@ main.registerCommand({ options: { maintainer: {type: String, required: false }, "show-old": {type: Boolean, required: false }, - "show-rcs": {type: Boolean, required: false} + "show-rcs": {type: Boolean, required: false}, + // Undocumented debug-only option for Velocity. + "debug-only": {type: Boolean, required: false} } }, function (options) { @@ -1214,7 +1216,7 @@ main.registerCommand({ var filterBroken = function (match, isRelease, name) { // If the package does not match, or it is not a package at all or if we // don't want to filter anyway, we do not care. - if (!match || isRelease || options["show-old"]) + if (!match || isRelease) return match; var vr; doOrDie(function () { @@ -1224,7 +1226,20 @@ main.registerCommand({ vr = catalog.official.getLatestVersion(name); } }); - return vr && !vr.unmigrated; + if (!vr) { + return false; + } + // If we did NOT ask for unmigrated packages and this package is unmigrated, + // we don't care. + if (!options["show-old"] && vr.unmigrated){ + return false; + } + // If we asked for debug-only packages and this package is NOT debug only, + // we don't care. + if (options["debug-only"] && !vr.debugOnly) { + return false; + } + return true; }; if (options.maintainer) { From 746fd0f792126a68004cc6788d42a60b3a77dd7d Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Tue, 7 Oct 2014 15:59:05 -0700 Subject: [PATCH 045/283] =?UTF-8?q?Take=20a=20=E2=80=93=E2=80=93file=20reg?= =?UTF-8?q?ex;=20comments=20and=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/commands.js | 33 +++++++++++++++++++++++++-------- tools/help.txt | 9 +++++++-- tools/selftest.js | 38 ++++++++++++++++++++++++++++++++------ 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index 954a6d8106..647e3d676b 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1727,14 +1727,29 @@ main.registerCommand({ } } - var testRegexp = undefined; - if (options.args.length) { + var compileRegexp = function (str) { try { - testRegexp = new RegExp(options.args[0]); + return new RegExp(str); } catch (e) { if (!(e instanceof SyntaxError)) throw e; - Console.stderr.write("Bad regular expression: " + options.args[0] + "\n"); + Console.stderr.write("Bad regular expression: " + str + "\n"); + return null; + } + }; + + var testRegexp = undefined; + if (options.args.length) { + testRegexp = compileRegexp(options.args[0]); + if (! testRegexp) { + return 1; + } + } + + var fileRegexp = undefined; + if (options.file) { + fileRegexp = compileRegexp(options.file); + if (! fileRegexp) { return 1; } } @@ -1745,7 +1760,7 @@ main.registerCommand({ offline: offline, includeSlowTests: options.slow, testRegexp: testRegexp, - inFile: options.file + fileRegexp: fileRegexp }); return 0; @@ -1756,13 +1771,15 @@ main.registerCommand({ }; return selftest.runTests({ + // filtering options onlyChanged: options.changed, offline: offline, includeSlowTests: options.slow, - historyLines: options.history, - clients: clients, testRegexp: testRegexp, - inFile: options.file + fileRegexp: fileRegexp, + // other options + historyLines: options.history, + clients: clients }); }); diff --git a/tools/help.txt b/tools/help.txt index 3b29bfcd02..1443481fe2 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -422,8 +422,8 @@ Options: >>> self-test Run tests of the 'meteor' tool. -Usage: meteor self-test [pattern] [--changed] [--slow] - [--force-online] [--history n] +Usage: meteor self-test [pattern] [--list] [--file pattern] [--changed] + [--slow] [--force-online] [--history n] [--browserstack] Runs internal tests. Exits with status 0 on success. @@ -431,6 +431,11 @@ Runs internal tests. Exits with status 0 on success. If 'pattern' is provided, it should be a regular expression. Only tests that match the regular expression will be run. +Use --list to list the tests that would be run according to the other +options, without running them. + +Pass --file to run only tests in files that match the regular expression. + Pass --changed to run only tests that have changed since they last passed. This uses a really rough heuristic: A test has changed iff there has been any change to the file in the 'selftests' subdirectory diff --git a/tools/selftest.js b/tools/selftest.js index 40581acac8..b031d3c21f 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1413,6 +1413,12 @@ var tagDescriptions = { 'in other files': "" }; +// Returns a TestList object representing a filtered list of tests, +// according to the options given (which are based closely on the +// command-line arguments). Used as the first step of both listTests +// and runTests. +// +// Options: testRegexp, fileRegexp, onlyChanged, offline, includeSlowTests var getFilteredTests = function (options) { options = options || {}; @@ -1421,11 +1427,12 @@ var getFilteredTests = function (options) { if (allTests.length) { var testState = readTestState(); - // Add pseudo-tags 'non-matching' and 'unchanged' + // Add pseudo-tags 'non-matching', 'unchanged', and 'in other files' + // (but only so that we can then skip tests with those tags) allTests = allTests.map(function (test) { var newTags = []; - if (options.inFile && test.file !== options.inFile) { + if (options.fileRegexp && ! options.fileRegexp.test(test.file)) { newTags.push('in other files'); } else if (options.testRegexp && ! options.testRegexp.test(test.name)) { newTags.push('non-matching'); @@ -1444,7 +1451,7 @@ var getFilteredTests = function (options) { // (order of tags is significant to the "skip counts" that are displayed) var tagsToSkip = []; - if (options.inFile) { + if (options.fileRegexp) { tagsToSkip.push('in other files'); } if (options.testRegexp) { @@ -1466,9 +1473,17 @@ var getFilteredTests = function (options) { return new TestList(allTests, tagsToSkip, testState); }; +// A TestList is the result of getFilteredTests. It holds the original +// list of all tests, the filtered list, and stats on how many tests +// were skipped (see generateSkipReport). +// +// TestList is also used to save the hashes of files where all tests +// ran and passed (for the `--changed` option). If a testState is +// passed, the caller can use notifyFailed and saveTestState to cause +// TestList to calculate the new testState and write it out. var TestList = function (allTests, tagsToSkip, testState) { tagsToSkip = (tagsToSkip || []); - testState = (testState || null); + testState = (testState || null); // optional var self = this; self.allTests = allTests; @@ -1493,6 +1508,9 @@ var TestList = function (allTests, tagsToSkip, testState) { } var fileInfo = self.fileInfo[test.file]; + // We look for tagsToSkip *in order*, and when we decide to + // skip a test, we don't keep looking at more tags, and we don't + // add the test to any further "skip counts". return !_.any(tagsToSkip, function (tag) { if (_.contains(test.tags, tag)) { self.skipCounts[tag]++; @@ -1505,10 +1523,15 @@ var TestList = function (allTests, tagsToSkip, testState) { }); }; +// Mark a test's file as having failures so we don't +// save its hash as a potentially "unchanged" file. TestList.prototype.notifyFailed = function (test) { this.fileInfo[test.file].hasFailures = true; }; +// If this TestList was constructed with a testState, +// modify it and write it out based on which tests +// were skipped and which tests had failures. TestList.prototype.saveTestState = function () { var self = this; var testState = self.testState; @@ -1527,6 +1550,7 @@ TestList.prototype.saveTestState = function () { writeTestState(testState); }; +// Return a string like "Skipped 1 foo test\nSkipped 5 bar tests\n" TestList.prototype.generateSkipReport = function () { var self = this; var result = ''; @@ -1567,6 +1591,7 @@ var writeTestState = function (testState) { fs.writeFileSync(testStateFile, JSON.stringify(testState), 'utf8'); }; +// Same options as getFilteredTests. Writes to stdout and stderr. var listTests = function (options) { var testList = getFilteredTests(options); @@ -1583,8 +1608,8 @@ var listTests = function (options) { : '')); }); }); - Console.stdout.write('\n'); + Console.stderr.write('\n'); Console.stderr.write(testList.filteredTests.length + " tests listed."); Console.stderr.write(testList.generateSkipReport()); }; @@ -1593,7 +1618,8 @@ var listTests = function (options) { // Running tests /////////////////////////////////////////////////////////////////////////////// -// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp +// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp, +// fileRegexp, // clients: // - browserstack (need s3cmd credentials) var runTests = function (options) { From 192aeed694251aed646bfc4e651443f76a641aa1 Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 16:07:25 -0700 Subject: [PATCH 046/283] move the call to setDebug into the same buildmessage that calls getPackageLoader to be safer about ensureDepsUpToDate --- tools/commands.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index ef2737c45a..84cc78e09a 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -616,11 +616,6 @@ main.registerCommand(_.extend({ name: 'bundle', hidden: true }, buildCommands), }); var buildCommand = function (options) { - // Set the debug bit if we are bundling in debug mode. By default, - // options.debug will be false, which means that we will bundle for - // production. - project.setDebug(options.debug); - cordova.setVerboseness(options.verbose); // XXX output, to stderr, the name of the file written to (for human // comfort, especially since we might change the name) @@ -692,8 +687,13 @@ var buildCommand = function (options) { var bundlePath = options['directory'] ? path.join(outputPath, 'bundle') : path.join(buildDir, 'bundle'); + // Creating the package loader with which to bundle our app here, probably + // calculating the dependencies. var loader; var messages = buildmessage.capture(function () { + // By default, options.debug will be false, which means that we will bundle + // for production. + project.setDebug(options.debug); loader = project.getPackageLoader(); }); if (messages.hasMessages()) { From 4aa895aa20a305989da30961e450808f4cbe7de5 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 7 Oct 2014 16:08:52 -0700 Subject: [PATCH 047/283] Tweak READMEs for built app bundles. --- tools/commands.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/commands.js b/tools/commands.js index 84cc78e09a..c0e1e23705 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -753,6 +753,7 @@ var buildCommand = function (options) { files.cp_r(buildPath, path.join(platformPath, 'project')); fs.writeFileSync( path.join(platformPath, 'README'), + "This is an auto-generated XCode project for your iOS application.\n\n" + "Instructions for publishing your iOS app to App Store can be found at:\n" + "https://github.com/meteor/meteor/wiki/How-to-submit-your-iOS-app-to-App-Store\n", "utf8"); @@ -762,6 +763,7 @@ var buildCommand = function (options) { files.copyFile(apkPath, path.join(platformPath, 'unaligned.apk')); fs.writeFileSync( path.join(platformPath, 'README'), + "This is an auto-generated Ant project for your Android application.\n\n" + "Instructions for publishing your Android app to Play Store can be found at:\n" + "https://github.com/meteor/meteor/wiki/How-to-submit-your-Android-app-to-Play-Store\n", "utf8"); From 9d0f42a3eaf324804b2f9a157ea67826f2d8aecf Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 16:09:59 -0700 Subject: [PATCH 048/283] Use /usr/libexec/java_home to detect JDK --- tools/commands-cordova.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index ec1b3a1cfb..85c005284a 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1919,7 +1919,20 @@ _.extend(Android.prototype, { var self = this; if (Host.isMac()) { - return files.statOrNull('/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/jarsigner') != null; + var javaHomes = files.run('/usr/libexec/java_home'); + + if (javaHomes) { + javaHomes = javaHomes.trim(); + + // /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home + if (javaHomes.indexOf('/Library/Java/JavaVirtualMachines/jdk') == 0) { + return true; + } + } + + //Unable to find any JVMs matching version "(null)". + //No Java runtime present, try --request to install. + return false; } else { return !!Host.which('jarsigner'); } From a824a86176c7c64e12297a46eb083803376ff67d Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 16:19:09 -0700 Subject: [PATCH 049/283] Clean up the messages to accurately reflect what we're installing --- tools/commands-cordova.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 85c005284a..fe7723a079 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2153,11 +2153,12 @@ _.extend(Android.prototype, { if (hasAndroid && hasJava) { if (self.hasTarget('19', 'default/x86')) { - log && Console.info(Console.success("Found suitable Android API libraries")); + log && Console.info(Console.success("Found suitable Android x86 image")); } else { - log && Console.info(Console.fail("Suitable Android API libraries not found")); + log && Console.info(Console.fail("Suitable Android x86 image not found")); if (fixSilent) { + Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); } else { result.missing.push("android-sys-img"); From b29b473e3a901284f28448597521553c239d0594 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 16:07:19 -0700 Subject: [PATCH 050/283] Fix android splash parsing --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index fe7723a079..2fefecb847 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1395,7 +1395,7 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { verboseLog('Copying resources for mobile apps'); var imageXmlRec = function (name, width, height, src) { - var androidMatch = /.+(.?.dpi)-(landscape|portrait)/g.exec(name); + var androidMatch = /.+(.?.dpi)_(landscape|portrait)/g.exec(name); var xmlRec = { src: src, width: width, From 966431a4799b9f6e1838a8f90e654a0be61e1668 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 16:29:28 -0700 Subject: [PATCH 051/283] Put accidentally removed cordova.checkIsValidPlugin method back --- tools/commands-cordova.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 2fefecb847..8762c35779 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -111,6 +111,16 @@ cordova.filterPackages = function (packages) { return ret; }; +// used by packages commands +cordova.checkIsValidPlugin = function (name) { + var pluginHash = {}; + pluginHash[name.split('@')[0]] = name.split('@')[1]; + + // check that every plugin is specifying either an exact constraint or a + // tarball url with sha + utils.ensureOnlyExactVersions(pluginHash); +}; + // --- helpers --- var localCordova = path.join(files.getCurrentToolsDir(), From ff947a2ac50b98a7398d47e0125e57621734d1dd Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 16:49:54 -0700 Subject: [PATCH 052/283] Update todos --- docs/.meteor/versions | 117 +- examples/todos/.meteor/packages | 2 - examples/todos/.meteor/release | 2 +- examples/todos/.meteor/versions | 7 +- examples/todos/client/lib/hammer.js | 2463 +++++++++++++++++ .../{base.lessimport => base.import.less} | 0 .../{button.lessimport => button.import.less} | 0 .../{form.lessimport => form.import.less} | 0 .../{icon.lessimport => icon.import.less} | 20 +- .../{layout.lessimport => layout.import.less} | 17 +- .../{link.lessimport => link.import.less} | 0 ...tems.lessimport => list-items.import.less} | 0 .../{menu.lessimport => menu.import.less} | 5 + ...message.lessimport => message.import.less} | 0 .../{nav.lessimport => nav.import.less} | 0 ...on.lessimport => notification.import.less} | 0 examples/todos/client/stylesheets/main.less | 42 +- ...helpers.lessimport => helpers.import.less} | 0 ...lesshat.lessimport => lesshat.import.less} | 0 .../{reset.lessimport => reset.import.less} | 0 .../{text.lessimport => text.import.less} | 0 ...aphy.lessimport => typography.import.less} | 0 ...ables.lessimport => variables.import.less} | 0 examples/todos/client/templates/app-body.js | 44 +- ...d.lessimport => app-not-found.import.less} | 0 .../{auth.lessimport => auth.import.less} | 0 ...show.lessimport => lists-show.import.less} | 0 ...loading.lessimport => loading.import.less} | 0 examples/todos/mobile-config.js | 10 +- examples/todos/public/icon/todos.eot | Bin 5368 -> 6000 bytes examples/todos/public/icon/todos.svg | 5 +- examples/todos/public/icon/todos.ttf | Bin 5212 -> 5844 bytes examples/todos/public/icon/todos.woff | Bin 4260 -> 5920 bytes 33 files changed, 2623 insertions(+), 111 deletions(-) create mode 100644 examples/todos/client/lib/hammer.js rename examples/todos/client/stylesheets/globals/{base.lessimport => base.import.less} (100%) rename examples/todos/client/stylesheets/globals/{button.lessimport => button.import.less} (100%) rename examples/todos/client/stylesheets/globals/{form.lessimport => form.import.less} (100%) rename examples/todos/client/stylesheets/globals/{icon.lessimport => icon.import.less} (71%) rename examples/todos/client/stylesheets/globals/{layout.lessimport => layout.import.less} (85%) rename examples/todos/client/stylesheets/globals/{link.lessimport => link.import.less} (100%) rename examples/todos/client/stylesheets/globals/{list-items.lessimport => list-items.import.less} (100%) rename examples/todos/client/stylesheets/globals/{menu.lessimport => menu.import.less} (92%) rename examples/todos/client/stylesheets/globals/{message.lessimport => message.import.less} (100%) rename examples/todos/client/stylesheets/globals/{nav.lessimport => nav.import.less} (100%) rename examples/todos/client/stylesheets/globals/{notification.lessimport => notification.import.less} (100%) rename examples/todos/client/stylesheets/util/{helpers.lessimport => helpers.import.less} (100%) rename examples/todos/client/stylesheets/util/{lesshat.lessimport => lesshat.import.less} (100%) rename examples/todos/client/stylesheets/util/{reset.lessimport => reset.import.less} (100%) rename examples/todos/client/stylesheets/util/{text.lessimport => text.import.less} (100%) rename examples/todos/client/stylesheets/util/{typography.lessimport => typography.import.less} (100%) rename examples/todos/client/stylesheets/util/{variables.lessimport => variables.import.less} (100%) rename examples/todos/client/templates/{app-not-found.lessimport => app-not-found.import.less} (100%) rename examples/todos/client/templates/{auth.lessimport => auth.import.less} (100%) rename examples/todos/client/templates/{lists-show.lessimport => lists-show.import.less} (100%) rename examples/todos/client/templates/{loading.lessimport => loading.import.less} (100%) diff --git a/docs/.meteor/versions b/docs/.meteor/versions index 73807b599c..ce3da053a0 100644 --- a/docs/.meteor/versions +++ b/docs/.meteor/versions @@ -1,59 +1,58 @@ -appcache@1.0.2-pre.2 -application-configuration@1.0.3-pre.2 -autoupdate@1.1.2-pre.4 -base64@1.0.1-pre.2 -binary-heap@1.0.1-pre.2 -blaze-tools@1.0.1-pre.2 -blaze@2.0.2-pre.2 -boilerplate-generator@1.0.1-pre.4 -callback-hook@1.0.1-pre.2 -check@1.0.2-pre.2 -code-prettify@1.0.1-pre.2 -coffeescript@1.0.4-pre.3 -ctl-helper@1.0.4-pre.2 -ctl@1.0.2-pre.2 -ddp@1.0.10-pre.2 -deps@1.0.5-pre.2 -ejson@1.0.4-pre.2 -fastclick@1.0.1-pre.3 -follower-livedata@1.0.2-pre.2 -geojson-utils@1.0.1-pre.2 -html-tools@1.0.2-pre.2 -htmljs@1.0.2-pre.3 -http@1.0.7-pre.2 -id-map@1.0.1-pre.2 -jquery-waypoints@1.0.1-pre.2 -jquery@1.0.1-pre.2 -json@1.0.1-pre.2 -less@1.0.10-pre.3 -livedata@1.0.11-pre.2 -logging@1.0.4-pre.2 -markdown@1.0.2-pre.2 -meteor-platform@1.1.2-pre.4 -meteor@1.1.2-pre.3 -minifiers@1.1.1-pre.2 -minimongo@1.0.4-pre.3 -mobile-status-bar@1.0.1-pre.2 -mongo@1.0.7-pre.2 -observe-sequence@1.0.3-pre.2 -ordered-dict@1.0.1-pre.2 -random@1.0.1-pre.2 -reactive-dict@1.0.4-pre.2 -reactive-var@1.0.3-pre.2 -reload-safetybelt@1.0.1-pre.2 -reload@1.1.1-pre.2 -retry@1.0.1-pre.2 -routepolicy@1.0.2-pre.2 -session@1.0.3-pre.2 -showdown@1.0.2-pre.2 -spacebars-compiler@1.0.3-pre.2 -spacebars@1.0.3-pre.2 -spiderable@1.0.4-pre.2 -standard-app-packages@1.0.3-pre.2 -templating@1.0.8-pre.3 -tracker@1.0.3-pre.2 -ui@1.0.4-pre.2 -underscore@1.0.1-pre.2 -url@1.0.1-pre.2 -webapp-hashing@1.0.1-pre.2 -webapp@1.1.3-pre.3 +appcache@1.0.1 +application-configuration@1.0.2 +autoupdate@1.1.1 +base64@1.0.0 +binary-heap@1.0.0 +blaze-tools@1.0.0 +blaze@2.0.1 +boilerplate-generator@1.0.0 +callback-hook@1.0.0 +check@1.0.1 +code-prettify@1.0.0 +coffeescript@1.0.3 +ctl-helper@1.0.3 +ctl@1.0.1 +ddp@1.0.9 +deps@1.0.4 +ejson@1.0.3 +fastclick@1.0.0 +follower-livedata@1.0.1 +geojson-utils@1.0.0 +html-tools@1.0.1 +htmljs@1.0.1 +http@1.0.6 +id-map@1.0.0 +jquery-waypoints@1.0.0 +jquery@1.0.0 +json@1.0.0 +less@1.0.9 +livedata@1.0.10 +logging@1.0.3 +meteor-platform@1.1.1 +meteor@1.1.1 +minifiers@1.1.0 +minimongo@1.0.3 +mobile-status-bar@1.0.0 +mongo@1.0.6 +observe-sequence@1.0.2 +ordered-dict@1.0.0 +random@1.0.0 +reactive-dict@1.0.3 +reactive-var@1.0.2 +reload-safetybelt@1.0.0 +reload@1.1.0 +retry@1.0.0 +routepolicy@1.0.1 +session@1.0.2 +showdown@1.0.1 +spacebars-compiler@1.0.2 +spacebars@1.0.2 +spiderable@1.0.3 +standard-app-packages@1.0.2 +templating@1.0.7 +tracker@1.0.2 +ui@1.0.3 +underscore@1.0.0 +url@1.0.0 +webapp-hashing@1.0.0 +webapp@1.1.2 diff --git a/examples/todos/.meteor/packages b/examples/todos/.meteor/packages index b9dd328d10..da825e90c6 100644 --- a/examples/todos/.meteor/packages +++ b/examples/todos/.meteor/packages @@ -9,5 +9,3 @@ less iron:router accounts-password fastclick -noorderstorm:hammer - diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 0b324bf505..0755219e60 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@0.9.4-pre.8 +METEOR@0.9.4-pre.11 diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index 3ab316d172..207ecba4d6 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -1,12 +1,12 @@ accounts-base@1.1.2-pre.2 accounts-password@1.0.3-pre.2 application-configuration@1.0.3-pre.2 -autoupdate@1.1.2-pre.3 +autoupdate@1.1.2-pre.4 base64@1.0.1-pre.2 binary-heap@1.0.1-pre.2 blaze-tools@1.0.1-pre.2 blaze@2.0.2-pre.2 -boilerplate-generator@1.0.1-pre.3 +boilerplate-generator@1.0.1-pre.4 callback-hook@1.0.1-pre.2 check@1.0.2-pre.2 ctl-helper@1.0.4-pre.2 @@ -33,13 +33,12 @@ less@1.0.10-pre.3 livedata@1.0.11-pre.2 localstorage@1.0.1-pre.2 logging@1.0.4-pre.2 -meteor-platform@1.1.2-pre.3 +meteor-platform@1.1.2-pre.4 meteor@1.1.2-pre.3 minifiers@1.1.1-pre.2 minimongo@1.0.4-pre.3 mobile-status-bar@1.0.1-pre.2 mongo@1.0.7-pre.2 -noorderstorm:hammer@0.1.3 npm-bcrypt@0.7.7 observe-sequence@1.0.3-pre.2 ordered-dict@1.0.1-pre.2 diff --git a/examples/todos/client/lib/hammer.js b/examples/todos/client/lib/hammer.js new file mode 100644 index 0000000000..5226688998 --- /dev/null +++ b/examples/todos/client/lib/hammer.js @@ -0,0 +1,2463 @@ +/*! Hammer.JS - v2.0.4 - 2014-09-28 + * http://hammerjs.github.io/ + * + * Copyright (c) 2014 Jorik Tangelder; + * Licensed under the MIT license */ +(function(window, document, exportName, undefined) { + 'use strict'; + +var VENDOR_PREFIXES = ['', 'webkit', 'moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = document.createElement('div'); + +var TYPE_FUNCTION = 'function'; + +var round = Math.round; +var abs = Math.abs; +var now = Date.now; + +/** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ +function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); +} + +/** + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; +} + +/** + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge] + * @returns {Object} dest + */ +function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; +} + +/** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +function merge(dest, src) { + return extend(dest, src, true); +} + +/** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + extend(childP, properties); + } +} + +/** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} + +/** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} + +/** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; + } + return false; +} + +/** + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; + } + i++; + } + return -1; + } +} + +/** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +/** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ +function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; + } + return undefined; +} + +/** + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} + +/** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument; + return (doc.defaultView || doc.parentWindow); +} + +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + +var SUPPORT_TOUCH = ('ontouchstart' in window); +var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; + +var COMPUTE_INTERVAL = 25; + +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; + +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; + +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; + +/** + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ +function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + +} + +Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function() { }, + + /** + * bind the events + */ + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + + /** + * unbind the events + */ + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } +}; + +/** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); +} + +/** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; +} + +/** + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + + computeIntervalInputData(session, input); + + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} + +function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} + +/** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; + + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = last.deltaX - input.deltaX; + var deltaY = last.deltaY - input.deltaY; + + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} + +/** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} + +/** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +function getCenter(pointers) { + var pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} + +/** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} + +/** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y > 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +/** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); +} + +/** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} + +/** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY); +} + +/** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; + +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + +/** + * Mouse events input + * @constructor + * @extends Input + */ +function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; + + this.allow = true; // used by Input.TouchMouse to disable mouse events + this.pressed = false; // mousedown state + + Input.apply(this, arguments); +} + +inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down, and mouse events are allowed (see the TouchMouse input) + if (!this.pressed || !this.allow) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +}); + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; + +// in IE10 the pointer types is defined as an enum +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; + +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} + +/** + * Pointer events input + * @constructor + * @extends Input + */ +function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + + Input.apply(this, arguments); + + this.store = (this.manager.session.pointerEvents = []); +} + +inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; + + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + + var isTouch = (pointerType == INPUT_TYPE_TOUCH); + + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +}); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Touch events input + * @constructor + * @extends Input + */ +function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; + + Input.apply(this, arguments); +} + +inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Multi-user touch events input + * @constructor + * @extends Input + */ +function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; + + Input.apply(this, arguments); +} + +inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; +} + +/** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ +function TouchMouseInput() { + Input.apply(this, arguments); + + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); +} + +inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); + + // when we're in a touch event, so block all upcoming mouse events + // most mobile browser also emit mouseevents, right after touchstart + if (isTouch) { + this.mouse.allow = false; + } else if (isMouse && !this.mouse.allow) { + return; + } + + // reset the allowMouse when we're done + if (inputEvent & (INPUT_END | INPUT_CANCEL)) { + this.mouse.allow = true; + } + + this.callback(manager, inputEvent, inputData); + }, + + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +}); + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +// magical touchAction value +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; + +/** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +function TouchAction(manager, value) { + this.manager = manager; + this.set(value); +} + +TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, + + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, + + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + // not needed with native support for the touchAction property + if (NATIVE_TOUCH_ACTION) { + return; + } + + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, + + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +}; + +/** + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // pan-x and pan-y can be combined + if (hasPanX && hasPanY) { + return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} + +/** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +function Recognizer(options) { + this.id = uniqueId(); + + this.manager = null; + this.options = merge(options || {}, this.defaults); + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + + this.state = STATE_POSSIBLE; + + this.simultaneous = {}; + this.requireFail = []; +} + +Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + extend(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, + + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, + + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, + + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, + + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, + + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; + + function emit(withState) { + self.manager.emit(self.options.event + (withState ? stateStr(state) : ''), input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(true); + } + + emit(); // simple 'eventName' events + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(true); + } + }, + + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = extend({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, + + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } +}; + +/** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} + +/** + * direction cons to string + * @param {Const} direction + * @returns {String} + */ +function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} + +/** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; +} + +/** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +function AttrRecognizer() { + Recognizer.apply(this, arguments); +} + +inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, + + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, + + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; + + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +}); + +/** + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function PanRecognizer() { + AttrRecognizer.apply(this, arguments); + + this.pX = null; + this.pY = null; +} + +inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, + + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, + + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, + + emit: function(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + + var direction = directionStr(input.direction); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this._super.emit.call(this, input); + } +}); + +/** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + + emit: function(input) { + this._super.emit.call(this, input); + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + this.manager.emit(this.options.event + inOut, input); + } + } +}); + +/** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +function PressRecognizer() { + Recognizer.apply(this, arguments); + + this._timer = null; + this._input = null; +} + +inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 500, // minimal time of the pointer to be pressed + threshold: 5 // a minimal movement is ok, but keep it low + }, + + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, + + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +}); + +/** + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.65, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, + + attrTest: function(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.velocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.velocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.velocityY; + } + + return this._super.attrTest.call(this, input) && + direction & input.direction && + input.distance > this.options.threshold && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, + + emit: function(input) { + var direction = directionStr(input.direction); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } +}); + +/** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +function TapRecognizer() { + Recognizer.apply(this, arguments); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + + this._timer = null; + this._input = null; + this.count = 0; +} + +inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 2, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, + + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, + + process: function(input) { + var options = this.options; + + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + + this.reset(); + + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, + + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function() { + if (this.state == STATE_RECOGNIZED ) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Simple way to create an manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); +} + +/** + * @const {string} + */ +Hammer.VERSION = '2.0.4'; + +/** + * default settings + * @namespace + */ +Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { enable: false }], + [PinchRecognizer, { enable: false }, ['rotate']], + [SwipeRecognizer,{ direction: DIRECTION_HORIZONTAL }], + [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], + [TapRecognizer], + [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], + [PressRecognizer] + ], + + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } +}; + +var STOP = 1; +var FORCED_STOP = 2; + +/** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Manager(element, options) { + options = options || {}; + + this.options = merge(options, Hammer.defaults); + this.options.inputTarget = this.options.inputTarget || element; + + this.handlers = {}; + this.session = {}; + this.recognizers = []; + + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + + toggleCssProps(this, true); + + each(options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); +} + +Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + extend(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + + var recognizer; + var recognizers = this.recognizers; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } + + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, + + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, + + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } + + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; + }, + + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } + + var recognizers = this.recognizers; + recognizer = this.get(recognizer); + recognizers.splice(inArray(recognizers, recognizer), 1); + + this.touchAction.update(); + return this; + }, + + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; + + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } +}; + +/** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + var element = manager.element; + each(manager.options.cssProps, function(value, name) { + element.style[prefixed(element.style, name)] = add ? value : ''; + }); +} + +/** + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + +extend(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed +}); + +if (typeof define == TYPE_FUNCTION && define.amd) { + define(function() { + return Hammer; + }); +} else if (typeof module != 'undefined' && module.exports) { + module.exports = Hammer; +} else { + window[exportName] = Hammer; +} + +})(window, document, 'Hammer'); diff --git a/examples/todos/client/stylesheets/globals/base.lessimport b/examples/todos/client/stylesheets/globals/base.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/base.lessimport rename to examples/todos/client/stylesheets/globals/base.import.less diff --git a/examples/todos/client/stylesheets/globals/button.lessimport b/examples/todos/client/stylesheets/globals/button.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/button.lessimport rename to examples/todos/client/stylesheets/globals/button.import.less diff --git a/examples/todos/client/stylesheets/globals/form.lessimport b/examples/todos/client/stylesheets/globals/form.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/form.lessimport rename to examples/todos/client/stylesheets/globals/form.import.less diff --git a/examples/todos/client/stylesheets/globals/icon.lessimport b/examples/todos/client/stylesheets/globals/icon.import.less similarity index 71% rename from examples/todos/client/stylesheets/globals/icon.lessimport rename to examples/todos/client/stylesheets/globals/icon.import.less index 1f385cb411..6be0db9436 100644 --- a/examples/todos/client/stylesheets/globals/icon.lessimport +++ b/examples/todos/client/stylesheets/globals/icon.import.less @@ -1,10 +1,10 @@ @font-face { font-family: 'todos'; - src:url('icon/todos.eot?o4fu7p'); - src:url('icon/todos.eot?#iefixo4fu7p') format('embedded-opentype'), - url('icon/todos.woff?o4fu7p') format('woff'), - url('icon/todos.ttf?o4fu7p') format('truetype'), - url('icon/todos.svg?o4fu7p#todos') format('svg'); + src:url('icon/todos.eot?-5w3um4'); + src:url('icon/todos.eot?#iefix5w3um4') format('embedded-opentype'), + url('icon/todos.woff?5w3um4') format('woff'), + url('icon/todos.ttf?5w3um4') format('truetype'), + url('icon/todos.svg?5w3um4#todos') format('svg'); font-weight: normal; font-style: normal; } @@ -23,9 +23,13 @@ -moz-osx-font-smoothing: grayscale; } + .icon-unlock:before { content: "\e600"; } +.icon-user-add:before { + content: "\e604"; +} .icon-cog:before { content: "\e606"; } @@ -44,6 +48,9 @@ .icon-close:before { content: "\e60c"; } +.icon-cross:before { + content: "\e60d"; +} .icon-sync:before { content: "\e60e"; } @@ -53,6 +60,9 @@ .icon-check:before { content: "\e612"; } +.icon-share:before { + content: "\e617"; +} .icon-email:before { content: "\e619"; } diff --git a/examples/todos/client/stylesheets/globals/layout.lessimport b/examples/todos/client/stylesheets/globals/layout.import.less similarity index 85% rename from examples/todos/client/stylesheets/globals/layout.lessimport rename to examples/todos/client/stylesheets/globals/layout.import.less index 5cefa02a14..75ecccaa05 100644 --- a/examples/todos/client/stylesheets/globals/layout.lessimport +++ b/examples/todos/client/stylesheets/globals/layout.import.less @@ -37,6 +37,10 @@ body { background: @color-tertiary; opacity: 1; + @media screen and (min-width: 40em) { + left: @menu-width; + } + .content-scrollable { .position(absolute, 0, 0, 0, 0); .transform(translate3d(0, 0, 0)); @@ -48,13 +52,14 @@ body { .menu-open & { .transform(translate3d(@menu-width, 0, 0)); opacity: .85; - } + left: 0; - // Show menu on desktop, negate .menu-open - @media screen and (min-width: 40em) { - .transform(translate3d(0, 0, 0)); //reset transform and use position properties instead - left: @menu-width; - opacity: 1; + @media screen and (min-width: 40em) { + // Show menu on desktop, negate .menu-open + .transform(translate3d(0, 0, 0)); //reset transform and use position properties instead + opacity: 1; + left: @menu-width; + } } } diff --git a/examples/todos/client/stylesheets/globals/link.lessimport b/examples/todos/client/stylesheets/globals/link.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/link.lessimport rename to examples/todos/client/stylesheets/globals/link.import.less diff --git a/examples/todos/client/stylesheets/globals/list-items.lessimport b/examples/todos/client/stylesheets/globals/list-items.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/list-items.lessimport rename to examples/todos/client/stylesheets/globals/list-items.import.less diff --git a/examples/todos/client/stylesheets/globals/menu.lessimport b/examples/todos/client/stylesheets/globals/menu.import.less similarity index 92% rename from examples/todos/client/stylesheets/globals/menu.lessimport rename to examples/todos/client/stylesheets/globals/menu.import.less index 0ef6c0521c..a842950809 100644 --- a/examples/todos/client/stylesheets/globals/menu.lessimport +++ b/examples/todos/client/stylesheets/globals/menu.import.less @@ -85,6 +85,11 @@ color: @color-empty; .count-list { background: @color-primary; } } + + .cordova &:hover { + // Prevent hover states from being noticeable on Cordova apps + color: rgba(255,255,255,.4); + } } } } \ No newline at end of file diff --git a/examples/todos/client/stylesheets/globals/message.lessimport b/examples/todos/client/stylesheets/globals/message.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/message.lessimport rename to examples/todos/client/stylesheets/globals/message.import.less diff --git a/examples/todos/client/stylesheets/globals/nav.lessimport b/examples/todos/client/stylesheets/globals/nav.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/nav.lessimport rename to examples/todos/client/stylesheets/globals/nav.import.less diff --git a/examples/todos/client/stylesheets/globals/notification.lessimport b/examples/todos/client/stylesheets/globals/notification.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/notification.lessimport rename to examples/todos/client/stylesheets/globals/notification.import.less diff --git a/examples/todos/client/stylesheets/main.less b/examples/todos/client/stylesheets/main.less index 93b78465ac..69d5c249e7 100644 --- a/examples/todos/client/stylesheets/main.less +++ b/examples/todos/client/stylesheets/main.less @@ -1,29 +1,29 @@ -@import 'util/reset.lessimport'; +@import 'util/reset.import.less'; // Mixins & utilities -@import 'util/helpers.lessimport'; -@import 'util/lesshat.lessimport'; -@import 'util/text.lessimport'; -@import 'util/typography.lessimport'; -@import 'util/variables.lessimport'; +@import 'util/helpers.import.less'; +@import 'util/lesshat.import.less'; +@import 'util/text.import.less'; +@import 'util/typography.import.less'; +@import 'util/variables.import.less'; // Global namespace -@import 'globals/base.lessimport'; -@import 'globals/button.lessimport'; -@import 'globals/form.lessimport'; -@import 'globals/icon.lessimport'; -@import 'globals/layout.lessimport'; -@import 'globals/link.lessimport'; -@import 'globals/menu.lessimport'; -@import 'globals/nav.lessimport'; +@import 'globals/base.import.less'; +@import 'globals/button.import.less'; +@import 'globals/form.import.less'; +@import 'globals/icon.import.less'; +@import 'globals/layout.import.less'; +@import 'globals/link.import.less'; +@import 'globals/menu.import.less'; +@import 'globals/nav.import.less'; // Global templates -@import 'globals/list-items.lessimport'; -@import 'globals/message.lessimport'; -@import 'globals/notification.lessimport'; +@import 'globals/list-items.import.less'; +@import 'globals/message.import.less'; +@import 'globals/notification.import.less'; // Templates -@import '../templates/lists-show.lessimport'; -@import '../templates/auth.lessimport'; -@import '../templates/app-not-found.lessimport'; -@import '../templates/loading.lessimport'; \ No newline at end of file +@import '../templates/lists-show.import.less'; +@import '../templates/auth.import.less'; +@import '../templates/app-not-found.import.less'; +@import '../templates/loading.import.less'; \ No newline at end of file diff --git a/examples/todos/client/stylesheets/util/helpers.lessimport b/examples/todos/client/stylesheets/util/helpers.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/helpers.lessimport rename to examples/todos/client/stylesheets/util/helpers.import.less diff --git a/examples/todos/client/stylesheets/util/lesshat.lessimport b/examples/todos/client/stylesheets/util/lesshat.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/lesshat.lessimport rename to examples/todos/client/stylesheets/util/lesshat.import.less diff --git a/examples/todos/client/stylesheets/util/reset.lessimport b/examples/todos/client/stylesheets/util/reset.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/reset.lessimport rename to examples/todos/client/stylesheets/util/reset.import.less diff --git a/examples/todos/client/stylesheets/util/text.lessimport b/examples/todos/client/stylesheets/util/text.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/text.lessimport rename to examples/todos/client/stylesheets/util/text.import.less diff --git a/examples/todos/client/stylesheets/util/typography.lessimport b/examples/todos/client/stylesheets/util/typography.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/typography.lessimport rename to examples/todos/client/stylesheets/util/typography.import.less diff --git a/examples/todos/client/stylesheets/util/variables.lessimport b/examples/todos/client/stylesheets/util/variables.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/variables.lessimport rename to examples/todos/client/stylesheets/util/variables.import.less diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js index 221febaf62..721d5ec49d 100644 --- a/examples/todos/client/templates/app-body.js +++ b/examples/todos/client/templates/app-body.js @@ -4,21 +4,39 @@ Session.setDefault(MENU_KEY, false); var USER_MENU_KEY = 'userMenuOpen'; Session.setDefault(USER_MENU_KEY, false); -Template.appBody.rendered = function() { +var SHOW_CONNECTION_ISSUE_KEY = 'showConnectionIssue'; +Session.setDefault(SHOW_CONNECTION_ISSUE_KEY, false); + +var CONNECTION_ISSUE_TIMEOUT = 1000; + +Meteor.startup(function () { if (Meteor.isCordova) { // set up a swipe left / right handler - this.hammer = new Hammer(this.find('#container')); - this.hammer.on('swipeleft swiperight', function(event) { - if (event.gesture.direction === 'right') { - Session.set(MENU_KEY, true); - } else if (event.gesture.direction === 'left') { - Session.set(MENU_KEY, false); - } + var hammer = new Hammer.Manager(document.body); + + hammer.add(new Hammer.Swipe({ + velocity: 0.1 + })); + + hammer.on('swipeleft', function () { + Session.set(MENU_KEY, false); + }); + + hammer.on('swiperight', function () { + Session.set(MENU_KEY, true); }); } - + + // Don't show the connection error box unless we haven't connected within + // 1 second of app starting + setTimeout(function () { + Session.set(SHOW_CONNECTION_ISSUE_KEY, true); + }, CONNECTION_ISSUE_TIMEOUT); +}); + +Template.appBody.rendered = function() { this.find('#content-container')._uihooks = { - insertElement: function(node, next) {; + insertElement: function(node, next) { $(node) .hide() .insertBefore(next) @@ -68,7 +86,11 @@ Template.appBody.helpers({ } }, connected: function() { - return Meteor.status().connected; + if (Session.get(SHOW_CONNECTION_ISSUE_KEY)) { + return Meteor.status().connected; + } else { + return true; + } } }); diff --git a/examples/todos/client/templates/app-not-found.lessimport b/examples/todos/client/templates/app-not-found.import.less similarity index 100% rename from examples/todos/client/templates/app-not-found.lessimport rename to examples/todos/client/templates/app-not-found.import.less diff --git a/examples/todos/client/templates/auth.lessimport b/examples/todos/client/templates/auth.import.less similarity index 100% rename from examples/todos/client/templates/auth.lessimport rename to examples/todos/client/templates/auth.import.less diff --git a/examples/todos/client/templates/lists-show.lessimport b/examples/todos/client/templates/lists-show.import.less similarity index 100% rename from examples/todos/client/templates/lists-show.lessimport rename to examples/todos/client/templates/lists-show.import.less diff --git a/examples/todos/client/templates/loading.lessimport b/examples/todos/client/templates/loading.import.less similarity index 100% rename from examples/todos/client/templates/loading.lessimport rename to examples/todos/client/templates/loading.import.less diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js index acdbd59164..b5f3952f19 100644 --- a/examples/todos/mobile-config.js +++ b/examples/todos/mobile-config.js @@ -7,13 +7,21 @@ App.info({ }); App.icons({ + // iOS 'iphone': 'resources/icons/icon-60.png', 'iphone-2x': 'resources/icons/icon-60@2x.png', 'ipad': 'resources/icons/icon-72.png', - 'ipad-2x': 'resources/icons/icon-72@2x.png' + 'ipad-2x': 'resources/icons/icon-72@2x.png', + + // Android - XXX these are the same as iOS for now + 'android_ldpi': 'resources/icons/icon-60.png', + 'android_mdpi': 'resources/icons/icon-60.png', + 'android_hdpi': 'resources/icons/icon-72.png', + 'android_xhdpi': 'resources/icons/icon-72@2x.png' }); App.launchScreens({ + // iOS 'iphone': 'resources/splash/Default~iphone.png', 'iphone_2x': 'resources/splash/Default@2x~iphone.png', 'iphone5': 'resources/splash/Default-568h@2x~iphone.png', diff --git a/examples/todos/public/icon/todos.eot b/examples/todos/public/icon/todos.eot index d06f492e5436b31e327a30f4e1acd0f81db9ddd0..932ee9360d49c318a7d944893c19c5ec9f731aa1 100755 GIT binary patch delta 1229 zcmZuwO>7%Q6n<}KXLf9_f7ab~y!mm~cCejNN*udxB*2MOg+oC_LOB#J;6jNH&5z^? zil{IL4k!|;DqlF1N?f4gP=Sn44j_8y0l}pby|j?X64Kr(BB7$9s9E0lM-YkCdvE4@ zZ@-QN0N^A5Tw86lHfc-{-lkEmUU>Jd zcWz#PNca{&@^L^**jsO`x#xd*yLdo}4``9f=0@uxFe*Xno6ZWpxB3xHGxS3Y zVu0ZJ;OoBhV}8O<`eVN9=lz0T4IT%9;tcD;5C2acgWt#XaU2IXa1Y$a?%(bs_Ye1h z+oNw|r>sqOPit*#YmkN+{1rcj=V2A#H8r>*3~MADk(JZ{Kv+DoC9Fr!{l%W|gaOoWMv_ULn=NGTMF$k~VtMWFj5 z`<|r*ctL+=!OmC4xz2=K)^MY@Q;U;qhr{A!ug(q<&M)t%&hhfICNS!Pxvw&r$G(L*u++5#m z73XqfPCt^~!bNK~ya(13})ZffVU$v=PwTSIorhJ9E7+OBKv#ex#Rhno@JS)vs zok<-JKXuxl#it@6X-;v~1RK+eCC$A(6^Y64;6Z=VtTQ%X*NG#<4mc zB2SZN$UXAxaC8+=F36+gOXLOe#meCn)7-bk37^b8r78d|%0U&<^kmg9w zsZ6t3vN9UT-vJa($w*C1Va%`XW?&EksW;023NT+~{0!uW0Qo8zxg`~{3{3Vweg%;4 zk&~aCsMeu)2gpAFn|Hr@}%mK8-xFEl{gn=0- z#UNrcIfSt~u>r`G0Xm48fro*SLE#z0Gmd9G&-k7RJQI2*`Aqql+B1{?fB*jn=>W^J zJ>$Y6%lQAX6pQ44$$yf6CI3kNmi#LDM)H;9U7)FqlO35vCI>LF0x`?xP^KEj%^z9z zFl)0jDE$A=_<(Ug&~9r62L@M$5Qb!iA_fLkB{f?{6EkB&BQaS<5jJH*;mJoik~kSS zcz8HKc(OXDD{npzM+GN0H)jP04oHGY(PD{XWnz8BmcurS?GL*OyAOvE&?Jy)LX3F~z^DKMCScGA KZ@_lTJQ diff --git a/examples/todos/public/icon/todos.svg b/examples/todos/public/icon/todos.svg index 720db28555..d6a1342c46 100755 --- a/examples/todos/public/icon/todos.svg +++ b/examples/todos/public/icon/todos.svg @@ -8,15 +8,18 @@ + - + + + diff --git a/examples/todos/public/icon/todos.ttf b/examples/todos/public/icon/todos.ttf index bfd1157aded28215aeaae0f6430b8d8c9a1c3d55..afd1056a946b358d30f289d26085508b301f3cf8 100755 GIT binary patch delta 1161 zcmZuwO>7%g5T4n$@9nd9{j;lG$D72?t{rT*O(Bk5Hxl3=RY3@(R;qd^T)-_QIW#{~ zDkuWg95^5ZqR1Bxr4kpYI20r!lmmz!dIAnb^g`Q2kt*%2P^l^cMU9zf$AU<#X6MZ} zv)}uf@9mw+&4U+%_9xpfTmisw0JyZ!T3e+tO?aI~xp4N)*WS2#`61zJ0M7NrGp$$g zr;kDa_g$(t7Ae6t@K3_u5uRLJI(NPZ+9kqUgioAZIo&#Vvo-_Z)d^26wa%|X9%&8l z6~e)CYso+J>+9tmO1wjh)K*v4&HnX}^T}1K!sblZ%s6L9L;P?C;|B?T<|Cj%Vf6w3QT*R>Z6<)x$23eTI z+xQ_o3kv{;XBvl_sO(U^RDK-Es?!aXZIsIO2Ek%M7$V~(aU_qmJXM8}L^3b0G6Sn& zk?8bgPJQmVnJ1B4ZKm-wl2fJYcEPs8lxUlL!t?gU1oL%aXd2^;^L!ZQIRzSOlIy-E z;uX&g^tjIBJRR6}!9iBBq_is1vgE(fq|WrXAf9xBL?W$WCdkI6k>Y&9cE-jWdxG-K~gId~31dbMRrs+(?iHYuTx|mssnWo%l%9sh=DfT_f3J7{V+`=DVKRf|-I0DC^ zMdEc_<5Z_@%xk#P`NcTW_2d=SMi9LSxA7JP0FRYb>q>2YErkUZk!7g9Ie;0bYfp@F{%O{n-o|2|K55Fx}w_ zEYmjZdg%ZT#Rv}#blA;!HmMVmGP77^O5^=lEll^#Reria=Jh@4U7f|EJ6)VbuizHx zME%1I^;L&z)XUhuX2}<+i?R8g8}mx0m!yT3#FNrmYci?h-ls|Dvw6;pNh`-y6I{$H zmbC8QSDu&*ckcCr#U^6|c9S?ljNeh|jhqm~RNV;R7$Mw5UKN=lRL0Yf7;&1`!7^Qn&BCGvz-r|FUrfyo}ouK@Bra`KZC)jAaK0Qm=ie6`%f ziUI~{MxY%+FMxc7yu@6|)XQb+{}>pAIe?ZJ7vvY0Ffaq97({F)?x>b-0J3C&?qO!& zVPIrXc*gLI;~CF0zGni@geC_tiW;&#Nj_74ruNL_|KI=r85sXRmSU0oFZoaM zujC)e-;!S?-$=faybCmiaq>b&iOCxnSvT)wtYO?7%Cd)9o1H=7|9{2@jQfH1STi^< zxH5z=Br_B-FsLf2*)p1#85Z8;Q-;u-5jpG`8*sIoZQ@; z6&yT_43jT$IByo=T*vr6sl?G^F-HeVUInLz$xxS%&L9YO#9$M~7? z(BuswvcjK%K12mVlOKqPXUYNfDFCq|lm@Xum=}m0fLIO6cLUNOtOz!Qi$R1zj$s$m z3}!v%2`pMHajZj5LzhEhNwzX9tjYVmb^ql z2?)_5^+#2e7F9^i4;qy}rHvx~wGH{x2u1zTrc$b+N==){Z6ymuMMa{NmcY8-nS0k> z2Lt8qo!K*I&YYQZX3k^ollN@hDoEhT7KO|InK%44!)u>=?wy(zf*fFXb8*TaTz&Z9 zo+H5RNBbo%C$8Q3(|vo60%urgGcA|+z5`D^3Y;fI-+3-izIyWA{d@O3B1GyU`deJ+ zx8E=A2U3VMj~V7-UZ#KVKX~joa1&^6=TZ^IO9u`=%yi#GoADEy-k6y_xaT;$ytgn#h3b) zvP-$8%F@VEbNR#NWzb=@x?e4Y*XgI_zi+TM&<2rP&UJDh=Kh=ePwt<&w{nZYY?{Hx zR3r#9#Pq6s60Eg-qZVORj!(v!Vgb54N9V*I@u+xCi0bTSnyoh*lT<6$8}(-825L0R zjq*sPKEicrw%KaW(adxvo2M)~^MG3zRPzT-Ql+fyD5cSr2AHm=hDfE-smx4C(>1E4 zbZIu*9I364rZQRXpKfiTIhw_4OybADYZ{$@#G|olCZ6{qNo9mp$R%eW(YG;^Z>Eyj z0mmcHp&gFb`58@he*a5pN!PYr{MpiT98amtRc2;NW=Axb9*M@{p^(!bmA2<#0!o%# zFOp5Bn)$)7L-Z!d91l$CkLS-CJ1hviN(aTC=Jwc1zcZMn$4y6sT5}}ftsH+#&F}ltt%85iN zrd(M_r#FU_nX{B_7^XC(%$G`e3BVx3kyg%7;n8%eXoW2qmhoaDQSKvilvOgyQmjJ5 zmT83*#yNe(NF;7hrq~~L?3k2=MBl(bU!ovo%yz>4#S9s7FH-C?q-j{D3S%Ipy4*tU zXvlS)jjj`dLo!8vxkG=W*ToMhO9zEW`clr|Sk$K*T3z!5!6D#^{5LToP>V(v2s+{u zsE?H2GsHM3lyzD!H@clM0%}G1=p1K+zbQU?3Wuu=Jq8;!M||4aZM_S2I>q}j&b;wr zMd^%+@pAC`XMHGWVR%=FOo2J*O=qq*1uaYtBbn#<@#^LCVc!xUFhO_WBU6<1twoDF z6Q~9Xf*t6Sz@wR-ZO`Y+^K0Wv50Z`E!QhOv>&;m`3S^aEM=e(>Pm%H@_9<$|_>|Zd zHX7KJsf?&)U%$xVpZg}mO0*K6l9-_vBAz?S|79a^( zj+x(-u0$j8cqCd$lL|xHkQajWnzl(^+HqjzPTB)xhu|b^7nT9q;S{~d()-KT(xkc;NkB&JJsdZ6d#qzM)QXvTKSb^Gn z6_^TI^HpGlRvhb+@@tO;My{)lgArKEs0$Dp6YXQOQQ&+#AWjO;u;omDyy) zESWWS>VZ!KRb_2cyZqH&x^N(DW0@yV?C=40Q_%r8MEQ_A5am|qgCj?N{(g=oa+|ox z<;Pv%i(P;YZ+2WF*V*ib5Ed>lo|+!q(&*@D=LITu7C+}X$Kk9($GPvL5OiRP5_E6{ zI+zhRh%Mq~$Ump;875alfsw&-0l;O%NU;-xG&AfCs8w&*TMaIDt(~>uhO)NJz$Iz0 z#&2dzw9U@zrb$`DwD>riw9|x%NQmB|+lL3ML!I}lSF2aIsCb6%lMw}q1-6II>u|q2 z*!h~&&yms}60Hta2RrW%Umd>MpNT8Z2TW1KsuvO4>*5aa7+^nWYp>=zJl~~Ov~OW& zr9BtRpx>FdXS=oRrYLR{U&CA(WvlWOp{k7_cwj5qt?2?+I9f5vW)TMbee(B4@1>1V zoMQN)#y^vO2t(~hFI{6(R(7>UUr}(laeK?W?2`Z&7A#T#=eGa}aBl9_(zc1Q?S*oY zs8}v+ADh@#Dwc`L#T+@xNk+XwJW)v|sB@{sVGCIEGhKti8iK^x-y6M5WD%Ndp0IcuOyFF7 zyW~uv$24m!MGHBD-e>J}Shn5`Zk5}Z8S__K%{IuY=|+v-QE@wL4-XF9RxPx1nNiPA zuiBbd)<3jTidjrD%L0V#h5Txq7m=4KJbskg1d!}d*!Ot&X5BdHx zE!yysxOG<9vYT~emPpgaX|~aGRq=yf9SORhcJ*Fq+C3K||MoMB>{ek1IrHniHnH!e zb0Hh*AJq2_eU%xs*Is3&^u0%4S1vxo!45Z?mCFrZYizikK|Sh+W{t>2=WL_Yr>^f#*p~e^_$`v*?zs8 z)-|qAyg#Wr^5b+lRe`ZWk(y;sox}?UG%i zMWn7uuc)(MFYts6akI1klz}u44^q!lofn2_^u-rx7t#-`-*xCc+;t@sVMyb>jn8vV z{QTLonWvxD=VGh)0iC7YB7^l$!%t;Wt1+rMkA!Fj7G#^Jp|`j?c~T#X)11xhHi2ZT z1CskroA`u6xGV1lze(m-EyIzGG*@C=CKW>_Rau|ky6o_UswA3-)!)UJm=f&w7IB|= zLVQoWf~jD4rSb@Dw*`G>vX#X3h}lm?RJ9xS9q=0K1+Nv)yru&@KVt_iBB{N|CzPf* z!}WmEcw}S^cb=fom6+;KYi!H*yeYIi_cbgF79{*-!8lVL8Rwz zlYX}z!{6`N(eOjpG$#!QRl2vq(|~dTr5`1aQbZ{Q{|s|cC=rwelo6D96vl52N=fq! z<6B@}oTWR=QS+4LSwFEZ$!Fy+)JeN&-);ZKnQ*o{&x9V*D@xNL{YACA(B4G}d_{a! zQ?Wc@bn!BoGK$>LhfUy%0c-)jJ%A-_DICBG-$BO$IE;JSmyoTH6#|BN`moQ_hkc$t z?DOKbAaH;tA4V}~C(d~~&mOXOaB yDtkg4z-99B9{g54{1_PQ1H~cDbPxLXVw$3ONIZr5^WtGp-G#zaO|mqf`1}vCudomR literal 4260 zcmb7HeQ;b=6~Ei;4VRE^V(3$Y;G|V4Vh7qJfP4%Df%28K2t_*#DGl@^nkEZrB5AkD zZuT>~XTRUeZZ?}nv4u1(h7O-iCxZf=k)neN`j6-g(?CXnv5u5^JM#kZci-Dhqk;o> z_nvp|x##}wz2}~L&U=q;T)%$frcE0et3Jpo7)tg1%qE}zTW(svz7Enej8#4@YyG8V z?{2*3@_NRWAA)?VtYX#tdk=NCJGutvqt|?r&tnjt6!dLBIuVA(J zED)8RmFG}LK`Zp|i!lDhDoJ1YlBDN?R8H2g^MQ2U@~WDzT)6V$@2tJznj3DueZxJQ zO>C3&uI*jdTfesVmMhnqp= zwlJ$^HFD8*b`H*Lxvi?qXMdXiuzXqh=5j+^Al^NXCFV1TY>u+d|!luU* z(g!$2%^!hMBoU5>;}I&B=znsNXe1gY0X3+G!48oy4iQaoI&u8?33{H6K9b*Vjg9-$ zL6tJ3X&^C*M`ETt+WX7RPi-V|E!}wsU1zBZaz0GlLq1<*kmQUJLB>8FiBK3#kLJyg z&_5tv1jF1E6~_Dej}`qDB4e`ws&D4{o!2Y0zdyH!_E3L6$Y9c&4hZVv7KSxk&>@~q zB{dor4*kBuB}%TJXFa3-F>5Un8#Pb)bS5KmIX*n3g@%KI9_8dpxw7tzCl6imQ{oA4 z!W$nH{r%kI@w;d*xzetTTL5opFysw-MIUhs6kUFg+wBQJOHdyl40=O@L!v*&JsAvw z(xROKv(NALNYuf&H!+wLG|nj>$h)(itShybBx-Otqzz@n$OzA7(^x8v`Sb3K7|8MX za6(HCi*e#(luu={*-Q$(5@R^2C5Gc-WLoJAINjYYL0dTm!od(qFdQJUmAI?h?F@8@ z$z41diUlKqC^~{6(b>sUomuBtw|I_tijv_(D1m;0ZMX7+t_k;KKujLyi9|A%vNmke zC?!o@i8q;=$R5lKdY)4%mQ0`|<0%r)6VD&WPNXKqu1OwBgaK~#i^GR`;E;R5bwIAm z0u4|wj)~(^OVA6vJMYYPrNpjXT<##a#D+xBjfE1T^DsYVoUd%62OgkJbngpWUY6bq zJbA`xQln{jrR24EN+pf5gPI38VYr@Ef{_q~;EtxpchDmT=?EQp{BaOE_y~1Sh@^&9 zEO&LA?mA5AR9rKmqp?&}#bhsUdEs7y&uMy@;vp}tg&@6>Q%2L^-&hs=(@P$>K7<~x z*JBFxt-7WdjOf?U^r>FlNcj`S8sZk~jre?W*hXmK5_y49yfZm^!gy6~w|Iq~E?pta z_JsawuGFNA7uy!b$TNy=Cwj;Ld4}t^&)XFvPTl&m`mdc&75JjUg67L+~iD*0)iwQla=Xew@P^#jkmk<%9Pl%iQm7PZ? zCXVjta&lwT7*%#Wr4Q%>M|TvsrIS%@m9Kz?(1u9 zM``T?OReJ&PxVdH49$#BPoYeY&){^QQH*L@y_!Ic>eH+BYQq2YX-W0!)u$nrZlT+Z ztx7%7taJd)y=d`<2J5(^o`_rX!G>8aRQ^BI2ruy@K9($2?<|ATrO`QE1bL6r%+J zv-!X9jAo;G(Sa;P9ePF!{73a>qnU_m`D_cs(pfE36`teJPwQ7GX&<@$KA&%Ze5zIkVmakAy)NpA5NJK*<==H}O0`0Hzw#s*^*HO@Ai zB7N2DsZ+E1Dmv9L+epT$hDPzYUa!zh-?TJp>$qv)K56Ve)9~Z1@(`x`U~8Hlm&P84 z;f13R(hn$p6^ru;kB9I1;Hp1{?xTH9|!?1dGBafx>F2{a9?_W{ICEGU~|*0+;TZYt5_l-j!k2$l!a+- zH0+9x0-=y!0{UDY*T6tWN88>lw1wKnI*#l<;F=6PDMt74v=4Sdp%GtNv>r!<3?M8A z5tc(C(b@|8l3Vqu(1Lx3hxypI-@fr*^cMZ$*wpK>B(@~oc(KUYqH(x?ymaBu%qUSA z>Z1JY%fPT7LFVj0E5;z;IFaT7K!3jTx7WgMGJ7L$JBbe#^EPm-yp4IkP~JZNJH>i^ zI6=qnr@O870^8Uo-z@ZM18H66a2XOyf%6der-I1gv_F^IPx~on=KG-6AHYd>6{;1V z>Xs*M{0u+4Zs%6p=QqzruQ6(h;lny3Br2Sdl?sIZ3w^3|R*piC{ttzckz^<_grpZL zT2y*V$zzuCVjgkXe3S7k+I>+IQBvj}bEp-P3(!tW-%6Td6WokFXyT~i6vv^V=)~vO zJgDf`8!LHyD1ks$Dso8al&xo}MaZRzSUfKD>-CjnY?wz>*EjH|9#ixgGA=P3#wEH# z#xDJgQcTo(lhMRgI2CTO5B5`qQLon<_`%g=+XoL;RiQWOO=h}JnhEWF1>skwTSLk% z9aYWBD=tUt_`#mCZDB(X^H@n6$JJY43c0;LnSxFbm-A3oIxA&VEsIw_2uryULgUFV zqWw3em`jV$W(fN%=r5u?zvAx-?b+AASH5lL;DTehQ4kv4C*SepB0sYe(=6>XT^Ix5 z!h-%!pQE6yC};{*%I~r=yznO($Ja}5#hEP+R9*KGJ5Mf^vEN@dzVqyJ;S<}3wwKWs=1yb>#>hQeTLb^0i6nbUrKZHl zr`$A{b?%Tb$9FD|y%<0sNvoa!>m>r5kkI{7zU;HZTF From 1a73a4a6c39c81baadbaa731a9a161a2881d3f8c Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 16:49:54 -0700 Subject: [PATCH 053/283] Update todos --- docs/.meteor/versions | 117 +- examples/todos/.meteor/packages | 2 - examples/todos/.meteor/release | 2 +- examples/todos/.meteor/versions | 7 +- examples/todos/client/lib/hammer.js | 2463 +++++++++++++++++ .../{base.lessimport => base.import.less} | 0 .../{button.lessimport => button.import.less} | 0 .../{form.lessimport => form.import.less} | 0 .../{icon.lessimport => icon.import.less} | 20 +- .../{layout.lessimport => layout.import.less} | 17 +- .../{link.lessimport => link.import.less} | 0 ...tems.lessimport => list-items.import.less} | 0 .../{menu.lessimport => menu.import.less} | 5 + ...message.lessimport => message.import.less} | 0 .../{nav.lessimport => nav.import.less} | 0 ...on.lessimport => notification.import.less} | 0 examples/todos/client/stylesheets/main.less | 42 +- ...helpers.lessimport => helpers.import.less} | 0 ...lesshat.lessimport => lesshat.import.less} | 0 .../{reset.lessimport => reset.import.less} | 0 .../{text.lessimport => text.import.less} | 0 ...aphy.lessimport => typography.import.less} | 0 ...ables.lessimport => variables.import.less} | 0 examples/todos/client/templates/app-body.js | 44 +- ...d.lessimport => app-not-found.import.less} | 0 .../{auth.lessimport => auth.import.less} | 0 ...show.lessimport => lists-show.import.less} | 0 ...loading.lessimport => loading.import.less} | 0 examples/todos/mobile-config.js | 10 +- examples/todos/public/icon/todos.eot | Bin 5368 -> 6000 bytes examples/todos/public/icon/todos.svg | 5 +- examples/todos/public/icon/todos.ttf | Bin 5212 -> 5844 bytes examples/todos/public/icon/todos.woff | Bin 4260 -> 5920 bytes 33 files changed, 2623 insertions(+), 111 deletions(-) create mode 100644 examples/todos/client/lib/hammer.js rename examples/todos/client/stylesheets/globals/{base.lessimport => base.import.less} (100%) rename examples/todos/client/stylesheets/globals/{button.lessimport => button.import.less} (100%) rename examples/todos/client/stylesheets/globals/{form.lessimport => form.import.less} (100%) rename examples/todos/client/stylesheets/globals/{icon.lessimport => icon.import.less} (71%) rename examples/todos/client/stylesheets/globals/{layout.lessimport => layout.import.less} (85%) rename examples/todos/client/stylesheets/globals/{link.lessimport => link.import.less} (100%) rename examples/todos/client/stylesheets/globals/{list-items.lessimport => list-items.import.less} (100%) rename examples/todos/client/stylesheets/globals/{menu.lessimport => menu.import.less} (92%) rename examples/todos/client/stylesheets/globals/{message.lessimport => message.import.less} (100%) rename examples/todos/client/stylesheets/globals/{nav.lessimport => nav.import.less} (100%) rename examples/todos/client/stylesheets/globals/{notification.lessimport => notification.import.less} (100%) rename examples/todos/client/stylesheets/util/{helpers.lessimport => helpers.import.less} (100%) rename examples/todos/client/stylesheets/util/{lesshat.lessimport => lesshat.import.less} (100%) rename examples/todos/client/stylesheets/util/{reset.lessimport => reset.import.less} (100%) rename examples/todos/client/stylesheets/util/{text.lessimport => text.import.less} (100%) rename examples/todos/client/stylesheets/util/{typography.lessimport => typography.import.less} (100%) rename examples/todos/client/stylesheets/util/{variables.lessimport => variables.import.less} (100%) rename examples/todos/client/templates/{app-not-found.lessimport => app-not-found.import.less} (100%) rename examples/todos/client/templates/{auth.lessimport => auth.import.less} (100%) rename examples/todos/client/templates/{lists-show.lessimport => lists-show.import.less} (100%) rename examples/todos/client/templates/{loading.lessimport => loading.import.less} (100%) diff --git a/docs/.meteor/versions b/docs/.meteor/versions index 73807b599c..ce3da053a0 100644 --- a/docs/.meteor/versions +++ b/docs/.meteor/versions @@ -1,59 +1,58 @@ -appcache@1.0.2-pre.2 -application-configuration@1.0.3-pre.2 -autoupdate@1.1.2-pre.4 -base64@1.0.1-pre.2 -binary-heap@1.0.1-pre.2 -blaze-tools@1.0.1-pre.2 -blaze@2.0.2-pre.2 -boilerplate-generator@1.0.1-pre.4 -callback-hook@1.0.1-pre.2 -check@1.0.2-pre.2 -code-prettify@1.0.1-pre.2 -coffeescript@1.0.4-pre.3 -ctl-helper@1.0.4-pre.2 -ctl@1.0.2-pre.2 -ddp@1.0.10-pre.2 -deps@1.0.5-pre.2 -ejson@1.0.4-pre.2 -fastclick@1.0.1-pre.3 -follower-livedata@1.0.2-pre.2 -geojson-utils@1.0.1-pre.2 -html-tools@1.0.2-pre.2 -htmljs@1.0.2-pre.3 -http@1.0.7-pre.2 -id-map@1.0.1-pre.2 -jquery-waypoints@1.0.1-pre.2 -jquery@1.0.1-pre.2 -json@1.0.1-pre.2 -less@1.0.10-pre.3 -livedata@1.0.11-pre.2 -logging@1.0.4-pre.2 -markdown@1.0.2-pre.2 -meteor-platform@1.1.2-pre.4 -meteor@1.1.2-pre.3 -minifiers@1.1.1-pre.2 -minimongo@1.0.4-pre.3 -mobile-status-bar@1.0.1-pre.2 -mongo@1.0.7-pre.2 -observe-sequence@1.0.3-pre.2 -ordered-dict@1.0.1-pre.2 -random@1.0.1-pre.2 -reactive-dict@1.0.4-pre.2 -reactive-var@1.0.3-pre.2 -reload-safetybelt@1.0.1-pre.2 -reload@1.1.1-pre.2 -retry@1.0.1-pre.2 -routepolicy@1.0.2-pre.2 -session@1.0.3-pre.2 -showdown@1.0.2-pre.2 -spacebars-compiler@1.0.3-pre.2 -spacebars@1.0.3-pre.2 -spiderable@1.0.4-pre.2 -standard-app-packages@1.0.3-pre.2 -templating@1.0.8-pre.3 -tracker@1.0.3-pre.2 -ui@1.0.4-pre.2 -underscore@1.0.1-pre.2 -url@1.0.1-pre.2 -webapp-hashing@1.0.1-pre.2 -webapp@1.1.3-pre.3 +appcache@1.0.1 +application-configuration@1.0.2 +autoupdate@1.1.1 +base64@1.0.0 +binary-heap@1.0.0 +blaze-tools@1.0.0 +blaze@2.0.1 +boilerplate-generator@1.0.0 +callback-hook@1.0.0 +check@1.0.1 +code-prettify@1.0.0 +coffeescript@1.0.3 +ctl-helper@1.0.3 +ctl@1.0.1 +ddp@1.0.9 +deps@1.0.4 +ejson@1.0.3 +fastclick@1.0.0 +follower-livedata@1.0.1 +geojson-utils@1.0.0 +html-tools@1.0.1 +htmljs@1.0.1 +http@1.0.6 +id-map@1.0.0 +jquery-waypoints@1.0.0 +jquery@1.0.0 +json@1.0.0 +less@1.0.9 +livedata@1.0.10 +logging@1.0.3 +meteor-platform@1.1.1 +meteor@1.1.1 +minifiers@1.1.0 +minimongo@1.0.3 +mobile-status-bar@1.0.0 +mongo@1.0.6 +observe-sequence@1.0.2 +ordered-dict@1.0.0 +random@1.0.0 +reactive-dict@1.0.3 +reactive-var@1.0.2 +reload-safetybelt@1.0.0 +reload@1.1.0 +retry@1.0.0 +routepolicy@1.0.1 +session@1.0.2 +showdown@1.0.1 +spacebars-compiler@1.0.2 +spacebars@1.0.2 +spiderable@1.0.3 +standard-app-packages@1.0.2 +templating@1.0.7 +tracker@1.0.2 +ui@1.0.3 +underscore@1.0.0 +url@1.0.0 +webapp-hashing@1.0.0 +webapp@1.1.2 diff --git a/examples/todos/.meteor/packages b/examples/todos/.meteor/packages index b9dd328d10..da825e90c6 100644 --- a/examples/todos/.meteor/packages +++ b/examples/todos/.meteor/packages @@ -9,5 +9,3 @@ less iron:router accounts-password fastclick -noorderstorm:hammer - diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 0b324bf505..0755219e60 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@0.9.4-pre.8 +METEOR@0.9.4-pre.11 diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index 3ab316d172..207ecba4d6 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -1,12 +1,12 @@ accounts-base@1.1.2-pre.2 accounts-password@1.0.3-pre.2 application-configuration@1.0.3-pre.2 -autoupdate@1.1.2-pre.3 +autoupdate@1.1.2-pre.4 base64@1.0.1-pre.2 binary-heap@1.0.1-pre.2 blaze-tools@1.0.1-pre.2 blaze@2.0.2-pre.2 -boilerplate-generator@1.0.1-pre.3 +boilerplate-generator@1.0.1-pre.4 callback-hook@1.0.1-pre.2 check@1.0.2-pre.2 ctl-helper@1.0.4-pre.2 @@ -33,13 +33,12 @@ less@1.0.10-pre.3 livedata@1.0.11-pre.2 localstorage@1.0.1-pre.2 logging@1.0.4-pre.2 -meteor-platform@1.1.2-pre.3 +meteor-platform@1.1.2-pre.4 meteor@1.1.2-pre.3 minifiers@1.1.1-pre.2 minimongo@1.0.4-pre.3 mobile-status-bar@1.0.1-pre.2 mongo@1.0.7-pre.2 -noorderstorm:hammer@0.1.3 npm-bcrypt@0.7.7 observe-sequence@1.0.3-pre.2 ordered-dict@1.0.1-pre.2 diff --git a/examples/todos/client/lib/hammer.js b/examples/todos/client/lib/hammer.js new file mode 100644 index 0000000000..5226688998 --- /dev/null +++ b/examples/todos/client/lib/hammer.js @@ -0,0 +1,2463 @@ +/*! Hammer.JS - v2.0.4 - 2014-09-28 + * http://hammerjs.github.io/ + * + * Copyright (c) 2014 Jorik Tangelder; + * Licensed under the MIT license */ +(function(window, document, exportName, undefined) { + 'use strict'; + +var VENDOR_PREFIXES = ['', 'webkit', 'moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = document.createElement('div'); + +var TYPE_FUNCTION = 'function'; + +var round = Math.round; +var abs = Math.abs; +var now = Date.now; + +/** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ +function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); +} + +/** + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; +} + +/** + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge] + * @returns {Object} dest + */ +function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; +} + +/** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +function merge(dest, src) { + return extend(dest, src, true); +} + +/** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + extend(childP, properties); + } +} + +/** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} + +/** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} + +/** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; + } + return false; +} + +/** + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; + } + i++; + } + return -1; + } +} + +/** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +/** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ +function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; + } + return undefined; +} + +/** + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} + +/** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument; + return (doc.defaultView || doc.parentWindow); +} + +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + +var SUPPORT_TOUCH = ('ontouchstart' in window); +var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; + +var COMPUTE_INTERVAL = 25; + +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; + +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; + +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; + +/** + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ +function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + +} + +Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function() { }, + + /** + * bind the events + */ + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + + /** + * unbind the events + */ + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } +}; + +/** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); +} + +/** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; +} + +/** + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + + computeIntervalInputData(session, input); + + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} + +function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} + +/** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; + + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = last.deltaX - input.deltaX; + var deltaY = last.deltaY - input.deltaY; + + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} + +/** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} + +/** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +function getCenter(pointers) { + var pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} + +/** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} + +/** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y > 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +/** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); +} + +/** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} + +/** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY); +} + +/** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; + +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + +/** + * Mouse events input + * @constructor + * @extends Input + */ +function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; + + this.allow = true; // used by Input.TouchMouse to disable mouse events + this.pressed = false; // mousedown state + + Input.apply(this, arguments); +} + +inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down, and mouse events are allowed (see the TouchMouse input) + if (!this.pressed || !this.allow) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +}); + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; + +// in IE10 the pointer types is defined as an enum +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; + +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} + +/** + * Pointer events input + * @constructor + * @extends Input + */ +function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + + Input.apply(this, arguments); + + this.store = (this.manager.session.pointerEvents = []); +} + +inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; + + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + + var isTouch = (pointerType == INPUT_TYPE_TOUCH); + + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +}); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Touch events input + * @constructor + * @extends Input + */ +function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; + + Input.apply(this, arguments); +} + +inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Multi-user touch events input + * @constructor + * @extends Input + */ +function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; + + Input.apply(this, arguments); +} + +inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; +} + +/** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ +function TouchMouseInput() { + Input.apply(this, arguments); + + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); +} + +inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); + + // when we're in a touch event, so block all upcoming mouse events + // most mobile browser also emit mouseevents, right after touchstart + if (isTouch) { + this.mouse.allow = false; + } else if (isMouse && !this.mouse.allow) { + return; + } + + // reset the allowMouse when we're done + if (inputEvent & (INPUT_END | INPUT_CANCEL)) { + this.mouse.allow = true; + } + + this.callback(manager, inputEvent, inputData); + }, + + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +}); + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +// magical touchAction value +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; + +/** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +function TouchAction(manager, value) { + this.manager = manager; + this.set(value); +} + +TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, + + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, + + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + // not needed with native support for the touchAction property + if (NATIVE_TOUCH_ACTION) { + return; + } + + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, + + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +}; + +/** + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // pan-x and pan-y can be combined + if (hasPanX && hasPanY) { + return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} + +/** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +function Recognizer(options) { + this.id = uniqueId(); + + this.manager = null; + this.options = merge(options || {}, this.defaults); + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + + this.state = STATE_POSSIBLE; + + this.simultaneous = {}; + this.requireFail = []; +} + +Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + extend(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, + + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, + + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, + + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, + + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, + + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; + + function emit(withState) { + self.manager.emit(self.options.event + (withState ? stateStr(state) : ''), input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(true); + } + + emit(); // simple 'eventName' events + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(true); + } + }, + + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = extend({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, + + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } +}; + +/** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} + +/** + * direction cons to string + * @param {Const} direction + * @returns {String} + */ +function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} + +/** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; +} + +/** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +function AttrRecognizer() { + Recognizer.apply(this, arguments); +} + +inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, + + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, + + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; + + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +}); + +/** + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function PanRecognizer() { + AttrRecognizer.apply(this, arguments); + + this.pX = null; + this.pY = null; +} + +inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, + + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, + + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, + + emit: function(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + + var direction = directionStr(input.direction); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this._super.emit.call(this, input); + } +}); + +/** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + + emit: function(input) { + this._super.emit.call(this, input); + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + this.manager.emit(this.options.event + inOut, input); + } + } +}); + +/** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +function PressRecognizer() { + Recognizer.apply(this, arguments); + + this._timer = null; + this._input = null; +} + +inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 500, // minimal time of the pointer to be pressed + threshold: 5 // a minimal movement is ok, but keep it low + }, + + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, + + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +}); + +/** + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.65, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, + + attrTest: function(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.velocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.velocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.velocityY; + } + + return this._super.attrTest.call(this, input) && + direction & input.direction && + input.distance > this.options.threshold && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, + + emit: function(input) { + var direction = directionStr(input.direction); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } +}); + +/** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +function TapRecognizer() { + Recognizer.apply(this, arguments); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + + this._timer = null; + this._input = null; + this.count = 0; +} + +inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 2, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, + + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, + + process: function(input) { + var options = this.options; + + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + + this.reset(); + + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, + + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function() { + if (this.state == STATE_RECOGNIZED ) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Simple way to create an manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); +} + +/** + * @const {string} + */ +Hammer.VERSION = '2.0.4'; + +/** + * default settings + * @namespace + */ +Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { enable: false }], + [PinchRecognizer, { enable: false }, ['rotate']], + [SwipeRecognizer,{ direction: DIRECTION_HORIZONTAL }], + [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], + [TapRecognizer], + [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], + [PressRecognizer] + ], + + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } +}; + +var STOP = 1; +var FORCED_STOP = 2; + +/** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Manager(element, options) { + options = options || {}; + + this.options = merge(options, Hammer.defaults); + this.options.inputTarget = this.options.inputTarget || element; + + this.handlers = {}; + this.session = {}; + this.recognizers = []; + + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + + toggleCssProps(this, true); + + each(options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); +} + +Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + extend(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + + var recognizer; + var recognizers = this.recognizers; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } + + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, + + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, + + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } + + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; + }, + + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } + + var recognizers = this.recognizers; + recognizer = this.get(recognizer); + recognizers.splice(inArray(recognizers, recognizer), 1); + + this.touchAction.update(); + return this; + }, + + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; + + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } +}; + +/** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + var element = manager.element; + each(manager.options.cssProps, function(value, name) { + element.style[prefixed(element.style, name)] = add ? value : ''; + }); +} + +/** + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + +extend(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed +}); + +if (typeof define == TYPE_FUNCTION && define.amd) { + define(function() { + return Hammer; + }); +} else if (typeof module != 'undefined' && module.exports) { + module.exports = Hammer; +} else { + window[exportName] = Hammer; +} + +})(window, document, 'Hammer'); diff --git a/examples/todos/client/stylesheets/globals/base.lessimport b/examples/todos/client/stylesheets/globals/base.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/base.lessimport rename to examples/todos/client/stylesheets/globals/base.import.less diff --git a/examples/todos/client/stylesheets/globals/button.lessimport b/examples/todos/client/stylesheets/globals/button.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/button.lessimport rename to examples/todos/client/stylesheets/globals/button.import.less diff --git a/examples/todos/client/stylesheets/globals/form.lessimport b/examples/todos/client/stylesheets/globals/form.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/form.lessimport rename to examples/todos/client/stylesheets/globals/form.import.less diff --git a/examples/todos/client/stylesheets/globals/icon.lessimport b/examples/todos/client/stylesheets/globals/icon.import.less similarity index 71% rename from examples/todos/client/stylesheets/globals/icon.lessimport rename to examples/todos/client/stylesheets/globals/icon.import.less index 1f385cb411..6be0db9436 100644 --- a/examples/todos/client/stylesheets/globals/icon.lessimport +++ b/examples/todos/client/stylesheets/globals/icon.import.less @@ -1,10 +1,10 @@ @font-face { font-family: 'todos'; - src:url('icon/todos.eot?o4fu7p'); - src:url('icon/todos.eot?#iefixo4fu7p') format('embedded-opentype'), - url('icon/todos.woff?o4fu7p') format('woff'), - url('icon/todos.ttf?o4fu7p') format('truetype'), - url('icon/todos.svg?o4fu7p#todos') format('svg'); + src:url('icon/todos.eot?-5w3um4'); + src:url('icon/todos.eot?#iefix5w3um4') format('embedded-opentype'), + url('icon/todos.woff?5w3um4') format('woff'), + url('icon/todos.ttf?5w3um4') format('truetype'), + url('icon/todos.svg?5w3um4#todos') format('svg'); font-weight: normal; font-style: normal; } @@ -23,9 +23,13 @@ -moz-osx-font-smoothing: grayscale; } + .icon-unlock:before { content: "\e600"; } +.icon-user-add:before { + content: "\e604"; +} .icon-cog:before { content: "\e606"; } @@ -44,6 +48,9 @@ .icon-close:before { content: "\e60c"; } +.icon-cross:before { + content: "\e60d"; +} .icon-sync:before { content: "\e60e"; } @@ -53,6 +60,9 @@ .icon-check:before { content: "\e612"; } +.icon-share:before { + content: "\e617"; +} .icon-email:before { content: "\e619"; } diff --git a/examples/todos/client/stylesheets/globals/layout.lessimport b/examples/todos/client/stylesheets/globals/layout.import.less similarity index 85% rename from examples/todos/client/stylesheets/globals/layout.lessimport rename to examples/todos/client/stylesheets/globals/layout.import.less index 5cefa02a14..75ecccaa05 100644 --- a/examples/todos/client/stylesheets/globals/layout.lessimport +++ b/examples/todos/client/stylesheets/globals/layout.import.less @@ -37,6 +37,10 @@ body { background: @color-tertiary; opacity: 1; + @media screen and (min-width: 40em) { + left: @menu-width; + } + .content-scrollable { .position(absolute, 0, 0, 0, 0); .transform(translate3d(0, 0, 0)); @@ -48,13 +52,14 @@ body { .menu-open & { .transform(translate3d(@menu-width, 0, 0)); opacity: .85; - } + left: 0; - // Show menu on desktop, negate .menu-open - @media screen and (min-width: 40em) { - .transform(translate3d(0, 0, 0)); //reset transform and use position properties instead - left: @menu-width; - opacity: 1; + @media screen and (min-width: 40em) { + // Show menu on desktop, negate .menu-open + .transform(translate3d(0, 0, 0)); //reset transform and use position properties instead + opacity: 1; + left: @menu-width; + } } } diff --git a/examples/todos/client/stylesheets/globals/link.lessimport b/examples/todos/client/stylesheets/globals/link.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/link.lessimport rename to examples/todos/client/stylesheets/globals/link.import.less diff --git a/examples/todos/client/stylesheets/globals/list-items.lessimport b/examples/todos/client/stylesheets/globals/list-items.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/list-items.lessimport rename to examples/todos/client/stylesheets/globals/list-items.import.less diff --git a/examples/todos/client/stylesheets/globals/menu.lessimport b/examples/todos/client/stylesheets/globals/menu.import.less similarity index 92% rename from examples/todos/client/stylesheets/globals/menu.lessimport rename to examples/todos/client/stylesheets/globals/menu.import.less index 0ef6c0521c..a842950809 100644 --- a/examples/todos/client/stylesheets/globals/menu.lessimport +++ b/examples/todos/client/stylesheets/globals/menu.import.less @@ -85,6 +85,11 @@ color: @color-empty; .count-list { background: @color-primary; } } + + .cordova &:hover { + // Prevent hover states from being noticeable on Cordova apps + color: rgba(255,255,255,.4); + } } } } \ No newline at end of file diff --git a/examples/todos/client/stylesheets/globals/message.lessimport b/examples/todos/client/stylesheets/globals/message.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/message.lessimport rename to examples/todos/client/stylesheets/globals/message.import.less diff --git a/examples/todos/client/stylesheets/globals/nav.lessimport b/examples/todos/client/stylesheets/globals/nav.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/nav.lessimport rename to examples/todos/client/stylesheets/globals/nav.import.less diff --git a/examples/todos/client/stylesheets/globals/notification.lessimport b/examples/todos/client/stylesheets/globals/notification.import.less similarity index 100% rename from examples/todos/client/stylesheets/globals/notification.lessimport rename to examples/todos/client/stylesheets/globals/notification.import.less diff --git a/examples/todos/client/stylesheets/main.less b/examples/todos/client/stylesheets/main.less index 93b78465ac..69d5c249e7 100644 --- a/examples/todos/client/stylesheets/main.less +++ b/examples/todos/client/stylesheets/main.less @@ -1,29 +1,29 @@ -@import 'util/reset.lessimport'; +@import 'util/reset.import.less'; // Mixins & utilities -@import 'util/helpers.lessimport'; -@import 'util/lesshat.lessimport'; -@import 'util/text.lessimport'; -@import 'util/typography.lessimport'; -@import 'util/variables.lessimport'; +@import 'util/helpers.import.less'; +@import 'util/lesshat.import.less'; +@import 'util/text.import.less'; +@import 'util/typography.import.less'; +@import 'util/variables.import.less'; // Global namespace -@import 'globals/base.lessimport'; -@import 'globals/button.lessimport'; -@import 'globals/form.lessimport'; -@import 'globals/icon.lessimport'; -@import 'globals/layout.lessimport'; -@import 'globals/link.lessimport'; -@import 'globals/menu.lessimport'; -@import 'globals/nav.lessimport'; +@import 'globals/base.import.less'; +@import 'globals/button.import.less'; +@import 'globals/form.import.less'; +@import 'globals/icon.import.less'; +@import 'globals/layout.import.less'; +@import 'globals/link.import.less'; +@import 'globals/menu.import.less'; +@import 'globals/nav.import.less'; // Global templates -@import 'globals/list-items.lessimport'; -@import 'globals/message.lessimport'; -@import 'globals/notification.lessimport'; +@import 'globals/list-items.import.less'; +@import 'globals/message.import.less'; +@import 'globals/notification.import.less'; // Templates -@import '../templates/lists-show.lessimport'; -@import '../templates/auth.lessimport'; -@import '../templates/app-not-found.lessimport'; -@import '../templates/loading.lessimport'; \ No newline at end of file +@import '../templates/lists-show.import.less'; +@import '../templates/auth.import.less'; +@import '../templates/app-not-found.import.less'; +@import '../templates/loading.import.less'; \ No newline at end of file diff --git a/examples/todos/client/stylesheets/util/helpers.lessimport b/examples/todos/client/stylesheets/util/helpers.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/helpers.lessimport rename to examples/todos/client/stylesheets/util/helpers.import.less diff --git a/examples/todos/client/stylesheets/util/lesshat.lessimport b/examples/todos/client/stylesheets/util/lesshat.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/lesshat.lessimport rename to examples/todos/client/stylesheets/util/lesshat.import.less diff --git a/examples/todos/client/stylesheets/util/reset.lessimport b/examples/todos/client/stylesheets/util/reset.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/reset.lessimport rename to examples/todos/client/stylesheets/util/reset.import.less diff --git a/examples/todos/client/stylesheets/util/text.lessimport b/examples/todos/client/stylesheets/util/text.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/text.lessimport rename to examples/todos/client/stylesheets/util/text.import.less diff --git a/examples/todos/client/stylesheets/util/typography.lessimport b/examples/todos/client/stylesheets/util/typography.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/typography.lessimport rename to examples/todos/client/stylesheets/util/typography.import.less diff --git a/examples/todos/client/stylesheets/util/variables.lessimport b/examples/todos/client/stylesheets/util/variables.import.less similarity index 100% rename from examples/todos/client/stylesheets/util/variables.lessimport rename to examples/todos/client/stylesheets/util/variables.import.less diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js index 221febaf62..721d5ec49d 100644 --- a/examples/todos/client/templates/app-body.js +++ b/examples/todos/client/templates/app-body.js @@ -4,21 +4,39 @@ Session.setDefault(MENU_KEY, false); var USER_MENU_KEY = 'userMenuOpen'; Session.setDefault(USER_MENU_KEY, false); -Template.appBody.rendered = function() { +var SHOW_CONNECTION_ISSUE_KEY = 'showConnectionIssue'; +Session.setDefault(SHOW_CONNECTION_ISSUE_KEY, false); + +var CONNECTION_ISSUE_TIMEOUT = 1000; + +Meteor.startup(function () { if (Meteor.isCordova) { // set up a swipe left / right handler - this.hammer = new Hammer(this.find('#container')); - this.hammer.on('swipeleft swiperight', function(event) { - if (event.gesture.direction === 'right') { - Session.set(MENU_KEY, true); - } else if (event.gesture.direction === 'left') { - Session.set(MENU_KEY, false); - } + var hammer = new Hammer.Manager(document.body); + + hammer.add(new Hammer.Swipe({ + velocity: 0.1 + })); + + hammer.on('swipeleft', function () { + Session.set(MENU_KEY, false); + }); + + hammer.on('swiperight', function () { + Session.set(MENU_KEY, true); }); } - + + // Don't show the connection error box unless we haven't connected within + // 1 second of app starting + setTimeout(function () { + Session.set(SHOW_CONNECTION_ISSUE_KEY, true); + }, CONNECTION_ISSUE_TIMEOUT); +}); + +Template.appBody.rendered = function() { this.find('#content-container')._uihooks = { - insertElement: function(node, next) {; + insertElement: function(node, next) { $(node) .hide() .insertBefore(next) @@ -68,7 +86,11 @@ Template.appBody.helpers({ } }, connected: function() { - return Meteor.status().connected; + if (Session.get(SHOW_CONNECTION_ISSUE_KEY)) { + return Meteor.status().connected; + } else { + return true; + } } }); diff --git a/examples/todos/client/templates/app-not-found.lessimport b/examples/todos/client/templates/app-not-found.import.less similarity index 100% rename from examples/todos/client/templates/app-not-found.lessimport rename to examples/todos/client/templates/app-not-found.import.less diff --git a/examples/todos/client/templates/auth.lessimport b/examples/todos/client/templates/auth.import.less similarity index 100% rename from examples/todos/client/templates/auth.lessimport rename to examples/todos/client/templates/auth.import.less diff --git a/examples/todos/client/templates/lists-show.lessimport b/examples/todos/client/templates/lists-show.import.less similarity index 100% rename from examples/todos/client/templates/lists-show.lessimport rename to examples/todos/client/templates/lists-show.import.less diff --git a/examples/todos/client/templates/loading.lessimport b/examples/todos/client/templates/loading.import.less similarity index 100% rename from examples/todos/client/templates/loading.lessimport rename to examples/todos/client/templates/loading.import.less diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js index acdbd59164..b5f3952f19 100644 --- a/examples/todos/mobile-config.js +++ b/examples/todos/mobile-config.js @@ -7,13 +7,21 @@ App.info({ }); App.icons({ + // iOS 'iphone': 'resources/icons/icon-60.png', 'iphone-2x': 'resources/icons/icon-60@2x.png', 'ipad': 'resources/icons/icon-72.png', - 'ipad-2x': 'resources/icons/icon-72@2x.png' + 'ipad-2x': 'resources/icons/icon-72@2x.png', + + // Android - XXX these are the same as iOS for now + 'android_ldpi': 'resources/icons/icon-60.png', + 'android_mdpi': 'resources/icons/icon-60.png', + 'android_hdpi': 'resources/icons/icon-72.png', + 'android_xhdpi': 'resources/icons/icon-72@2x.png' }); App.launchScreens({ + // iOS 'iphone': 'resources/splash/Default~iphone.png', 'iphone_2x': 'resources/splash/Default@2x~iphone.png', 'iphone5': 'resources/splash/Default-568h@2x~iphone.png', diff --git a/examples/todos/public/icon/todos.eot b/examples/todos/public/icon/todos.eot index d06f492e5436b31e327a30f4e1acd0f81db9ddd0..932ee9360d49c318a7d944893c19c5ec9f731aa1 100755 GIT binary patch delta 1229 zcmZuwO>7%Q6n<}KXLf9_f7ab~y!mm~cCejNN*udxB*2MOg+oC_LOB#J;6jNH&5z^? zil{IL4k!|;DqlF1N?f4gP=Sn44j_8y0l}pby|j?X64Kr(BB7$9s9E0lM-YkCdvE4@ zZ@-QN0N^A5Tw86lHfc-{-lkEmUU>Jd zcWz#PNca{&@^L^**jsO`x#xd*yLdo}4``9f=0@uxFe*Xno6ZWpxB3xHGxS3Y zVu0ZJ;OoBhV}8O<`eVN9=lz0T4IT%9;tcD;5C2acgWt#XaU2IXa1Y$a?%(bs_Ye1h z+oNw|r>sqOPit*#YmkN+{1rcj=V2A#H8r>*3~MADk(JZ{Kv+DoC9Fr!{l%W|gaOoWMv_ULn=NGTMF$k~VtMWFj5 z`<|r*ctL+=!OmC4xz2=K)^MY@Q;U;qhr{A!ug(q<&M)t%&hhfICNS!Pxvw&r$G(L*u++5#m z73XqfPCt^~!bNK~ya(13})ZffVU$v=PwTSIorhJ9E7+OBKv#ex#Rhno@JS)vs zok<-JKXuxl#it@6X-;v~1RK+eCC$A(6^Y64;6Z=VtTQ%X*NG#<4mc zB2SZN$UXAxaC8+=F36+gOXLOe#meCn)7-bk37^b8r78d|%0U&<^kmg9w zsZ6t3vN9UT-vJa($w*C1Va%`XW?&EksW;023NT+~{0!uW0Qo8zxg`~{3{3Vweg%;4 zk&~aCsMeu)2gpAFn|Hr@}%mK8-xFEl{gn=0- z#UNrcIfSt~u>r`G0Xm48fro*SLE#z0Gmd9G&-k7RJQI2*`Aqql+B1{?fB*jn=>W^J zJ>$Y6%lQAX6pQ44$$yf6CI3kNmi#LDM)H;9U7)FqlO35vCI>LF0x`?xP^KEj%^z9z zFl)0jDE$A=_<(Ug&~9r62L@M$5Qb!iA_fLkB{f?{6EkB&BQaS<5jJH*;mJoik~kSS zcz8HKc(OXDD{npzM+GN0H)jP04oHGY(PD{XWnz8BmcurS?GL*OyAOvE&?Jy)LX3F~z^DKMCScGA KZ@_lTJQ diff --git a/examples/todos/public/icon/todos.svg b/examples/todos/public/icon/todos.svg index 720db28555..d6a1342c46 100755 --- a/examples/todos/public/icon/todos.svg +++ b/examples/todos/public/icon/todos.svg @@ -8,15 +8,18 @@ + - + + + diff --git a/examples/todos/public/icon/todos.ttf b/examples/todos/public/icon/todos.ttf index bfd1157aded28215aeaae0f6430b8d8c9a1c3d55..afd1056a946b358d30f289d26085508b301f3cf8 100755 GIT binary patch delta 1161 zcmZuwO>7%g5T4n$@9nd9{j;lG$D72?t{rT*O(Bk5Hxl3=RY3@(R;qd^T)-_QIW#{~ zDkuWg95^5ZqR1Bxr4kpYI20r!lmmz!dIAnb^g`Q2kt*%2P^l^cMU9zf$AU<#X6MZ} zv)}uf@9mw+&4U+%_9xpfTmisw0JyZ!T3e+tO?aI~xp4N)*WS2#`61zJ0M7NrGp$$g zr;kDa_g$(t7Ae6t@K3_u5uRLJI(NPZ+9kqUgioAZIo&#Vvo-_Z)d^26wa%|X9%&8l z6~e)CYso+J>+9tmO1wjh)K*v4&HnX}^T}1K!sblZ%s6L9L;P?C;|B?T<|Cj%Vf6w3QT*R>Z6<)x$23eTI z+xQ_o3kv{;XBvl_sO(U^RDK-Es?!aXZIsIO2Ek%M7$V~(aU_qmJXM8}L^3b0G6Sn& zk?8bgPJQmVnJ1B4ZKm-wl2fJYcEPs8lxUlL!t?gU1oL%aXd2^;^L!ZQIRzSOlIy-E z;uX&g^tjIBJRR6}!9iBBq_is1vgE(fq|WrXAf9xBL?W$WCdkI6k>Y&9cE-jWdxG-K~gId~31dbMRrs+(?iHYuTx|mssnWo%l%9sh=DfT_f3J7{V+`=DVKRf|-I0DC^ zMdEc_<5Z_@%xk#P`NcTW_2d=SMi9LSxA7JP0FRYb>q>2YErkUZk!7g9Ie;0bYfp@F{%O{n-o|2|K55Fx}w_ zEYmjZdg%ZT#Rv}#blA;!HmMVmGP77^O5^=lEll^#Reria=Jh@4U7f|EJ6)VbuizHx zME%1I^;L&z)XUhuX2}<+i?R8g8}mx0m!yT3#FNrmYci?h-ls|Dvw6;pNh`-y6I{$H zmbC8QSDu&*ckcCr#U^6|c9S?ljNeh|jhqm~RNV;R7$Mw5UKN=lRL0Yf7;&1`!7^Qn&BCGvz-r|FUrfyo}ouK@Bra`KZC)jAaK0Qm=ie6`%f ziUI~{MxY%+FMxc7yu@6|)XQb+{}>pAIe?ZJ7vvY0Ffaq97({F)?x>b-0J3C&?qO!& zVPIrXc*gLI;~CF0zGni@geC_tiW;&#Nj_74ruNL_|KI=r85sXRmSU0oFZoaM zujC)e-;!S?-$=faybCmiaq>b&iOCxnSvT)wtYO?7%Cd)9o1H=7|9{2@jQfH1STi^< zxH5z=Br_B-FsLf2*)p1#85Z8;Q-;u-5jpG`8*sIoZQ@; z6&yT_43jT$IByo=T*vr6sl?G^F-HeVUInLz$xxS%&L9YO#9$M~7? z(BuswvcjK%K12mVlOKqPXUYNfDFCq|lm@Xum=}m0fLIO6cLUNOtOz!Qi$R1zj$s$m z3}!v%2`pMHajZj5LzhEhNwzX9tjYVmb^ql z2?)_5^+#2e7F9^i4;qy}rHvx~wGH{x2u1zTrc$b+N==){Z6ymuMMa{NmcY8-nS0k> z2Lt8qo!K*I&YYQZX3k^ollN@hDoEhT7KO|InK%44!)u>=?wy(zf*fFXb8*TaTz&Z9 zo+H5RNBbo%C$8Q3(|vo60%urgGcA|+z5`D^3Y;fI-+3-izIyWA{d@O3B1GyU`deJ+ zx8E=A2U3VMj~V7-UZ#KVKX~joa1&^6=TZ^IO9u`=%yi#GoADEy-k6y_xaT;$ytgn#h3b) zvP-$8%F@VEbNR#NWzb=@x?e4Y*XgI_zi+TM&<2rP&UJDh=Kh=ePwt<&w{nZYY?{Hx zR3r#9#Pq6s60Eg-qZVORj!(v!Vgb54N9V*I@u+xCi0bTSnyoh*lT<6$8}(-825L0R zjq*sPKEicrw%KaW(adxvo2M)~^MG3zRPzT-Ql+fyD5cSr2AHm=hDfE-smx4C(>1E4 zbZIu*9I364rZQRXpKfiTIhw_4OybADYZ{$@#G|olCZ6{qNo9mp$R%eW(YG;^Z>Eyj z0mmcHp&gFb`58@he*a5pN!PYr{MpiT98amtRc2;NW=Axb9*M@{p^(!bmA2<#0!o%# zFOp5Bn)$)7L-Z!d91l$CkLS-CJ1hviN(aTC=Jwc1zcZMn$4y6sT5}}ftsH+#&F}ltt%85iN zrd(M_r#FU_nX{B_7^XC(%$G`e3BVx3kyg%7;n8%eXoW2qmhoaDQSKvilvOgyQmjJ5 zmT83*#yNe(NF;7hrq~~L?3k2=MBl(bU!ovo%yz>4#S9s7FH-C?q-j{D3S%Ipy4*tU zXvlS)jjj`dLo!8vxkG=W*ToMhO9zEW`clr|Sk$K*T3z!5!6D#^{5LToP>V(v2s+{u zsE?H2GsHM3lyzD!H@clM0%}G1=p1K+zbQU?3Wuu=Jq8;!M||4aZM_S2I>q}j&b;wr zMd^%+@pAC`XMHGWVR%=FOo2J*O=qq*1uaYtBbn#<@#^LCVc!xUFhO_WBU6<1twoDF z6Q~9Xf*t6Sz@wR-ZO`Y+^K0Wv50Z`E!QhOv>&;m`3S^aEM=e(>Pm%H@_9<$|_>|Zd zHX7KJsf?&)U%$xVpZg}mO0*K6l9-_vBAz?S|79a^( zj+x(-u0$j8cqCd$lL|xHkQajWnzl(^+HqjzPTB)xhu|b^7nT9q;S{~d()-KT(xkc;NkB&JJsdZ6d#qzM)QXvTKSb^Gn z6_^TI^HpGlRvhb+@@tO;My{)lgArKEs0$Dp6YXQOQQ&+#AWjO;u;omDyy) zESWWS>VZ!KRb_2cyZqH&x^N(DW0@yV?C=40Q_%r8MEQ_A5am|qgCj?N{(g=oa+|ox z<;Pv%i(P;YZ+2WF*V*ib5Ed>lo|+!q(&*@D=LITu7C+}X$Kk9($GPvL5OiRP5_E6{ zI+zhRh%Mq~$Ump;875alfsw&-0l;O%NU;-xG&AfCs8w&*TMaIDt(~>uhO)NJz$Iz0 z#&2dzw9U@zrb$`DwD>riw9|x%NQmB|+lL3ML!I}lSF2aIsCb6%lMw}q1-6II>u|q2 z*!h~&&yms}60Hta2RrW%Umd>MpNT8Z2TW1KsuvO4>*5aa7+^nWYp>=zJl~~Ov~OW& zr9BtRpx>FdXS=oRrYLR{U&CA(WvlWOp{k7_cwj5qt?2?+I9f5vW)TMbee(B4@1>1V zoMQN)#y^vO2t(~hFI{6(R(7>UUr}(laeK?W?2`Z&7A#T#=eGa}aBl9_(zc1Q?S*oY zs8}v+ADh@#Dwc`L#T+@xNk+XwJW)v|sB@{sVGCIEGhKti8iK^x-y6M5WD%Ndp0IcuOyFF7 zyW~uv$24m!MGHBD-e>J}Shn5`Zk5}Z8S__K%{IuY=|+v-QE@wL4-XF9RxPx1nNiPA zuiBbd)<3jTidjrD%L0V#h5Txq7m=4KJbskg1d!}d*!Ot&X5BdHx zE!yysxOG<9vYT~emPpgaX|~aGRq=yf9SORhcJ*Fq+C3K||MoMB>{ek1IrHniHnH!e zb0Hh*AJq2_eU%xs*Is3&^u0%4S1vxo!45Z?mCFrZYizikK|Sh+W{t>2=WL_Yr>^f#*p~e^_$`v*?zs8 z)-|qAyg#Wr^5b+lRe`ZWk(y;sox}?UG%i zMWn7uuc)(MFYts6akI1klz}u44^q!lofn2_^u-rx7t#-`-*xCc+;t@sVMyb>jn8vV z{QTLonWvxD=VGh)0iC7YB7^l$!%t;Wt1+rMkA!Fj7G#^Jp|`j?c~T#X)11xhHi2ZT z1CskroA`u6xGV1lze(m-EyIzGG*@C=CKW>_Rau|ky6o_UswA3-)!)UJm=f&w7IB|= zLVQoWf~jD4rSb@Dw*`G>vX#X3h}lm?RJ9xS9q=0K1+Nv)yru&@KVt_iBB{N|CzPf* z!}WmEcw}S^cb=fom6+;KYi!H*yeYIi_cbgF79{*-!8lVL8Rwz zlYX}z!{6`N(eOjpG$#!QRl2vq(|~dTr5`1aQbZ{Q{|s|cC=rwelo6D96vl52N=fq! z<6B@}oTWR=QS+4LSwFEZ$!Fy+)JeN&-);ZKnQ*o{&x9V*D@xNL{YACA(B4G}d_{a! zQ?Wc@bn!BoGK$>LhfUy%0c-)jJ%A-_DICBG-$BO$IE;JSmyoTH6#|BN`moQ_hkc$t z?DOKbAaH;tA4V}~C(d~~&mOXOaB yDtkg4z-99B9{g54{1_PQ1H~cDbPxLXVw$3ONIZr5^WtGp-G#zaO|mqf`1}vCudomR literal 4260 zcmb7HeQ;b=6~Ei;4VRE^V(3$Y;G|V4Vh7qJfP4%Df%28K2t_*#DGl@^nkEZrB5AkD zZuT>~XTRUeZZ?}nv4u1(h7O-iCxZf=k)neN`j6-g(?CXnv5u5^JM#kZci-Dhqk;o> z_nvp|x##}wz2}~L&U=q;T)%$frcE0et3Jpo7)tg1%qE}zTW(svz7Enej8#4@YyG8V z?{2*3@_NRWAA)?VtYX#tdk=NCJGutvqt|?r&tnjt6!dLBIuVA(J zED)8RmFG}LK`Zp|i!lDhDoJ1YlBDN?R8H2g^MQ2U@~WDzT)6V$@2tJznj3DueZxJQ zO>C3&uI*jdTfesVmMhnqp= zwlJ$^HFD8*b`H*Lxvi?qXMdXiuzXqh=5j+^Al^NXCFV1TY>u+d|!luU* z(g!$2%^!hMBoU5>;}I&B=znsNXe1gY0X3+G!48oy4iQaoI&u8?33{H6K9b*Vjg9-$ zL6tJ3X&^C*M`ETt+WX7RPi-V|E!}wsU1zBZaz0GlLq1<*kmQUJLB>8FiBK3#kLJyg z&_5tv1jF1E6~_Dej}`qDB4e`ws&D4{o!2Y0zdyH!_E3L6$Y9c&4hZVv7KSxk&>@~q zB{dor4*kBuB}%TJXFa3-F>5Un8#Pb)bS5KmIX*n3g@%KI9_8dpxw7tzCl6imQ{oA4 z!W$nH{r%kI@w;d*xzetTTL5opFysw-MIUhs6kUFg+wBQJOHdyl40=O@L!v*&JsAvw z(xROKv(NALNYuf&H!+wLG|nj>$h)(itShybBx-Otqzz@n$OzA7(^x8v`Sb3K7|8MX za6(HCi*e#(luu={*-Q$(5@R^2C5Gc-WLoJAINjYYL0dTm!od(qFdQJUmAI?h?F@8@ z$z41diUlKqC^~{6(b>sUomuBtw|I_tijv_(D1m;0ZMX7+t_k;KKujLyi9|A%vNmke zC?!o@i8q;=$R5lKdY)4%mQ0`|<0%r)6VD&WPNXKqu1OwBgaK~#i^GR`;E;R5bwIAm z0u4|wj)~(^OVA6vJMYYPrNpjXT<##a#D+xBjfE1T^DsYVoUd%62OgkJbngpWUY6bq zJbA`xQln{jrR24EN+pf5gPI38VYr@Ef{_q~;EtxpchDmT=?EQp{BaOE_y~1Sh@^&9 zEO&LA?mA5AR9rKmqp?&}#bhsUdEs7y&uMy@;vp}tg&@6>Q%2L^-&hs=(@P$>K7<~x z*JBFxt-7WdjOf?U^r>FlNcj`S8sZk~jre?W*hXmK5_y49yfZm^!gy6~w|Iq~E?pta z_JsawuGFNA7uy!b$TNy=Cwj;Ld4}t^&)XFvPTl&m`mdc&75JjUg67L+~iD*0)iwQla=Xew@P^#jkmk<%9Pl%iQm7PZ? zCXVjta&lwT7*%#Wr4Q%>M|TvsrIS%@m9Kz?(1u9 zM``T?OReJ&PxVdH49$#BPoYeY&){^QQH*L@y_!Ic>eH+BYQq2YX-W0!)u$nrZlT+Z ztx7%7taJd)y=d`<2J5(^o`_rX!G>8aRQ^BI2ruy@K9($2?<|ATrO`QE1bL6r%+J zv-!X9jAo;G(Sa;P9ePF!{73a>qnU_m`D_cs(pfE36`teJPwQ7GX&<@$KA&%Ze5zIkVmakAy)NpA5NJK*<==H}O0`0Hzw#s*^*HO@Ai zB7N2DsZ+E1Dmv9L+epT$hDPzYUa!zh-?TJp>$qv)K56Ve)9~Z1@(`x`U~8Hlm&P84 z;f13R(hn$p6^ru;kB9I1;Hp1{?xTH9|!?1dGBafx>F2{a9?_W{ICEGU~|*0+;TZYt5_l-j!k2$l!a+- zH0+9x0-=y!0{UDY*T6tWN88>lw1wKnI*#l<;F=6PDMt74v=4Sdp%GtNv>r!<3?M8A z5tc(C(b@|8l3Vqu(1Lx3hxypI-@fr*^cMZ$*wpK>B(@~oc(KUYqH(x?ymaBu%qUSA z>Z1JY%fPT7LFVj0E5;z;IFaT7K!3jTx7WgMGJ7L$JBbe#^EPm-yp4IkP~JZNJH>i^ zI6=qnr@O870^8Uo-z@ZM18H66a2XOyf%6der-I1gv_F^IPx~on=KG-6AHYd>6{;1V z>Xs*M{0u+4Zs%6p=QqzruQ6(h;lny3Br2Sdl?sIZ3w^3|R*piC{ttzckz^<_grpZL zT2y*V$zzuCVjgkXe3S7k+I>+IQBvj}bEp-P3(!tW-%6Td6WokFXyT~i6vv^V=)~vO zJgDf`8!LHyD1ks$Dso8al&xo}MaZRzSUfKD>-CjnY?wz>*EjH|9#ixgGA=P3#wEH# z#xDJgQcTo(lhMRgI2CTO5B5`qQLon<_`%g=+XoL;RiQWOO=h}JnhEWF1>skwTSLk% z9aYWBD=tUt_`#mCZDB(X^H@n6$JJY43c0;LnSxFbm-A3oIxA&VEsIw_2uryULgUFV zqWw3em`jV$W(fN%=r5u?zvAx-?b+AASH5lL;DTehQ4kv4C*SepB0sYe(=6>XT^Ix5 z!h-%!pQE6yC};{*%I~r=yznO($Ja}5#hEP+R9*KGJ5Mf^vEN@dzVqyJ;S<}3wwKWs=1yb>#>hQeTLb^0i6nbUrKZHl zr`$A{b?%Tb$9FD|y%<0sNvoa!>m>r5kkI{7zU;HZTF From a11f56fff8ed7ca918ba4877f801f0ffe25bd00f Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 7 Oct 2014 16:08:52 -0700 Subject: [PATCH 054/283] Tweak READMEs for built app bundles. --- tools/commands.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/commands.js b/tools/commands.js index 7072220bbd..f1c35c8cb0 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -749,6 +749,7 @@ var buildCommand = function (options) { files.cp_r(buildPath, path.join(platformPath, 'project')); fs.writeFileSync( path.join(platformPath, 'README'), + "This is an auto-generated XCode project for your iOS application.\n\n" + "Instructions for publishing your iOS app to App Store can be found at:\n" + "https://github.com/meteor/meteor/wiki/How-to-submit-your-iOS-app-to-App-Store\n", "utf8"); @@ -758,6 +759,7 @@ var buildCommand = function (options) { files.copyFile(apkPath, path.join(platformPath, 'unaligned.apk')); fs.writeFileSync( path.join(platformPath, 'README'), + "This is an auto-generated Ant project for your Android application.\n\n" + "Instructions for publishing your Android app to Play Store can be found at:\n" + "https://github.com/meteor/meteor/wiki/How-to-submit-your-Android-app-to-Play-Store\n", "utf8"); From dc50b779312befd062d6132167032b887ab77a63 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 16:09:59 -0700 Subject: [PATCH 055/283] Use /usr/libexec/java_home to detect JDK --- tools/commands-cordova.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index ec1b3a1cfb..85c005284a 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1919,7 +1919,20 @@ _.extend(Android.prototype, { var self = this; if (Host.isMac()) { - return files.statOrNull('/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/jarsigner') != null; + var javaHomes = files.run('/usr/libexec/java_home'); + + if (javaHomes) { + javaHomes = javaHomes.trim(); + + // /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home + if (javaHomes.indexOf('/Library/Java/JavaVirtualMachines/jdk') == 0) { + return true; + } + } + + //Unable to find any JVMs matching version "(null)". + //No Java runtime present, try --request to install. + return false; } else { return !!Host.which('jarsigner'); } From 8823367a0f0b950edfb16973aae54bc1103dba39 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 16:19:09 -0700 Subject: [PATCH 056/283] Clean up the messages to accurately reflect what we're installing --- tools/commands-cordova.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 85c005284a..fe7723a079 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2153,11 +2153,12 @@ _.extend(Android.prototype, { if (hasAndroid && hasJava) { if (self.hasTarget('19', 'default/x86')) { - log && Console.info(Console.success("Found suitable Android API libraries")); + log && Console.info(Console.success("Found suitable Android x86 image")); } else { - log && Console.info(Console.fail("Suitable Android API libraries not found")); + log && Console.info(Console.fail("Suitable Android x86 image not found")); if (fixSilent) { + Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); } else { result.missing.push("android-sys-img"); From 913cda95f342a4d9e741fe377784666fcbd13714 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 16:07:19 -0700 Subject: [PATCH 057/283] Fix android splash parsing --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index fe7723a079..2fefecb847 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1395,7 +1395,7 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { verboseLog('Copying resources for mobile apps'); var imageXmlRec = function (name, width, height, src) { - var androidMatch = /.+(.?.dpi)-(landscape|portrait)/g.exec(name); + var androidMatch = /.+(.?.dpi)_(landscape|portrait)/g.exec(name); var xmlRec = { src: src, width: width, From 95d73cca07b2b67ab7443313d68184b71a198d8a Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 16:29:28 -0700 Subject: [PATCH 058/283] Put accidentally removed cordova.checkIsValidPlugin method back --- tools/commands-cordova.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 2fefecb847..8762c35779 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -111,6 +111,16 @@ cordova.filterPackages = function (packages) { return ret; }; +// used by packages commands +cordova.checkIsValidPlugin = function (name) { + var pluginHash = {}; + pluginHash[name.split('@')[0]] = name.split('@')[1]; + + // check that every plugin is specifying either an exact constraint or a + // tarball url with sha + utils.ensureOnlyExactVersions(pluginHash); +}; + // --- helpers --- var localCordova = path.join(files.getCurrentToolsDir(), From 938313e7bc6c5564af0a7960e2c32214887a8cba Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 16:57:30 -0700 Subject: [PATCH 059/283] Improve script --- scripts/admin/bump-all-version-numbers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/admin/bump-all-version-numbers.js b/scripts/admin/bump-all-version-numbers.js index c98d4b3e49..6e3864c4bb 100644 --- a/scripts/admin/bump-all-version-numbers.js +++ b/scripts/admin/bump-all-version-numbers.js @@ -6,7 +6,7 @@ var _ = require("../../packages/underscore/underscore.js")._; var packageNames = _.rest(process.argv, 2); _.each(packageNames, function (name) { - name = "packages/" + name + "/package.js"; + // name = "packages/" + name + "/package.js"; var content = fs.readFileSync(name, {encoding: "utf-8"}); @@ -14,7 +14,7 @@ _.each(packageNames, function (name) { if (match) { var versionNumber = match[0]; var s = versionNumber.split("."); - s[3] = (parseInt(s[3], 10) + 1) + ""; + s[3] = "rc.0"; var incremented = s.join("."); content = content.replace(versionNumber, incremented); From 64a49831f3152c39548410518adc80bd4cb08bf6 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 16:58:58 -0700 Subject: [PATCH 060/283] Improve script --- scripts/admin/bump-all-version-numbers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/admin/bump-all-version-numbers.js b/scripts/admin/bump-all-version-numbers.js index 6e3864c4bb..a302ff3b77 100644 --- a/scripts/admin/bump-all-version-numbers.js +++ b/scripts/admin/bump-all-version-numbers.js @@ -14,7 +14,8 @@ _.each(packageNames, function (name) { if (match) { var versionNumber = match[0]; var s = versionNumber.split("."); - s[3] = "rc.0"; + s[2] = "rc.0"; + s = s.slice(0, 3); var incremented = s.join("."); content = content.replace(versionNumber, incremented); From a36b63b589af2a2f0b0d1790d758c568dd28a6cd Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 16:59:53 -0700 Subject: [PATCH 061/283] bump --- scripts/admin/bump-all-version-numbers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/admin/bump-all-version-numbers.js b/scripts/admin/bump-all-version-numbers.js index a302ff3b77..617e19cce7 100644 --- a/scripts/admin/bump-all-version-numbers.js +++ b/scripts/admin/bump-all-version-numbers.js @@ -14,7 +14,7 @@ _.each(packageNames, function (name) { if (match) { var versionNumber = match[0]; var s = versionNumber.split("."); - s[2] = "rc.0"; + s[2] = s[2].split("-")[0] + "-rc.0"; s = s.slice(0, 3); var incremented = s.join("."); From 698fbedb100aa5af8fa4039736565e92d90437f9 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 17:00:23 -0700 Subject: [PATCH 062/283] Bump all of the version numbers to rc.0 --- packages/accounts-base/package.js | 2 +- packages/accounts-facebook/package.js | 2 +- packages/accounts-github/package.js | 2 +- packages/accounts-google/package.js | 2 +- packages/accounts-meetup/package.js | 2 +- packages/accounts-meteor-developer/package.js | 2 +- packages/accounts-oauth/package.js | 2 +- packages/accounts-password/package.js | 2 +- packages/accounts-twitter/package.js | 2 +- packages/accounts-ui-unstyled/package.js | 2 +- packages/accounts-ui/package.js | 2 +- packages/accounts-weibo/package.js | 2 +- packages/appcache/package.js | 2 +- packages/application-configuration/package.js | 2 +- packages/audit-argument-checks/package.js | 2 +- packages/autopublish/package.js | 2 +- packages/autoupdate/package.js | 2 +- packages/base64/package.js | 2 +- packages/binary-heap/package.js | 2 +- packages/blaze-tools/package.js | 2 +- packages/blaze/package.js | 2 +- packages/boilerplate-generator/package.js | 2 +- packages/browser-policy-common/package.js | 2 +- packages/browser-policy-content/package.js | 2 +- packages/browser-policy-framing/package.js | 2 +- packages/browser-policy/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/check/package.js | 2 +- packages/code-prettify/package.js | 2 +- packages/coffeescript-test-helper/package.js | 2 +- packages/coffeescript/package.js | 2 +- packages/constraint-solver/package.js | 2 +- packages/ctl-helper/package.js | 2 +- packages/ctl/package.js | 2 +- packages/ddp/package.js | 2 +- packages/deps/package.js | 2 +- packages/dev-bundle-fetcher/package.js | 2 +- packages/disable-oplog/package.js | 2 +- packages/ejson/package.js | 2 +- packages/email/package.js | 2 +- packages/facebook/package.js | 2 +- packages/facts/package.js | 2 +- packages/fastclick/package.js | 2 +- packages/follower-livedata/package.js | 2 +- packages/force-ssl/package.js | 2 +- packages/geojson-utils/package.js | 2 +- packages/github/package.js | 2 +- packages/google/package.js | 2 +- packages/handlebars/package.js | 2 +- packages/html-tools/package.js | 2 +- packages/htmljs/package.js | 2 +- packages/http/package.js | 2 +- packages/id-map/package.js | 2 +- packages/insecure/package.js | 2 +- packages/jquery-history/package.js | 2 +- packages/jquery-layout/package.js | 2 +- packages/jquery-waypoints/package.js | 2 +- packages/jquery/package.js | 2 +- packages/js-analyze-tests/package.js | 2 +- packages/js-analyze/package.js | 2 +- packages/json/package.js | 2 +- packages/jsparse/package.js | 2 +- packages/less/package.js | 2 +- packages/livedata/package.js | 2 +- packages/localstorage/package.js | 2 +- packages/logging/package.js | 2 +- packages/markdown/package.js | 2 +- packages/meetup/package.js | 2 +- packages/meteor-developer/package.js | 2 +- packages/meteor-platform/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- packages/meyerweb-reset/package.js | 2 +- packages/minifiers/package.js | 2 +- packages/minimongo/package.js | 2 +- packages/mobile-status-bar/package.js | 2 +- packages/mongo-livedata/package.js | 2 +- packages/mongo/package.js | 2 +- packages/netroute/package.js | 2 +- packages/oauth-encryption/package.js | 2 +- packages/oauth/package.js | 2 +- packages/oauth1/package.js | 2 +- packages/oauth2/package.js | 2 +- packages/observe-sequence/package.js | 2 +- packages/ordered-dict/package.js | 2 +- packages/package-stats-opt-out/package.js | 2 +- packages/package-version-parser/package.js | 2 +- packages/preserve-inputs/package.js | 2 +- packages/random/package.js | 2 +- packages/reactive-dict/package.js | 2 +- packages/reactive-var/package.js | 2 +- packages/reload-safetybelt/package.js | 2 +- packages/reload/package.js | 2 +- packages/retry/package.js | 2 +- packages/routepolicy/package.js | 2 +- packages/service-configuration/package.js | 2 +- packages/session/package.js | 2 +- packages/sha/package.js | 2 +- packages/showdown/package.js | 2 +- packages/spacebars-compiler/package.js | 2 +- packages/spacebars-tests/package.js | 2 +- packages/spacebars/package.js | 2 +- packages/spiderable/package.js | 2 +- packages/srp/package.js | 2 +- packages/standard-app-packages/package.js | 2 +- packages/star-translate/package.js | 2 +- packages/startup/package.js | 2 +- packages/stylus/package.js | 2 +- packages/templating/package.js | 2 +- packages/test-helpers/package.js | 2 +- packages/test-in-browser/package.js | 2 +- packages/test-in-console/package.js | 2 +- packages/test-server-tests-in-console-once/package.js | 2 +- packages/tinytest/package.js | 2 +- packages/tracker/package.js | 2 +- packages/twitter/package.js | 2 +- packages/ui/package.js | 2 +- packages/underscore-tests/package.js | 2 +- packages/underscore/package.js | 2 +- packages/url/package.js | 2 +- packages/webapp-hashing/package.js | 2 +- packages/webapp/package.js | 2 +- packages/weibo/package.js | 2 +- packages/xmlbuilder/package.js | 2 +- 124 files changed, 124 insertions(+), 124 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 075cbd4073..5a9fc92dfc 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.1.2-pre.2" + version: "1.1.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/accounts-facebook/package.js b/packages/accounts-facebook/package.js index 199d549fef..5b0c730269 100644 --- a/packages/accounts-facebook/package.js +++ b/packages/accounts-facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Facebook accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-github/package.js b/packages/accounts-github/package.js index 8cc35421d9..c0bfa2f9dc 100644 --- a/packages/accounts-github/package.js +++ b/packages/accounts-github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Github accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-google/package.js b/packages/accounts-google/package.js index 31d43632fc..d22308a617 100644 --- a/packages/accounts-google/package.js +++ b/packages/accounts-google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Google accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-meetup/package.js b/packages/accounts-meetup/package.js index 01e55d1347..90addab0ab 100644 --- a/packages/accounts-meetup/package.js +++ b/packages/accounts-meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meetup accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-meteor-developer/package.js b/packages/accounts-meteor-developer/package.js index 81a56fcafc..f5107fbb78 100644 --- a/packages/accounts-meteor-developer/package.js +++ b/packages/accounts-meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meteor developer accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/accounts-oauth/package.js b/packages/accounts-oauth/package.js index 361bc39ff0..434ca5d32b 100644 --- a/packages/accounts-oauth/package.js +++ b/packages/accounts-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based login services", - version: "1.1.2-pre.2" + version: "1.1.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index 52084aa5b9..ad718b4aaf 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Password support for accounts", - version: "1.0.3-pre.2" + version: "1.0.3-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-twitter/package.js b/packages/accounts-twitter/package.js index 46058c0f1e..63760393fe 100644 --- a/packages/accounts-twitter/package.js +++ b/packages/accounts-twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Twitter accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/accounts-ui-unstyled/package.js b/packages/accounts-ui-unstyled/package.js index 77fd534b07..7f435926ad 100644 --- a/packages/accounts-ui-unstyled/package.js +++ b/packages/accounts-ui-unstyled/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Unstyled version of login widgets", - version: "1.1.3-pre.2" + version: "1.1.3-rc.0" }); Package.on_use(function (api) { diff --git a/packages/accounts-ui/package.js b/packages/accounts-ui/package.js index efb4b3edb4..024251e1c6 100644 --- a/packages/accounts-ui/package.js +++ b/packages/accounts-ui/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Simple templates to add login widgets to an app", - version: "1.1.2-pre.2" + version: "1.1.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/accounts-weibo/package.js b/packages/accounts-weibo/package.js index e4f2598eeb..cf0357cc71 100644 --- a/packages/accounts-weibo/package.js +++ b/packages/accounts-weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Sina Weibo accounts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 0a9989eccd..0cefc1becf 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Enable the application cache in the browser", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.onUse(function (api) { diff --git a/packages/application-configuration/package.js b/packages/application-configuration/package.js index ee128a5947..bc4962ca76 100644 --- a/packages/application-configuration/package.js +++ b/packages/application-configuration/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Interaction with the configuration sources for your apps", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/audit-argument-checks/package.js b/packages/audit-argument-checks/package.js index fc2063dcc1..5191a2a194 100644 --- a/packages/audit-argument-checks/package.js +++ b/packages/audit-argument-checks/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Try to detect inadequate input sanitization", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // This package is empty; its presence is detected by livedata. diff --git a/packages/autopublish/package.js b/packages/autopublish/package.js index ad81034057..f9d9296526 100644 --- a/packages/autopublish/package.js +++ b/packages/autopublish/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Publish the entire database to all clients", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // This package is empty; its presence is detected by livedata and diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 20ba317d4e..6910b17272 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Update the client when new client code is available", - version: '1.1.2-pre.4' + version: '1.1.2-rc.0' }); Cordova.depends({ diff --git a/packages/base64/package.js b/packages/base64/package.js index b0a98152d3..dd5b539205 100644 --- a/packages/base64/package.js +++ b/packages/base64/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Base64 encoding and decoding", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/binary-heap/package.js b/packages/binary-heap/package.js index 8ef1341e26..57fe29ad38 100644 --- a/packages/binary-heap/package.js +++ b/packages/binary-heap/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Binary Heap datastructure implementation", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/blaze-tools/package.js b/packages/blaze-tools/package.js index 9558acc125..3facd0fd6d 100644 --- a/packages/blaze-tools/package.js +++ b/packages/blaze-tools/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Compile-time tools for Blaze", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/blaze/package.js b/packages/blaze/package.js index 2f622490a0..dc41835bdd 100644 --- a/packages/blaze/package.js +++ b/packages/blaze/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor Reactive Templating library", - version: '2.0.2-pre.2' + version: '2.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index b92cdfc762..e0bc30dc41 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '1.0.1-pre.4' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/browser-policy-common/package.js b/packages/browser-policy-common/package.js index 9eaeefa063..226e7fe56e 100644 --- a/packages/browser-policy-common/package.js +++ b/packages/browser-policy-common/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for browser-policy packages", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/browser-policy-content/package.js b/packages/browser-policy-content/package.js index 27665431ac..132b27744b 100644 --- a/packages/browser-policy-content/package.js +++ b/packages/browser-policy-content/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Configure content security policies", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/browser-policy-framing/package.js b/packages/browser-policy-framing/package.js index 801ec73397..993f27e393 100644 --- a/packages/browser-policy-framing/package.js +++ b/packages/browser-policy-framing/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Restrict which websites can frame your app", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/browser-policy/package.js b/packages/browser-policy/package.js index 58bff21959..6a0691dbc1 100644 --- a/packages/browser-policy/package.js +++ b/packages/browser-policy/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Configure security policies enforced by the browser", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 7c638e742a..d756315933 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/check/package.js b/packages/check/package.js index 2516060efc..6d5b3bbfcf 100644 --- a/packages/check/package.js +++ b/packages/check/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Check whether a value matches a pattern", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/code-prettify/package.js b/packages/code-prettify/package.js index 9f9a0dd367..4808404a10 100644 --- a/packages/code-prettify/package.js +++ b/packages/code-prettify/package.js @@ -8,7 +8,7 @@ var path = Npm.require('path'); Package.describe({ summary: "Syntax highlighting of code, from Google", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); // XXX this code dumps symbols into the global namespace (directly diff --git a/packages/coffeescript-test-helper/package.js b/packages/coffeescript-test-helper/package.js index 54afac0f6c..56c9aa3687 100644 --- a/packages/coffeescript-test-helper/package.js +++ b/packages/coffeescript-test-helper/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Used by the coffeescript package's tests", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/coffeescript/package.js b/packages/coffeescript/package.js index 9a873bcfcc..37d5ffd3ce 100644 --- a/packages/coffeescript/package.js +++ b/packages/coffeescript/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Javascript dialect with fewer braces and semicolons", - version: "1.0.4-pre.3" + version: "1.0.4-rc.0" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/constraint-solver/package.js b/packages/constraint-solver/package.js index 86837d43b7..103e39367f 100644 --- a/packages/constraint-solver/package.js +++ b/packages/constraint-solver/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Given the set of the constraints, picks a satisfying configuration", - version: "1.0.15-pre.2" + version: "1.0.15-rc.0" }); Npm.depends({ diff --git a/packages/ctl-helper/package.js b/packages/ctl-helper/package.js index 2a1889823f..36db6cd3dc 100644 --- a/packages/ctl-helper/package.js +++ b/packages/ctl-helper/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Helpers for control programs", - version: "1.0.4-pre.2" + version: "1.0.4-rc.0" }); Npm.depends({optimist: '0.6.0'}); diff --git a/packages/ctl/package.js b/packages/ctl/package.js index f9abec9a41..5e1ad4eaab 100644 --- a/packages/ctl/package.js +++ b/packages/ctl/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Default control program for an application", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/ddp/package.js b/packages/ddp/package.js index 24e64578a4..720544a08d 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data framework", - version: '1.0.10-pre.2' + version: '1.0.10-rc.0' }); // We use 'faye-websocket' for connections in server-to-server DDP, mostly diff --git a/packages/deps/package.js b/packages/deps/package.js index 1254c5563d..49002733b3 100644 --- a/packages/deps/package.js +++ b/packages/deps/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Deprecated: Use the 'tracker' package instead.", - version: '1.0.5-pre.2' + version: '1.0.5-rc.0' }); Package.on_use(function (api) { diff --git a/packages/dev-bundle-fetcher/package.js b/packages/dev-bundle-fetcher/package.js index 099ad862fa..c891b9bffa 100644 --- a/packages/dev-bundle-fetcher/package.js +++ b/packages/dev-bundle-fetcher/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A shell script for downloading the Meteor dev bundle", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/disable-oplog/package.js b/packages/disable-oplog/package.js index 81f2d34a1d..30d5e0ec64 100644 --- a/packages/disable-oplog/package.js +++ b/packages/disable-oplog/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Disables oplog tailing", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // This package is empty; its presence is detected by mongo-livedata. diff --git a/packages/ejson/package.js b/packages/ejson/package.js index 29895c0915..5f92fe35e5 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Extended and Extensible JSON library", - version: '1.0.4-pre.2' + version: '1.0.4-rc.0' }); Package.on_use(function (api) { diff --git a/packages/email/package.js b/packages/email/package.js index b3b822ee22..52b874072f 100644 --- a/packages/email/package.js +++ b/packages/email/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Send email messages", - version: "1.0.4-pre.2" + version: "1.0.4-rc.0" }); Npm.depends({ diff --git a/packages/facebook/package.js b/packages/facebook/package.js index 61292ba9ff..3ac745194d 100644 --- a/packages/facebook/package.js +++ b/packages/facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function(api) { diff --git a/packages/facts/package.js b/packages/facts/package.js index 126f061c41..a15426a6b5 100644 --- a/packages/facts/package.js +++ b/packages/facts/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Publish internal app statistics", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/fastclick/package.js b/packages/fastclick/package.js index 738f0f89f4..bb80d1efbd 100644 --- a/packages/fastclick/package.js +++ b/packages/fastclick/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Faster touch events on mobile", - version: '1.0.1-pre.3' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/follower-livedata/package.js b/packages/follower-livedata/package.js index f0fe804412..939187fbe3 100644 --- a/packages/follower-livedata/package.js +++ b/packages/follower-livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Maintain a connection to the leader of an election set", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/force-ssl/package.js b/packages/force-ssl/package.js index d27a0a3e70..a4a57a46d9 100644 --- a/packages/force-ssl/package.js +++ b/packages/force-ssl/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Require this application to use HTTPS", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/geojson-utils/package.js b/packages/geojson-utils/package.js index 9bcf1619cd..802b76dfe1 100644 --- a/packages/geojson-utils/package.js +++ b/packages/geojson-utils/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'GeoJSON utility functions (from https://github.com/maxogden/geojson-js-utils)', - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/github/package.js b/packages/github/package.js index 9a3d24fb75..8da6bc5343 100644 --- a/packages/github/package.js +++ b/packages/github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Github OAuth flow", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function(api) { diff --git a/packages/google/package.js b/packages/google/package.js index d6df65bbbc..2ef945ff80 100644 --- a/packages/google/package.js +++ b/packages/google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Google OAuth flow", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function(api) { diff --git a/packages/handlebars/package.js b/packages/handlebars/package.js index 37dda5385e..12641de2b2 100644 --- a/packages/handlebars/package.js +++ b/packages/handlebars/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/html-tools/package.js b/packages/html-tools/package.js index 23001291ba..9f6270e087 100644 --- a/packages/html-tools/package.js +++ b/packages/html-tools/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Standards-compliant HTML tools", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/htmljs/package.js b/packages/htmljs/package.js index 53d786308e..eefe93c7e3 100644 --- a/packages/htmljs/package.js +++ b/packages/htmljs/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Small library for expressing HTML trees", - version: '1.0.2-pre.3' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/http/package.js b/packages/http/package.js index 3bc03841ac..99c2f82163 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-pre.2' + version: '1.0.7-rc.0' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/id-map/package.js b/packages/id-map/package.js index 2c5302cca0..81b6207880 100644 --- a/packages/id-map/package.js +++ b/packages/id-map/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dictionary data structure allowing non-string keys", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/insecure/package.js b/packages/insecure/package.js index b6137ba59e..8928e84325 100644 --- a/packages/insecure/package.js +++ b/packages/insecure/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allow all database writes by default", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // This package is empty; its presence is detected by mongo-livedata. diff --git a/packages/jquery-history/package.js b/packages/jquery-history/package.js index 116a20506c..3d45b17b23 100644 --- a/packages/jquery-history/package.js +++ b/packages/jquery-history/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "pushState module from the jQuery project", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/jquery-layout/package.js b/packages/jquery-layout/package.js index e71f87d7f1..51a57e6f03 100644 --- a/packages/jquery-layout/package.js +++ b/packages/jquery-layout/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Easily create arbitrary multicolumn layouts", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/jquery-waypoints/package.js b/packages/jquery-waypoints/package.js index 8d3f19e3af..ae978e1255 100644 --- a/packages/jquery-waypoints/package.js +++ b/packages/jquery-waypoints/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run a function when the user scrolls past an element", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/jquery/package.js b/packages/jquery/package.js index 86dc76fbcc..fe32de067a 100644 --- a/packages/jquery/package.js +++ b/packages/jquery/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Manipulate the DOM using CSS selectors", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/js-analyze-tests/package.js b/packages/js-analyze-tests/package.js index 7d867cfae9..040138c53c 100644 --- a/packages/js-analyze-tests/package.js +++ b/packages/js-analyze-tests/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Tests for JavaScript code analysis for Meteor", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); // The tests are in a separate package so that it is possible to compile diff --git a/packages/js-analyze/package.js b/packages/js-analyze/package.js index 8f465b218f..dde0f35ce8 100644 --- a/packages/js-analyze/package.js +++ b/packages/js-analyze/package.js @@ -4,7 +4,7 @@ Package.describe({ summary: "JavaScript code analysis for Meteor", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); // Use some packages from the Esprima project. If it turns out we need these on diff --git a/packages/json/package.js b/packages/json/package.js index 65e8e02d5f..54b20e41dc 100644 --- a/packages/json/package.js +++ b/packages/json/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Provides JSON.stringify and JSON.parse for older browsers", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // We need to figure out how to serve this file only to browsers that don't have diff --git a/packages/jsparse/package.js b/packages/jsparse/package.js index 34dd19c4f6..34304d48a9 100644 --- a/packages/jsparse/package.js +++ b/packages/jsparse/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Full-featured JavaScript parser", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/less/package.js b/packages/less/package.js index cc1f7cb4de..10c7b4a527 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-pre.3" + version: "1.0.10-rc.0" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/livedata/package.js b/packages/livedata/package.js index de5fa8ae38..1a7bf071ac 100644 --- a/packages/livedata/package.js +++ b/packages/livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'ddp' package", - version: '1.0.11-pre.2' + version: '1.0.11-rc.0' }); Package.on_use(function (api) { diff --git a/packages/localstorage/package.js b/packages/localstorage/package.js index 424e669abd..0e4e64ecca 100644 --- a/packages/localstorage/package.js +++ b/packages/localstorage/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/logging/package.js b/packages/logging/package.js index c37e092781..bf6b8e4576 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Logging facility.", - version: '1.0.4-pre.2' + version: '1.0.4-rc.0' }); Npm.depends({ diff --git a/packages/markdown/package.js b/packages/markdown/package.js index 532433b3f3..53fcb1a8b5 100644 --- a/packages/markdown/package.js +++ b/packages/markdown/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Markdown-to-HTML processor", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function (api) { diff --git a/packages/meetup/package.js b/packages/meetup/package.js index 58bfb8f75e..56b5b51188 100644 --- a/packages/meetup/package.js +++ b/packages/meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meetup OAuth flow", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function(api) { diff --git a/packages/meteor-developer/package.js b/packages/meteor-developer/package.js index ecf0cde915..e378d10df8 100644 --- a/packages/meteor-developer/package.js +++ b/packages/meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor developer accounts OAuth flow", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/meteor-platform/package.js b/packages/meteor-platform/package.js index 979ab7d0e9..b1c39ebda0 100644 --- a/packages/meteor-platform/package.js +++ b/packages/meteor-platform/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Include a standard set of Meteor packages in your app", - version: '1.1.2-pre.4' + version: '1.1.2-rc.0' }); Package.on_use(function(api) { diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 7a4e152b81..fc2c11fddf 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-pre.11' + version: '1.0.34-rc.0' }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 62e8e27fc7..45886bffba 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '1.1.2-pre.3' + version: '1.1.2-rc.0' }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meyerweb-reset/package.js b/packages/meyerweb-reset/package.js index 2d7fd81a43..bfd5b09665 100644 --- a/packages/meyerweb-reset/package.js +++ b/packages/meyerweb-reset/package.js @@ -3,7 +3,7 @@ // encourage this pattern. Maybe another solution would be better. Package.describe({ summary: "reset.css v2.0 from http://meyerweb.com/eric/tools/css/reset/", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/minifiers/package.js b/packages/minifiers/package.js index adb3511d31..5235a74c6c 100644 --- a/packages/minifiers/package.js +++ b/packages/minifiers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript and CSS minifiers", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Npm.depends({ diff --git a/packages/minimongo/package.js b/packages/minimongo/package.js index 8493e14dad..3e34ffbdba 100644 --- a/packages/minimongo/package.js +++ b/packages/minimongo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's client-side datastore: a port of MongoDB to Javascript", - version: '1.0.4-pre.3' + version: '1.0.4-rc.0' }); Package.on_use(function (api) { diff --git a/packages/mobile-status-bar/package.js b/packages/mobile-status-bar/package.js index 1bddd491a5..96195864b7 100644 --- a/packages/mobile-status-bar/package.js +++ b/packages/mobile-status-bar/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Good defaults for the mobile status bar", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.onUse(function(api) { diff --git a/packages/mongo-livedata/package.js b/packages/mongo-livedata/package.js index 9876f1bf81..e4acdf8dfa 100644 --- a/packages/mongo-livedata/package.js +++ b/packages/mongo-livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'mongo' package", - version: '1.0.6-pre.2' + version: '1.0.6-rc.0' }); Package.on_use(function (api) { diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 6d9a6609a1..54d62e2162 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.0.7-pre.2' + version: '1.0.7-rc.0' }); Npm.depends({ diff --git a/packages/netroute/package.js b/packages/netroute/package.js index d6dc0c6e39..35eaeb6cf9 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-pre.0" + version: "0.2.5-rc.0" }); Npm.depends({ diff --git a/packages/oauth-encryption/package.js b/packages/oauth-encryption/package.js index a8b82f3a80..02bdb0c7e3 100644 --- a/packages/oauth-encryption/package.js +++ b/packages/oauth-encryption/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Encrypt account secrets stored in the database", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/oauth/package.js b/packages/oauth/package.js index 7fe18ab4c3..34658b18aa 100644 --- a/packages/oauth/package.js +++ b/packages/oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based services", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/oauth1/package.js b/packages/oauth1/package.js index 51f5e3ddb8..73073708ec 100644 --- a/packages/oauth1/package.js +++ b/packages/oauth1/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth1-based login services", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/oauth2/package.js b/packages/oauth2/package.js index 58a5b729cc..fab6f54e9b 100644 --- a/packages/oauth2/package.js +++ b/packages/oauth2/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth2-based login services", - version: "1.1.1-pre.2" + version: "1.1.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/observe-sequence/package.js b/packages/observe-sequence/package.js index 58bd95d172..880fef0f3c 100644 --- a/packages/observe-sequence/package.js +++ b/packages/observe-sequence/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Observe changes to various sequence types such as arrays, cursors and objects", - version: "1.0.3-pre.2" + version: "1.0.3-rc.0" }); Package.on_use(function (api) { diff --git a/packages/ordered-dict/package.js b/packages/ordered-dict/package.js index 60f928602a..f8964ebefb 100644 --- a/packages/ordered-dict/package.js +++ b/packages/ordered-dict/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Ordered traversable dictionary with a mutable ordering", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/package-stats-opt-out/package.js b/packages/package-stats-opt-out/package.js index 9d959b6d55..89188268d3 100644 --- a/packages/package-stats-opt-out/package.js +++ b/packages/package-stats-opt-out/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Opt out of sending package stats", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/package-version-parser/package.js b/packages/package-version-parser/package.js index 61cc700d41..69f19c6bcf 100644 --- a/packages/package-version-parser/package.js +++ b/packages/package-version-parser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Parses Meteor Smart Package version string", - version: "2.0.2-pre.2" + version: "2.0.2-rc.0" }); Npm.depends({ diff --git a/packages/preserve-inputs/package.js b/packages/preserve-inputs/package.js index 2fd3b9aadd..dc72ee70af 100644 --- a/packages/preserve-inputs/package.js +++ b/packages/preserve-inputs/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated package (now empty)", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/random/package.js b/packages/random/package.js index 0a68aa0601..4682a971ca 100644 --- a/packages/random/package.js +++ b/packages/random/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Random number generator and utilities", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/reactive-dict/package.js b/packages/reactive-dict/package.js index 34496a4cd3..faae52161b 100644 --- a/packages/reactive-dict/package.js +++ b/packages/reactive-dict/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reactive dictionary", - version: '1.0.4-pre.2' + version: '1.0.4-rc.0' }); Package.on_use(function (api) { diff --git a/packages/reactive-var/package.js b/packages/reactive-var/package.js index 7cad7b99a3..c05e03930b 100644 --- a/packages/reactive-var/package.js +++ b/packages/reactive-var/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reactive variable", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/reload-safetybelt/package.js b/packages/reload-safetybelt/package.js index 5edb7fd860..eb6ed4d976 100644 --- a/packages/reload-safetybelt/package.js +++ b/packages/reload-safetybelt/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload safety belt for multi-server deployments", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/reload/package.js b/packages/reload/package.js index 44826f3d2b..10af3db434 100644 --- a/packages/reload/package.js +++ b/packages/reload/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload the page while preserving application state.", - version: '1.1.1-pre.2' + version: '1.1.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/retry/package.js b/packages/retry/package.js index b5104f5a46..d70a7e87af 100644 --- a/packages/retry/package.js +++ b/packages/retry/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Retry logic with exponential backoff", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/routepolicy/package.js b/packages/routepolicy/package.js index 2e8623ebc0..3c8f29fa1d 100644 --- a/packages/routepolicy/package.js +++ b/packages/routepolicy/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "route policy declarations", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/service-configuration/package.js b/packages/service-configuration/package.js index 2b236d4640..849c295bed 100644 --- a/packages/service-configuration/package.js +++ b/packages/service-configuration/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Manage the configuration for third-party services", - version: "1.0.2-pre.2" + version: "1.0.2-rc.0" }); Package.on_use(function(api) { diff --git a/packages/session/package.js b/packages/session/package.js index 33b20347f7..6a05b1e853 100644 --- a/packages/session/package.js +++ b/packages/session/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Session variable", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/sha/package.js b/packages/sha/package.js index 6dbc4d146f..c8837f42b8 100644 --- a/packages/sha/package.js +++ b/packages/sha/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "SHA256 implementation", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/showdown/package.js b/packages/showdown/package.js index 71e908167d..3a04d79176 100644 --- a/packages/showdown/package.js +++ b/packages/showdown/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'markdown' package", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/spacebars-compiler/package.js b/packages/spacebars-compiler/package.js index 9fe49dd47c..8571200d4b 100644 --- a/packages/spacebars-compiler/package.js +++ b/packages/spacebars-compiler/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Compiler for Spacebars template language", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/spacebars-tests/package.js b/packages/spacebars-tests/package.js index 3bc8dd1680..cce84e0897 100644 --- a/packages/spacebars-tests/package.js +++ b/packages/spacebars-tests/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Additional tests for Spacebars", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); // These tests are in a separate package to avoid a circular dependency diff --git a/packages/spacebars/package.js b/packages/spacebars/package.js index 0181b21368..6d1b576d2b 100644 --- a/packages/spacebars/package.js +++ b/packages/spacebars/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Handlebars-like template language for Meteor", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); // For more, see package `spacebars-compiler`, which is used by diff --git a/packages/spiderable/package.js b/packages/spiderable/package.js index 1f670ce65f..922d5cf18f 100644 --- a/packages/spiderable/package.js +++ b/packages/spiderable/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Makes the application crawlable to web spiders", - version: "1.0.4-pre.2" + version: "1.0.4-rc.0" }); Package.on_use(function (api) { diff --git a/packages/srp/package.js b/packages/srp/package.js index c8c71d9f2d..b4aa054541 100644 --- a/packages/srp/package.js +++ b/packages/srp/package.js @@ -5,7 +5,7 @@ Package.describe({ summary: "Library for Secure Remote Password (SRP) exchanges", - version: "1.0.1-pre.1" + version: "1.0.1-rc.0" }); Package.on_use(function (api) { diff --git a/packages/standard-app-packages/package.js b/packages/standard-app-packages/package.js index 8cfdcc80cc..d395925b68 100644 --- a/packages/standard-app-packages/package.js +++ b/packages/standard-app-packages/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to meteor-platform", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/star-translate/package.js b/packages/star-translate/package.js index 28ad8017c0..d44cc9cb14 100644 --- a/packages/star-translate/package.js +++ b/packages/star-translate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A package for translating old bundles into stars", - version: "1.0.4-pre.2" + version: "1.0.4-rc.0" }); Package.on_use(function (api) { diff --git a/packages/startup/package.js b/packages/startup/package.js index 41da29e605..1658ba96be 100644 --- a/packages/startup/package.js +++ b/packages/startup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated package (now empty)", - version: "1.0.1-pre.2", + version: "1.0.1-rc.0", }); Package.on_use(function (api) { diff --git a/packages/stylus/package.js b/packages/stylus/package.js index f40936977f..5b70a79824 100644 --- a/packages/stylus/package.js +++ b/packages/stylus/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Expressive, dynamic, robust CSS', - version: "1.0.5-pre.3" + version: "1.0.5-rc.0" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/templating/package.js b/packages/templating/package.js index 20c60ee19b..12a1220554 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allows templates to be defined in .html files", - version: '1.0.8-pre.3' + version: '1.0.8-rc.0' }); // Today, this package is closely intertwined with Handlebars, meaning diff --git a/packages/test-helpers/package.js b/packages/test-helpers/package.js index ce0e8c69b2..4d62f7dd1a 100644 --- a/packages/test-helpers/package.js +++ b/packages/test-helpers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility functions for tests", - version: '1.0.2-pre.2' + version: '1.0.2-rc.0' }); Package.on_use(function (api) { diff --git a/packages/test-in-browser/package.js b/packages/test-in-browser/package.js index cd76dbf3f7..8f23a682da 100644 --- a/packages/test-in-browser/package.js +++ b/packages/test-in-browser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run tests interactively in the browser", - version: '1.0.5-pre.2' + version: '1.0.5-rc.0' }); Package.on_use(function (api) { diff --git a/packages/test-in-console/package.js b/packages/test-in-console/package.js index 5a46fabe31..0b397fe3e9 100644 --- a/packages/test-in-console/package.js +++ b/packages/test-in-console/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run tests noninteractively, with results going to the console.", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/test-server-tests-in-console-once/package.js b/packages/test-server-tests-in-console-once/package.js index 6be433faee..586d9668b8 100644 --- a/packages/test-server-tests-in-console-once/package.js +++ b/packages/test-server-tests-in-console-once/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run server tests noninteractively, with results going to the console.", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/tinytest/package.js b/packages/tinytest/package.js index 7538567c03..6b2bed9512 100644 --- a/packages/tinytest/package.js +++ b/packages/tinytest/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Tiny testing framework", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/tracker/package.js b/packages/tracker/package.js index 00313fff1b..f81856a5e9 100644 --- a/packages/tracker/package.js +++ b/packages/tracker/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dependency tracker to allow reactive callbacks", - version: '1.0.3-pre.2' + version: '1.0.3-rc.0' }); Package.on_use(function (api) { diff --git a/packages/twitter/package.js b/packages/twitter/package.js index 329db56910..cba9ebf796 100644 --- a/packages/twitter/package.js +++ b/packages/twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Twitter OAuth flow", - version: '1.1.1-pre.2' + version: '1.1.1-rc.0' }); Package.on_use(function(api) { diff --git a/packages/ui/package.js b/packages/ui/package.js index 6115f90d1b..4b1ef8f307 100644 --- a/packages/ui/package.js +++ b/packages/ui/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated: Use the 'blaze' package", - version: '1.0.4-pre.2' + version: '1.0.4-rc.0' }); Package.on_use(function (api) { diff --git a/packages/underscore-tests/package.js b/packages/underscore-tests/package.js index 58916ec887..2aec2406ca 100644 --- a/packages/underscore-tests/package.js +++ b/packages/underscore-tests/package.js @@ -2,7 +2,7 @@ Package.describe({ // These tests can't be directly in the underscore packages since // Tinytest depends on underscore summary: "Tests for the underscore package", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_test(function (api) { diff --git a/packages/underscore/package.js b/packages/underscore/package.js index 10f3e75dd6..0d3915c8e8 100644 --- a/packages/underscore/package.js +++ b/packages/underscore/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Collection of small helpers: _.map, _.each, ...", - version: '1.0.1-pre.2' + version: '1.0.1-rc.0' }); Package.on_use(function (api) { diff --git a/packages/url/package.js b/packages/url/package.js index bcb2508d8a..2ae138fada 100644 --- a/packages/url/package.js +++ b/packages/url/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility code for constructing URLs", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.onUse(function(api) { diff --git a/packages/webapp-hashing/package.js b/packages/webapp-hashing/package.js index 3c79140c5c..b855ada3b3 100644 --- a/packages/webapp-hashing/package.js +++ b/packages/webapp-hashing/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Used internally by WebApp. Knows how to hash programs from manifests.", - version: "1.0.1-pre.2" + version: "1.0.1-rc.0" }); Package.onUse(function(api) { diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 0e428e3abd..6e12b035ef 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.1.3-pre.3' + version: '1.1.3-rc.0' }); Npm.depends({connect: "2.9.0", diff --git a/packages/weibo/package.js b/packages/weibo/package.js index 81cfabb350..b4e952efa1 100644 --- a/packages/weibo/package.js +++ b/packages/weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Weibo OAuth flow", - version: '1.1.1-pre.2' + version: '1.1.1-rc.0' }); Package.on_use(function(api) { diff --git a/packages/xmlbuilder/package.js b/packages/xmlbuilder/package.js index 0ab8218504..11f73c2469 100644 --- a/packages/xmlbuilder/package.js +++ b/packages/xmlbuilder/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "An XML builder for node.js similar to java-xmlbuilder.", - version: '2.4.4-pre.0' + version: '2.4.4-rc.0' }); Npm.depends({ From 2ab49825295b2a0fee2b970379cb75db304268f4 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 17:01:46 -0700 Subject: [PATCH 063/283] Bump meteor version --- scripts/admin/meteor-release-experimental.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 21f630fb7c..a0ee1fcbdf 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,7 +1,7 @@ { "track": "METEOR", - "version": "0.9.4-pre.11", + "version": "0.9.4-rc.0", "recommended": false, "official": false, - "description": "A preview of Meteor 0.9.4." + "description": "An RC of Meteor 0.9.4." } From 6a6bb529bbb372217f4def30dec81c1c9e356eea Mon Sep 17 00:00:00 2001 From: ekatek Date: Tue, 7 Oct 2014 17:13:37 -0700 Subject: [PATCH 064/283] adding a var to make code style happy --- tools/isopack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/isopack.js b/tools/isopack.js index aa46f0fd34..5c836319d0 100644 --- a/tools/isopack.js +++ b/tools/isopack.js @@ -524,7 +524,7 @@ _.extend(Isopack.prototype, { // deal with different versions of "isopack.json", backwards compatible var isopackJsonPath = path.join(dir, "isopack.json"); if (fs.existsSync(isopackJsonPath)) { - isopackJson = JSON.parse(fs.readFileSync(isopackJsonPath)); + var isopackJson = JSON.parse(fs.readFileSync(isopackJsonPath)); if (isopackJson[currentFormat]) { mainJson = isopackJson[currentFormat]; From 03a9c694518245bafbaf8a29a4fe81d320cc75ec Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 7 Oct 2014 17:20:22 -0700 Subject: [PATCH 065/283] Be much more liberal in detecting the JDK Even detect JDK 1.6, which probably shouldn't really be used any more --- tools/commands-cordova.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 8762c35779..e15239a6c2 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1934,8 +1934,17 @@ _.extend(Android.prototype, { if (javaHomes) { javaHomes = javaHomes.trim(); + // JDK 8 // /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home - if (javaHomes.indexOf('/Library/Java/JavaVirtualMachines/jdk') == 0) { + if (javaHomes.indexOf('/Library/Java/JavaVirtualMachines/jdk') != -1) { + return true; + } + + // JDK 6 (which is I think unsupported) + // /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home + + // XXX: This is a very liberal match + if (javaHomes.indexOf('.jdk/') != -1) { return true; } } From 8d2fd2300582c10079b962feaca98ac8545f7983 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 17:22:27 -0700 Subject: [PATCH 066/283] Hide the splash screen only after the plugins and page is loaded --- packages/meteor/startup_client.js | 5 +++++ tools/commands-cordova.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/meteor/startup_client.js b/packages/meteor/startup_client.js index 7c88ee434e..d52d52f205 100644 --- a/packages/meteor/startup_client.js +++ b/packages/meteor/startup_client.js @@ -8,6 +8,11 @@ var ready = function() { if (awaitingEventsCount > 0) return; + // XXX hide the splash screen if such exists, only on mobile + if (Meteor.isCordova) { + navigator.splashscree && navigator.splashscreen.hide(); + } + loaded = true; while (queue.length) (queue.shift())(); diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index e15239a6c2..e7094e4aa4 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1225,7 +1225,8 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { // set some defaults different from the Phonegap/Cordova defaults var additionalConfiguration = { 'webviewbounce': false, - 'DisallowOverscroll': true + 'DisallowOverscroll': true, + 'AutoHideSplashScreen': false }; var imagePaths = { icon: {}, From f78184c49794b920d21e7f2a990e01d63c30c754 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 17:03:44 -0700 Subject: [PATCH 067/283] Disallow plugins and imply in debugOnly packages --- tools/package-source.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/package-source.js b/tools/package-source.js index a50525116f..76ed7780b3 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -517,7 +517,7 @@ _.extend(PackageSource.prototype, { "trying to initialize a nonexistent base package " + value); } } else if (key === "debugOnly") { - self.debugOnly = value; + self.debugOnly = !!value; } else { // Do nothing. We might want to add some keys later, and we should err // on the side of backwards compatibility. @@ -869,6 +869,21 @@ _.extend(PackageSource.prototype, { // recover by ignoring } + // We want the "debug mode" to be a property of the *bundle* operation + // (turning a set of packages, including the app, into a star), not the + // *compile* operation (turning a package source into an isopack). This is + // so we don't have to publish two versions of each package. But we have no + // way to mark a file in an isopack as being the result of running a plugin + // from a debugOnly dependency, and so there is no way to tell which files + // to exclude in production mode from a published package. Eventually, we'll + // add such a flag to the isopack format, but until then we'll sidestep the + // issue by disallowing build plugins in debugOnly packages. + if (self.debugOnly && !_.isEmpty(self.pluginInfo)) { + buildmessage.error( + "can't register build plugins in debugOnly packages"); + // recover by ignoring + } + if (self.version === null && options.requireVersion) { if (options.defaultVersion) { self.version = options.defaultVersion; @@ -1137,6 +1152,17 @@ _.extend(PackageSource.prototype, { * @param {String|String[]} packageSpecs Name of a package, or array of package names, with an optional @version component for each. */ imply: function (names, arch) { + // We currently disallow build plugins in debugOnly packages; but if + // you could use imply in a debugOnly package, you could pull in the + // build plugin from an implied package, which would have the same + // problem as allowing build plugins directly in the package. So no + // imply either! + if (self.debugOnly) { + buildmessage.error("can't use imply in debugOnly packages"); + // recover by ignoring + return; + } + names = toArray(names); arch = toArchArray(arch); From 9bf291c8a045895ee5e2fa56a42e2047b0a63747 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 17:15:52 -0700 Subject: [PATCH 068/283] Read and write debugOnly flag in isopack --- tools/compiler.js | 3 ++- tools/isopack.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/compiler.js b/tools/compiler.js index 13d7c77d96..6fb07fb596 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -1106,7 +1106,8 @@ compiler.compile = function (packageSource, options) { cordovaDependencies: packageSource.cordovaDependencies, buildTimeDirectDependencies: buildTimeDeps.directDependencies, buildTimePluginDependencies: buildTimeDeps.pluginDependencies, - includeTool: packageSource.includeTool + includeTool: packageSource.includeTool, + debugOnly: packageSource.debugOnly }); // Compile unibuilds. Might use our plugins, so needs to happen second. diff --git a/tools/isopack.js b/tools/isopack.js index 5c836319d0..4a5440149c 100644 --- a/tools/isopack.js +++ b/tools/isopack.js @@ -235,6 +235,7 @@ var Isopack = function () { self.version = null; self.earliestCompatibleVersion = null; self.isTest = false; + self.debugOnly = false; // Unibuilds, an array of class Unibuild. self.unibuilds = []; @@ -317,6 +318,7 @@ _.extend(Isopack.prototype, { self.buildTimeDirectDependencies = options.buildTimeDirectDependencies; self.buildTimePluginDependencies = options.buildTimePluginDependencies; self.includeTool = options.includeTool; + self.debugOnly = options.debugOnly; }, // Programmatically add a unibuild to this Isopack. Should only be @@ -626,6 +628,7 @@ _.extend(Isopack.prototype, { self.version = mainJson.version; self.earliestCompatibleVersion = mainJson.earliestCompatibleVersion; self.isTest = mainJson.isTest; + self.debugOnly = !!mainJson.debugOnly; } _.each(mainJson.plugins, function (pluginMeta) { rejectBadPath(pluginMeta.path); @@ -765,6 +768,9 @@ _.extend(Isopack.prototype, { plugins: [] }; + if (self.debugOnly) { + mainJson.debugOnly = true; + } if (! _.isEmpty(self.cordovaDependencies)) { mainJson.cordovaDependencies = self.cordovaDependencies; } From 5590d194c5f21a41d87a74422a1c539b80af0b1f Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 17:28:21 -0700 Subject: [PATCH 069/283] debug-only flag only affects bundler, not compiler --- tools/bundler.js | 27 ++++++++----- tools/catalog.js | 47 ---------------------- tools/commands.js | 4 +- tools/compiler.js | 88 ++++++----------------------------------- tools/package-loader.js | 9 ----- tools/project.js | 44 +++------------------ 6 files changed, 36 insertions(+), 183 deletions(-) diff --git a/tools/bundler.js b/tools/bundler.js index ce06c1a0d0..4628ebcbce 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -527,14 +527,16 @@ _.extend(Target.prototype, { var packageLoader = self.packageLoader; // Find the roots - var rootUnibuilds = - _.map(options.packages || [], function (p) { - if (typeof p === "string") { - return packageLoader.getUnibuild(p, self.arch); - } else { - return p.getUnibuildAtArch(self.arch); - } - }); + var rootUnibuilds = []; + _.each(options.packages, function (p) { + if (typeof p === "string") { + p = packageLoader.getPackage(p, { throwOnError: true }); + } + if (p.debugOnly && !project.project.includeDebug) { + return; + } + rootUnibuilds.push(p.getUnibuildAtArch(self.arch)); + }); // PHASE 1: Which unibuilds will be used? // @@ -552,7 +554,9 @@ _.extend(Target.prototype, { usedUnibuilds[unibuild.id] = unibuild; usedPackages[unibuild.pkg.name] = true; compiler.eachUsedUnibuild( - unibuild.uses, self.arch, packageLoader, addToGetsUsed); + unibuild.uses, self.arch, packageLoader, { + skipDebugOnly: !project.project.includeDebug + }, addToGetsUsed); }; _.each(rootUnibuilds, addToGetsUsed); @@ -590,7 +594,10 @@ _.extend(Target.prototype, { // SOMETHING uses strongly). compiler.eachUsedUnibuild( unibuild.uses, self.arch, packageLoader, - { skipUnordered: true, acceptableWeakPackages: usedPackages}, + { skipUnordered: true, + acceptableWeakPackages: usedPackages, + skipDebugOnly: !project.project.includeDebug + }, function (usedUnibuild) { if (onStack[usedUnibuild.id]) { buildmessage.error("circular dependency between packages " + diff --git a/tools/catalog.js b/tools/catalog.js index 865a5a05b1..5ddb806ab9 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -300,53 +300,6 @@ _.extend(LayeredCatalog.prototype, { return ret.answer; }, - // Separates out debugOnly packages and their dependencies. Goes through - // constraints recursively, and selects a subset of our versions that we use - // if we omit debug-only packages and their dependencies. - // - // Takes in a set of constraints (list of packages that we explicitly depend - // on) and a set of versions of those packages that we have agreed to use. - // - // Returns an object with news: versions (the versions we will use) and - // excluded (the versions that we will NOT use). - separateOutDebugDeps: function (constraints, versions) { - var self = this; - var processed = {}; - var prodDeps = function (seed, versions) { - _.each(seed, function (s) { - if (processed[s]) - return; - var vRec = self.getVersion(s, versions[s]); - if (vRec && !!vRec.debugOnly) { - // This is a debugOnly dependency. Stop. - return; - } else { - processed[s] = versions[s]; - var next = []; - // Weak dependencies don't lead to packages that get bundled, so we - // don't have to worry if they are debugOnly. (Unless they are - // mentioned as non-weak dependencies elsewhere, in which case we - // will get to them then) - var next = _.filter(_.keys(vRec.dependencies), function (p) { - return _.has(versions, p); - }); - prodDeps(next, versions); - } - }); - }; - prodDeps(constraints, versions); - var excluded = {}; - _.each(versions, function(v, p) { - if (!_.has(processed, p)) { - excluded[p] = v; - } - }); - return { - versions: processed, - excluded: excluded - }; - }, - // Refresh the catalogs referenced by this catalog. // options: // - forceRefresh: even if there is a future in progress, refresh the catalog diff --git a/tools/commands.js b/tools/commands.js index c0e1e23705..f94030aff9 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1264,9 +1264,7 @@ main.registerCommand({ project.setMuted(true); // Mute output where applicable // Hardset the proper release. project.writeMeteorReleaseVersion(release.current.name || 'none'); - // Set debug mode directly, mostly to avoid running the constraint solver an - // extra time. - project.includeDebug = !options.production; + project.setDebug(!options.production); project.forceEditPackages( [options['driver-package'] || 'test-in-browser'], 'add'); diff --git a/tools/compiler.js b/tools/compiler.js index 6fb07fb596..810e112846 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -76,20 +76,21 @@ compiler.eachUsedUnibuild = function ( return; if (use.weak && !_.has(acceptableWeakPackages, use.package)) return; - if (packageLoader.excludedPackage(use.package)) { - return; - } usesToProcess.push(use); }); while (!_.isEmpty(usesToProcess)) { var use = usesToProcess.shift(); - if (packageLoader.excludedPackage(use.package)) { - return; - } + var usedPackage = packageLoader.getPackage( + use.package, { throwOnError: true }); - var unibuild = packageLoader.getUnibuild(use.package, arch); + // Ignore this package if we were told to skip debug-only packages and it is + // debug-only. + if (usedPackage.debugOnly && options.skipDebugOnly) + continue; + + var unibuild = usedPackage.getUnibuildAtArch(arch); if (!unibuild) { // The package exists but there's no unibuild for us. A buildmessage has // already been issued. Recover by skipping. @@ -117,20 +118,12 @@ compiler.eachUsedUnibuild = function ( // Output is an object with keys: // - directDependencies: map from package name to version string, for the // package's direct, ordered, strong, non-implied dependencies. -// - packageDependencies: map from package name to version string to complete -// transitive dependency in this package. We need for the version lock file -// and to deal with implies. -// - packageExcluded: map from package name to version string of transitive -// dependencies that are not included in packageDependencies because we will -// not bundle them with the package. If we are bundling for production mode -// (default) this is the debugOnly packages and their dependencies. // - pluginDependencies: map from plugin name to complete (transitive) // version information for all packages used to build the plugin, as // a map from package name to version string. -// - pluginExcluded: see: packageExcluded, but per plugin. -// -// Options: -// - (see options for the constraint solver in catalog-local.js) +// - packageDependencies: map from package name to version string to complete +// transitive dependency in this package. We need for the version lock file +// and to deal with implies. // // XXX You may get different results from this function depending on // when you call it (if, for example, the packages in the catalog @@ -227,7 +220,6 @@ var determineBuildTimeDependencies = function (packageSource, // -- Dependencies of Plugins -- ret.pluginDependencies = {}; - var pluginConstraints = {}; var pluginVersions = packageSource.dependencyVersions.pluginDependencies; _.each(packageSource.pluginInfo, function (info) { var constraints = {}; @@ -248,7 +240,6 @@ var determineBuildTimeDependencies = function (packageSource, }); var pluginVersion = pluginVersions[info.name] || {}; - pluginConstraints[info.name] = constraints_array; try { ret.pluginDependencies[info.name] = packageSource.catalog.resolveConstraints( @@ -284,59 +275,6 @@ var determineBuildTimeDependencies = function (packageSource, release.current.getCurrentToolsVersion()); } - // If we are building for production mode, we also care about filtering out - // debugOnly dependencies. Note, however, that we still record them in the - // versions file, since they influence the versions of other dependencies. - // - // We build for production mode by default, unless our project says - // otherwise. And we never build in debug mode for uniload, because that makes - // no sense. - _.each(["packageExcluded", "pluginExcluded"], function (key) { - ret[key] = {}; - }); - // Don't bother filtering things if we are in uniload. That's too complicated. - if (packageSource.catalog !== catalog.complete) { - return ret; - } - // If you have decided to build this package already, and this package is - // debugOnly, then it doesn't make sense to filter out its debugOnly subtrees. - if (packageSource.debugOnly) { - return ret; - } - // If the project tells us to include debugOnly packages, we shall do it. - var project = require('./project.js').project; - if (project && project.includeDebug) { - return ret; - } - - var directVersions = - packageSource.catalog.separateOutDebugDeps( - _.pluck(constraints_array, 'name'), - ret.directDependencies); - - var packageVersions = - packageSource.catalog.separateOutDebugDeps( - _.pluck(constraints_array, 'name'), - ret.packageDependencies); - - var pluginExcluded = {}; - var pluginVersions = {}; - _.each(ret.pluginDependencies, function (versions, name) { - var filteredVersions = - packageSource.catalog.separateOutDebugDeps( - _.pluck(pluginConstraints[name], 'name'), - versions); - pluginVersions[name] = filteredVersions.versions; - pluginExcluded[name] = filteredVersions.excluded; - }); - - ret = { - directDependencies : directVersions.versions, - packageDependencies: packageVersions.versions, - packageExcluded: packageVersions.excluded, - pluginDependencies: pluginVersions, - pluginExcluded: pluginExcluded - }; return ret; }; @@ -1028,8 +966,7 @@ compiler.compile = function (packageSource, options) { var loader = new packageLoader.PackageLoader({ versions: buildTimeDeps.pluginDependencies[info.name], - catalog: packageSource.catalog, - excluded: buildTimeDeps.pluginExcluded[info.name] + catalog: packageSource.catalog }); loader.downloadMissingPackages({serverArch: archinfo.host() }); @@ -1114,7 +1051,6 @@ compiler.compile = function (packageSource, options) { var loader = new packageLoader.PackageLoader({ versions: buildTimeDeps.packageDependencies, catalog: packageSource.catalog, - excluded: buildTimeDeps.packageExcluded, constraintSolverOpts: { ignoreProjectDeps: options.ignoreProjectDeps } diff --git a/tools/package-loader.js b/tools/package-loader.js index 0af4686cdc..be3cbb234a 100644 --- a/tools/package-loader.js +++ b/tools/package-loader.js @@ -28,7 +28,6 @@ exports.PackageLoader = function (options) { self.uniloadDir = options.uniloadDir; self.constraintSolverOpts = options.constraintSolverOpts; self.catalog = options.catalog; - self.excluded = options.excluded; }; _.extend(exports.PackageLoader.prototype, { @@ -117,13 +116,5 @@ _.extend(exports.PackageLoader.prototype, { tropohouse.default.downloadMissingPackages(self.versions, { serverArch: options.serverArch }); - }, - - // Sometimes, we have figured out the versions for packages, but we have no - // intention of loading them. In this case, they are considered 'excluded - // packages'. This function lets us know if we have hit one of those. - excludedPackage: function (packageName) { - var self = this; - return self.excluded && self.excluded[packageName]; } }); diff --git a/tools/project.js b/tools/project.js index c3ba2067eb..8c21cdb5aa 100644 --- a/tools/project.js +++ b/tools/project.js @@ -117,11 +117,7 @@ var Project = function () { _.extend(Project.prototype, { setDebug: function (debug) { var self = this; - self._ensureDepsUpToDate(); - if (self.includeDebug !== debug) { - self.includeDebug = debug; - self._generatePackageLoader(); - } + self.includeDebug = debug; }, // Sets the mute flag on the project. Muted projects don't print out non-error @@ -255,9 +251,11 @@ _.extend(Project.prototype, { process.exit(1); } - // We have successfully set our versions, so let's generate the package - // loader. - self._generatePackageLoader(); + // Finally, initialize the package loader. + self.packageLoader = new packageLoader.PackageLoader({ + versions: newVersions, + catalog: catalog.complete + }); // We are done! self._depsUpToDate = true; @@ -265,36 +263,6 @@ _.extend(Project.prototype, { } }, - // Given a set of versions and combined constraints, generate a package loader - // for this project. - // - // This is part of _ensureDepsUpToDate. Assumes that VERSIONS HAVE BEEN - // GENERATED. If you are not sure if your project is up to date before you - // call this function, call _ensureUpToDate first. - _generatePackageLoader: function () { - var self = this; - // Finally, initialize the package loader. If we are building for prod, we - // are going to not load debug packages, so filter that out here. - if (self.includeDebug) { - self.packageLoader = new packageLoader.PackageLoader({ - versions: self.dependencies, - catalog: catalog.complete, - excluded: {} - }); - } else { - var prodVersions = - catalog.complete.separateOutDebugDeps( - _.pluck(self.combinedConstraints, 'name'), - self.dependencies); - - self.packageLoader = new packageLoader.PackageLoader({ - versions: prodVersions.versions, - catalog: catalog.complete, - excluded: prodVersions.excluded - }); - } - }, - // Given a set of packages from a release, recalculates all the constraints on // a given project: combines the constraints from all the programs, the // packages file and the release packages. From 3faf1aa21e83ec78dd640c9a1c8f760ebe201cf1 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 18:19:00 -0700 Subject: [PATCH 070/283] make test more convincing --- .../packages/debug-only/debug-only.js | 3 +-- tools/tests/package-tests.js | 20 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/tests/apps/package-tests/packages/debug-only/debug-only.js b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js index 23162b0db5..3740f30ec1 100644 --- a/tools/tests/apps/package-tests/packages/debug-only/debug-only.js +++ b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js @@ -1,2 +1 @@ -// Write your package code here! -console.log("Testing a thing"); +global.DEBUG_ONLY_LOADED = true; diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 871023e27d..2c3af8602b 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -289,18 +289,18 @@ selftest.define("add packages to app", ["net"], function () { run = s.run("add", "debug-only"); run.match("debug-only"); run.expectExit(0); - run = s.run(); - run.waitSecs(15); - run.match("Testing a thing"); - run.match("Started"); - run.stop(); - run = s.run("--production"); + s.mkdir("server"); + s.write("server/debug.js", + "process.exit(global.DEBUG_ONLY_LOADED ? 234 : 235)"); + + run = s.run("--once"); run.waitSecs(15); - run.match("Started MongoDB.\n"); - run.waitSecs(5); - run.read("=> Starting your app"); - run.stop(); + run.expectExit(234); + + run = s.run("--once", "--production"); + run.waitSecs(15); + run.expectExit(235); }); // Add a package that adds files to specific client architectures. From b40faa363c1fcfed4f01470f3d90b62f5fb41eb9 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 7 Oct 2014 18:43:32 -0700 Subject: [PATCH 071/283] Fix the typo --- packages/meteor/startup_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/meteor/startup_client.js b/packages/meteor/startup_client.js index d52d52f205..6e50a27533 100644 --- a/packages/meteor/startup_client.js +++ b/packages/meteor/startup_client.js @@ -10,7 +10,7 @@ var ready = function() { // XXX hide the splash screen if such exists, only on mobile if (Meteor.isCordova) { - navigator.splashscree && navigator.splashscreen.hide(); + navigator.splashscreen && navigator.splashscreen.hide(); } loaded = true; From d87a1fe1118714515b3a869d9debd9a0b834bcba Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Tue, 7 Oct 2014 18:59:58 -0700 Subject: [PATCH 072/283] Edit some comments --- tools/selftest.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index b031d3c21f..f696819b0c 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1406,8 +1406,8 @@ var tagDescriptions = { checkout: 'can only run from checkouts', net: 'require an internet connection', slow: 'take quite a long time; use --slow to include', - // these last two are pseudo-tags, assigned to tests when you specify - // --changed or a regex pattern + // these are pseudo-tags, assigned to tests when you specify + // --changed, --file, or a pattern argument unchanged: 'unchanged since last pass', 'non-matching': "don't match specified pattern", 'in other files': "" @@ -1477,10 +1477,10 @@ var getFilteredTests = function (options) { // list of all tests, the filtered list, and stats on how many tests // were skipped (see generateSkipReport). // -// TestList is also used to save the hashes of files where all tests +// TestList also has code to save the hashes of files where all tests // ran and passed (for the `--changed` option). If a testState is -// passed, the caller can use notifyFailed and saveTestState to cause -// TestList to calculate the new testState and write it out. +// provided, the notifyFailed and saveTestState can be used to modify +// the testState appropriately and write it out. var TestList = function (allTests, tagsToSkip, testState) { tagsToSkip = (tagsToSkip || []); testState = (testState || null); // optional @@ -1523,8 +1523,9 @@ var TestList = function (allTests, tagsToSkip, testState) { }); }; -// Mark a test's file as having failures so we don't -// save its hash as a potentially "unchanged" file. +// Mark a test's file as having failures. This prevents +// saveTestState from saving its hash as a potentially +// "unchanged" file to be skipped in a future run. TestList.prototype.notifyFailed = function (test) { this.fileInfo[test.file].hasFailures = true; }; From 75ef0202bfe468dc74ae3502d38853c0ca29e4e3 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 7 Oct 2014 22:30:52 -0700 Subject: [PATCH 073/283] Bump meteor and meteor-tool version numbers --- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index fc2c11fddf..b0e32edbca 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.0' + version: '1.0.34-rc.1' }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 45886bffba..551067e958 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '1.1.2-rc.0' + version: '1.1.2-rc.1' }); Package._transitional_registerBuildPlugin({ diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index a0ee1fcbdf..9df8c67d65 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.0", + "version": "0.9.4-rc.1", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From af71abfef156ba954d0d2cef84a0ec172eb5d94c Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:04:08 -0700 Subject: [PATCH 074/283] Don't show errors if we can fix something during install-sdk --- tools/commands-cordova.js | 44 ++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index e7094e4aa4..a3b6b286af 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1620,11 +1620,13 @@ _.extend(IOS.prototype, { if (self.hasXcode()) { log && Console.info(Console.success("Xcode is installed")); } else { - log && Console.info(Console.fail("Xcode is not installed")); - if (fix) { + log && Console.info("Installing Xcode"); + self.installXcode(); } else { + log && Console.info(Console.fail("Xcode is not installed")); + result.missing.push("xcode"); result.acceptable = false; } @@ -1642,11 +1644,15 @@ _.extend(IOS.prototype, { if (self.hasAgreedXcodeLicense()) { log && Console.info(Console.success("Xcode license agreed")); } else { - log && Console.info(Console.fail("You must accept the Xcode license")); - if (fix) { + log && Console.info("Please accept the Xcode license"); + self.launchXcode(); + + // XXX: Wait? } else { + log && Console.info(Console.fail("You must accept the Xcode license")); + result.missing.push("xcode-license"); result.acceptable = false; } @@ -2124,12 +2130,14 @@ _.extend(Android.prototype, { log && Console.info(Console.success("Found Android bundle")); hasAndroid = true; } else { - log && Console.info(Console.fail("Android bundle not found")); - if (fixConsole) { + log && Console.info("Installing Android bundle"); + self.installAndroidBundle(); hasAndroid = true; } else { + log && Console.info(Console.fail("Android bundle not found")); + result.missing.push("android-bundle"); result.acceptable = false; } @@ -2140,12 +2148,14 @@ _.extend(Android.prototype, { log && Console.info(Console.success("A JDK is installed")); hasJava = true; } else { - log && Console.info(Console.fail("A JDK is not installed")); - if (fix) { + log && Console.info("Installing JDK"); + self.installJdk(); hasJava = true; } else { + log && Console.info(Console.fail("A JDK is not installed")); + result.missing.push("jdk"); result.acceptable = false; } @@ -2154,12 +2164,11 @@ _.extend(Android.prototype, { // (hasAcceleration can also be undefined) var hasAcceleration = self.hasAcceleration(); if (hasAcceleration === false) { - log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); - - if (fix) { self.installAcceleration(); } else { + log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); + result.missing.push("haxm"); // Not all systems can install the accelerator, so don't block @@ -2175,12 +2184,12 @@ _.extend(Android.prototype, { if (self.hasTarget('19', 'default/x86')) { log && Console.info(Console.success("Found suitable Android x86 image")); } else { - log && Console.info(Console.fail("Suitable Android x86 image not found")); - if (fixSilent) { - Console.info("Installing Android x86 image"); + log && Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); } else { + log && Console.info(Console.fail("Suitable Android x86 image not found")); + result.missing.push("android-sys-img"); result.acceptable = false; } @@ -2190,13 +2199,14 @@ _.extend(Android.prototype, { if (self.hasAvd(avdName)) { log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) found")); } else { - log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); - if (fixSilent) { + log && Console.info("Creating android virtual device (AVD): " + avdName); + var avdOptions = {}; self.createAvd(avdName, avdOptions); - Console.info(Console.success("Created android virtual device (AVD): " + avdName)); } else { + log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); + result.missing.push("android-avd"); result.acceptable = false; } From 25d941690c20b7f1165d429c2b9166f5d46d1bae Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:06:00 -0700 Subject: [PATCH 075/283] Provide affirmation after successful install-sdk fixes --- tools/commands-cordova.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index a3b6b286af..3511472ed2 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2187,6 +2187,7 @@ _.extend(Android.prototype, { if (fixSilent) { log && Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); + log && Console.info(Console.success("Installed Android x86 image")); } else { log && Console.info(Console.fail("Suitable Android x86 image not found")); @@ -2204,6 +2205,8 @@ _.extend(Android.prototype, { var avdOptions = {}; self.createAvd(avdName, avdOptions); + + log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) created")); } else { log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); From 570644b58902ed9a6e5b8477692ed6564da5764a Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:07:07 -0700 Subject: [PATCH 076/283] Newline around URL to stop it wrapping in install-sdk --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 3511472ed2..5503a5c0de 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2443,7 +2443,7 @@ main.registerCommand({ url += "#" + anchor; } openUrl(url); - Console.info("Please follow the instructions here: " + Console.bold(url)); + Console.info("Please follow the instructions here:\n " + Console.bold(url) + "\n"); } else { Console.info("We don't have installation instructions for your platform") } From bb77c6e2102bc09fc618bd5801ebd7605dc3c54b Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:11:03 -0700 Subject: [PATCH 077/283] Add some help to install-sdk --- tools/help.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/help.txt b/tools/help.txt index 3b29bfcd02..aaaad79eb2 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -196,6 +196,17 @@ After adding a mobile platform, you can use 'meteor run ' to run on a mobile device or emulator. 'meteor build' will always build the project for every added platform. +>>> install-sdk +Installs SDKs for a platform. +Usage: meteor install-sdk + +Installs the SDK for a platform; will also verify that the platform +requirements are met. + +Available platforms: + android + ios (on OS X only) + >>> remove-platform Remove a platform from this project. Usage: meteor remove-platform [platform..] From d4fd64da6a02c494f2f60b36257f4aafd3cb425c Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:13:09 -0700 Subject: [PATCH 078/283] Split up the super-long android emulator acceleration message --- tools/commands-cordova.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 5503a5c0de..dc0fe14185 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2167,7 +2167,8 @@ _.extend(Android.prototype, { if (fix) { self.installAcceleration(); } else { - log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); + log && Console.info(Console.fail("Android emulator acceleration is not installed")); + log && Console.info(" (The Android emulator will be very slow without acceleration)"); result.missing.push("haxm"); From 48e91ff9aa59850723fd620feeb64fecc4e27f88 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:39:10 -0700 Subject: [PATCH 079/283] Linux does not meet the iOS platform requirements --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index dc0fe14185..9aa07dc5e4 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1611,7 +1611,7 @@ _.extend(IOS.prototype, { if (!Host.isMac()) { log && Console.info("You are not running on OSX; we won't be able to install Xcode for local iOS development"); - return undefined; + return { acceptable: false, missing: [ "ios" ] }; } var result = { acceptable: true, missing: [] }; From c88fffbc6a03f15df850b6eb940b85c026b6e166 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:42:52 -0700 Subject: [PATCH 080/283] Special case the failure message for 'install-sdk ios' on Linux --- tools/commands-cordova.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 9aa07dc5e4..c4c87c5f61 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2428,6 +2428,11 @@ main.registerCommand({ var installed = checkPlatformRequirements(platform, { log:true, fix: false, fixConsole: true, fixSilent: true } ); if (!installed.acceptable) { + if (Host.isLinux() && platform === "ios") { + Console.warn(Console.fail("iOS support cannot be installed on Linux")); + return 1; + } + Console.warn("Platform requirements not yet met"); var host = null; From 19f845fccc9b0013ca561150d896709cda5553fa Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 10:02:35 -0700 Subject: [PATCH 081/283] Hacky parsing of installation progress --- tools/commands-cordova.js | 24 ++++++++++++++++++++++-- tools/processes.js | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index c4c87c5f61..4891ad184b 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1763,16 +1763,34 @@ _.extend(Android.prototype, { var self = this; var androidBundlePath = self.getAndroidBundlePath(); - var androidToolPath = path.join(androidBundlePath, 'android-sdk', 'tools', 'android'); options = options || {}; options.env = _.extend({}, process.env, options.env || {}, { 'ANDROID_SDK_HOME': androidBundlePath }); + + if (options.progress) { + options.onStdout = function (data) { + // Output looks like: (20%, ... + var re = /\((.{1,3})%,/; + var match = re.exec(data); + if (match) { + var status = {current: parseInt(match[1]), end: 100}; + options.progress.reportProgress(status); + } + }; + } + var cmd = new processes.RunCommand(androidToolPath, args, options); if (options.detached) { return cmd.start(); } + var execution = cmd.run(); + + if (options.progress) { + options.progress.reportDone(); + } + if (execution.exitCode !== 0) { Console.warn("Unexpected exit code from android process: " + execution.exitCode); Console.warn("stdout: " + execution.stdout); @@ -1832,7 +1850,9 @@ _.extend(Android.prototype, { var self = this; buildmessage.enterJob({ title: 'Installing Android API library'}, function () { - var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], {stdin: 'y\n'}); + var options = {stdin: 'y\n'}; + options.progress = buildmessage.getCurrentProgressTracker(); + var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], options); }); }, diff --git a/tools/processes.js b/tools/processes.js index ff9955f83c..39aaba4a21 100644 --- a/tools/processes.js +++ b/tools/processes.js @@ -59,6 +59,9 @@ _.extend(RunCommand.prototype, { if (self.options.pipeOutput) { Console.stdout.write(data); } + if (self.options.onStdout) { + self.options.onStdout(data); + } }); self.process.stderr.on('data', function (data) { From f12fddb95d2f0e0a91a3d30e84cb343f582500ba Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 10:10:53 -0700 Subject: [PATCH 082/283] reportDone -> reportProgressDone progress.reportProgressDone()? Interesting choice of function name, Justin... --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 4891ad184b..8fc8db6f22 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1788,7 +1788,7 @@ _.extend(Android.prototype, { var execution = cmd.run(); if (options.progress) { - options.progress.reportDone(); + options.progress.reportProgressDone(); } if (execution.exitCode !== 0) { From 32e192883e12a330becd97addbc45e5392cb8c8b Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 7 Oct 2014 19:25:57 -0700 Subject: [PATCH 083/283] Fixes to 'add cordova plugins' selftest. * Remove --settings option that is no longer supported. * Add --server option that is now required. Test still doesn't pass. --- tools/tests/cordova-plugins.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index f0a1654102..50eaa1a248 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -30,7 +30,7 @@ var localCordova = path.join(files.getCurrentToolsDir(), "tools", // // sand: a sandbox, that has the main app directory as its cwd. // plugins: an array of plugins in order. -var checkCordovaPlugins = function(sand, plugins) { +var checkCordovaPlugins = selftest.markStack(function(sand, plugins) { var lines = selftest.execFileSync(localCordova, ['plugins'], { cwd: path.join(sand.cwd, '.meteor', 'local', 'cordova-build'), @@ -53,7 +53,7 @@ var checkCordovaPlugins = function(sand, plugins) { i++; }); selftest.expectEqual(plugins.length, i); -}; +}); // Given a sandbox, that has the app as its cwd, read the cordova plugins // file and check that it contains exactly the plugins specified, in order. @@ -147,7 +147,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("run", "android"); run.matchErr("not added to the project"); - run.matchErr("meteor add-platform "); + run.match("meteor add-platform "); run = s.run("add-platform", "android"); run.match("Do you agree"); @@ -185,7 +185,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("list-platforms"); run.match("android"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(30); // This fails because the FB plugin does not compile without additional // configuration for android. @@ -199,7 +199,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("remove", "contains-cordova-plugin"); run.match("removed"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -209,7 +209,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("removed"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -219,7 +219,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("added"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); checkCordovaPlugins(s, ["org.apache.cordova.device"]); From 842e3a290a7d867d699abf3c595672e68eec34e1 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 10:59:41 -0700 Subject: [PATCH 084/283] Update 'add cordova plugins' test to reflect reality. If we fail to install one plugin, then we uninstall all plugins to avoid awakening the Cordova monsters. Previously, this test was passing because we were passing a `--settings` argument, which was allowing the facebookconnect plugin to install, but the build to fail to other, not-understood reasons. Now that we've removed `--settings`, the plugin fails to install, which means that all plugins get uninstalled. Test passes now. --- tools/tests/cordova-plugins.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index 50eaa1a248..c28ed989aa 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -191,9 +191,10 @@ selftest.define("add cordova plugins", ["slow"], function () { // configuration for android. run.expectExit(8); - checkCordovaPlugins(s, - ["org.apache.cordova.camera", - "com.phonegap.plugins.facebookconnect"]); + // When one plugin installation fails, we uninstall all the plugins + // (legend has it that Cordova can get in a weird inconsistent state + // if we don't do this). + checkCordovaPlugins(s, []); // Remove a plugin run = s.run("remove", "contains-cordova-plugin"); From 0bd892a2617908b329375807f9db0aeda0b1c469 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:07:32 -0700 Subject: [PATCH 085/283] Remove copied-and-pasted comment on 'add cordova platforms' --- tools/tests/cordova-platforms.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 389e31a347..e31f49e926 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -2,8 +2,6 @@ var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../files.js'); -// Add plugins to an app. Change the contents of the plugins and their -// dependencies, make sure that the app still refreshes. selftest.define("add cordova platforms", function () { var s = new Sandbox(); var run; From 149389d9323009b551d4c940346438a041ece0a5 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:09:02 -0700 Subject: [PATCH 086/283] Update 'add cordova platforms' to match latest command output --- tools/tests/cordova-platforms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index e31f49e926..60c146ffa7 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -12,8 +12,8 @@ selftest.define("add cordova platforms", function () { s.set("METEOR_TEST_TMP", files.mkdtemp()); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); run = s.run("add-platform", "android"); @@ -28,7 +28,7 @@ selftest.define("add cordova platforms", function () { run = s.run("remove-platform", "android"); run.match("removed"); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); }); From 6d1730562971ba6888724b862a5b9b23fb530aeb Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:19:17 -0700 Subject: [PATCH 087/283] Update path in cordova builds selftest --- tools/tests/cordova-builds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 2d9210e027..7a3b3612ca 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -7,7 +7,7 @@ var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var checkMobileServer = selftest.markStack(function (s, expected) { - var output = s.read("android/assets/www/application/index.html"); + var output = s.read("android/project/assets/www/application/index.html"); if (! output.match(new RegExp( '"DDP_DEFAULT_CONNECTION_URL":"' + expected + '"'))) { selftest.fail( From 8b86948d41c1a9a8bd19f9c3c13f1fa425585565 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:50:21 -0700 Subject: [PATCH 088/283] Fix argument parsing test; default port is now a string --- tools/tests/command-line.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 8109e1dbe0..690aeccd7e 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -56,52 +56,52 @@ selftest.define("argument parsing", function () { // successful command invocation, correct parsing of arguments run = s.run("dummy", "--email", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "", ""); - run.read('"x" 3000 none ["",""]\n'); + run.read('"x" "3000" none ["",""]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "-"); - run.read('"x" 3000 none ["-"]\n'); + run.read('"x" "3000" none ["-"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-exxx"); - run.read('"xxx" 3000 none []\n'); + run.read('"xxx" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "-"); - run.read('"-" 3000 none []\n'); + run.read('"-" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -121,7 +121,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "--port", "1234", "--changed"); - run.read('"--port" 3000 true ["1234"]\n'); + run.read('"--port" "3000" true ["1234"]\n'); run.expectEnd(); run.expectExit(0); @@ -237,17 +237,17 @@ selftest.define("argument parsing", function () { // '--' to end parsing run = s.run("dummy", "--email", "x", "--", "-p", "4000"); - run.read('"x" 3000 none ["-p","4000"]\n'); + run.read('"x" "3000" none ["-p","4000"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--", "--changed", "--changed"); - run.read('"x" 3000 none ["--changed","--changed"]\n'); + run.read('"x" "3000" none ["--changed","--changed"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -258,7 +258,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "x", "-UD", "--changed"); - run.read('"x" 3000 true []\nurl\n\delete\n'); + run.read('"x" "3000" true []\nurl\n\delete\n'); run.expectEnd(); run.expectExit(0); From e4244003cf722f4e2182c492c87106fcb245c4e5 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:26:24 -0700 Subject: [PATCH 089/283] Use single quotes in 'packages with organizations' selftest --- tools/tests/package-tests.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 2c3af8602b..74a2a87bbc 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -361,7 +361,7 @@ var publishMostBasicPackage = function (s, fullPackageName) { s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(15); + run.waitSecs(60); run.expectExit(0); run.match("Done"); }); @@ -711,14 +711,18 @@ selftest.define("talk to package server with expired or no accounts token", var changeVersionAndPublish = function (s, expectAuthorizationFailure) { var packageJs = s.read("package.js"); // XXX Hack - var version = packageJs.match(/version: \"(\d\.\d\.\d)\"/)[1]; + var versionMatch = packageJs.match(/version: \'(\d\.\d\.\d)\'/); + if (! versionMatch) { + selftest.fail("package.js does not match version field: " + packageJs); + } + var version = versionMatch[1]; var versionParts = version.split("."); versionParts[0] = parseInt(versionParts[0]) + 1; packageJs = packageJs.replace(version, versionParts.join(".")); s.write("package.js", packageJs); var run = s.run("publish"); - run.waitSecs(30); + run.waitSecs(60); if (expectAuthorizationFailure) { run.matchErr("not an authorized maintainer"); // XXX Why is this 3? Other unauthorized errors (e.g. maintainers From 2b280474cbcffa2fc0fc227aef29694d0c36ae04 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 090/283] Make icons/splashscreens options consistent with underscores --- examples/todos/mobile-config.js | 4 ++-- tools/commands-cordova.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js index b5f3952f19..ae73b56247 100644 --- a/examples/todos/mobile-config.js +++ b/examples/todos/mobile-config.js @@ -9,9 +9,9 @@ App.info({ App.icons({ // iOS 'iphone': 'resources/icons/icon-60.png', - 'iphone-2x': 'resources/icons/icon-60@2x.png', + 'iphone_2x': 'resources/icons/icon-60@2x.png', 'ipad': 'resources/icons/icon-72.png', - 'ipad-2x': 'resources/icons/icon-72@2x.png', + 'ipad_2x': 'resources/icons/icon-72@2x.png', // Android - XXX these are the same as iOS for now 'android_ldpi': 'resources/icons/icon-60.png', diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 8fc8db6f22..76583e90e2 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1160,10 +1160,10 @@ var requirePlatformReady = function (platform) { // Hard-coded constants var iconIosSizes = { 'iphone': '60x60', - 'iphone-2x': '120x120', - 'iphone-3x': '180x180', + 'iphone_2x': '120x120', + 'iphone_3x': '180x180', 'ipad': '76x76', - 'ipad-2x': '152x152' + 'ipad_2x': '152x152' }; var iconAndroidSizes = { @@ -1288,10 +1288,10 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { * * Valid key values: * - `iphone` - * - `iphone-2x` - * - `iphone-3x` + * - `iphone_2x` + * - `iphone_3x` * - `ipad` - * - `ipad-2x` + * - `ipad_2x` * - `android_ldpi` * - `android_mdpi` * - `android_hdpi` From 74c8f252f574a55f04294723befabf2a92da707d Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Wed, 8 Oct 2014 13:49:24 -0700 Subject: [PATCH 091/283] Add locus to accounts callbacks --- docs/client/data.js | 2 +- packages/accounts-base/url_client.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/client/data.js b/docs/client/data.js index f1a4b28f20..5af6749ee1 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/packages/accounts-base/url_client.js b/packages/accounts-base/url_client.js index 342acf8c02..202784f15a 100644 --- a/packages/accounts-base/url_client.js +++ b/packages/accounts-base/url_client.js @@ -80,6 +80,7 @@ AccountsTest = { * 2. `done`: A function to call when the password reset UI flow is complete. The normal * login process is suspended until this function is called, so that the * password for user A can be reset even if user B was logged in. + * @locus Client */ Accounts.onResetPasswordLink = function (callback) { if (accountsCallbacks["reset-password"]) { @@ -104,6 +105,7 @@ Accounts.onResetPasswordLink = function (callback) { * The normal login process is suspended until this function is called, so * that the user can be notified that they are verifying their email before * being logged in. + * @locus Client */ Accounts.onEmailVerificationLink = function (callback) { if (accountsCallbacks["verify-email"]) { @@ -128,6 +130,7 @@ Accounts.onEmailVerificationLink = function (callback) { * 2. `done`: A function to call when the enrollment UI flow is complete. * The normal login process is suspended until this function is called, so that * user A can be enrolled even if user B was logged in. + * @locus Client */ Accounts.onEnrollmentLink = function (callback) { if (accountsCallbacks["enroll-account"]) { From a10b52549406a1388a7ad2a6673dfeaf6eeff04e Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:38:21 -0700 Subject: [PATCH 092/283] Clone __meteor_runtime_config__ before extending it --- packages/webapp/webapp_server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 7f44489abf..b4c7d9053a 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -318,7 +318,8 @@ var getBoilerplate = function (request, arch) { var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { additionalOptions = additionalOptions || {}; - var runtimeConfig = _.extend(__meteor_runtime_config__, + var runtimeConfig = _.extend( + _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} ); From d612b4e14c85edbd1a9aa9d0772197d8291defd2 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:10 -0700 Subject: [PATCH 093/283] Stop 'meteor run' process in cordova hcp selftest --- tools/tests/cordova-hcp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/cordova-hcp.js b/tools/tests/cordova-hcp.js index 0a71927b9a..ae18a39092 100644 --- a/tools/tests/cordova-hcp.js +++ b/tools/tests/cordova-hcp.js @@ -39,4 +39,6 @@ selftest.define( if (! result.match(rootUrlRegExp)) { selftest.fail("Incorrect ROOT_URL"); } + + run.stop(); }); From aaa9bfb04860c3c97e48f4cf5ae78f8dd55f65b3 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:30 -0700 Subject: [PATCH 094/283] Add regression test for edbf05db --- tools/tests/run.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tools/tests/run.js b/tools/tests/run.js index a37370c761..59c7775501 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -5,6 +5,7 @@ var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); var files = require('../files.js'); +var httpHelpers = require('../http-helpers.js'); var MONGO_LISTENING = { stdout: " [initandlisten] waiting for connections on port" }; @@ -408,3 +409,51 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); + +// Regression test: previously, if ROOT_URL was set, then the process of +// generating the cordova boilerplate would change +// __meteor_runtime_config__, resulting in an incorrect browser +// boilerplate being generated the next time boilerplate generation +// occurs. +selftest.define("generating boilerplate does not change runtime config", function () { + var s = new Sandbox(); + var run; + + s.createApp("myapp", "standard-app"); + s.cd("myapp"); + + // Add 'android' to the .meteor/platforms file, just so that the + // Cordova boilerplate will be generated and served, without having + // to download the whole Android sdk. + var platforms = s.read(".meteor/platforms"); + s.write(".meteor/platforms", platforms + "\nandroid\n"); + + s.set("ROOT_URL", "http://127.0.0.1:3000"); + run = s.run(); + run.waitSecs(30); + run.match("Started your app"); + + var body = httpHelpers.getUrl("http://localhost:3000"); + var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL"); + } + + s.mkdir("client"); + s.cd("client"); + s.write("foo.js", "console.log(1);\n"); + + run.waitSecs(30); + // We don't expect the server to restart; we're testing that + // __meteor_runtime_config__ does not get modified over the life of + // a single server process. + run.forbidAll("restarted"); + run.match("Client modified"); + + body = httpHelpers.getUrl("http://localhost:3000"); + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL after modifying client"); + } + + run.stop(); +}); From 3f9f3e9c06d622c03bf45004d80850c62e830bc7 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:38:21 -0700 Subject: [PATCH 095/283] Clone __meteor_runtime_config__ before extending it --- packages/webapp/webapp_server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 7f44489abf..b4c7d9053a 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -318,7 +318,8 @@ var getBoilerplate = function (request, arch) { var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { additionalOptions = additionalOptions || {}; - var runtimeConfig = _.extend(__meteor_runtime_config__, + var runtimeConfig = _.extend( + _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} ); From f1592ed5a2d8479a07a4be716bf4574f2cd96e9e Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:10 -0700 Subject: [PATCH 096/283] Stop 'meteor run' process in cordova hcp selftest --- tools/tests/cordova-hcp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/cordova-hcp.js b/tools/tests/cordova-hcp.js index 0a71927b9a..ae18a39092 100644 --- a/tools/tests/cordova-hcp.js +++ b/tools/tests/cordova-hcp.js @@ -39,4 +39,6 @@ selftest.define( if (! result.match(rootUrlRegExp)) { selftest.fail("Incorrect ROOT_URL"); } + + run.stop(); }); From 43106972b010bd5d5db85a928b53718afb870396 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:30 -0700 Subject: [PATCH 097/283] Add regression test for runtime config bug --- tools/tests/run.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tools/tests/run.js b/tools/tests/run.js index a37370c761..59c7775501 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -5,6 +5,7 @@ var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); var files = require('../files.js'); +var httpHelpers = require('../http-helpers.js'); var MONGO_LISTENING = { stdout: " [initandlisten] waiting for connections on port" }; @@ -408,3 +409,51 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); + +// Regression test: previously, if ROOT_URL was set, then the process of +// generating the cordova boilerplate would change +// __meteor_runtime_config__, resulting in an incorrect browser +// boilerplate being generated the next time boilerplate generation +// occurs. +selftest.define("generating boilerplate does not change runtime config", function () { + var s = new Sandbox(); + var run; + + s.createApp("myapp", "standard-app"); + s.cd("myapp"); + + // Add 'android' to the .meteor/platforms file, just so that the + // Cordova boilerplate will be generated and served, without having + // to download the whole Android sdk. + var platforms = s.read(".meteor/platforms"); + s.write(".meteor/platforms", platforms + "\nandroid\n"); + + s.set("ROOT_URL", "http://127.0.0.1:3000"); + run = s.run(); + run.waitSecs(30); + run.match("Started your app"); + + var body = httpHelpers.getUrl("http://localhost:3000"); + var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL"); + } + + s.mkdir("client"); + s.cd("client"); + s.write("foo.js", "console.log(1);\n"); + + run.waitSecs(30); + // We don't expect the server to restart; we're testing that + // __meteor_runtime_config__ does not get modified over the life of + // a single server process. + run.forbidAll("restarted"); + run.match("Client modified"); + + body = httpHelpers.getUrl("http://localhost:3000"); + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL after modifying client"); + } + + run.stop(); +}); From 89ea5afa83f363ca0fe492ea2b141f4cf18a7e66 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 098/283] Make icons/splashscreens options consistent with underscores --- docs/client/api.html | 2 +- docs/client/data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index d0e893f0ed..f6a9270538 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -3638,7 +3638,7 @@ App.info({ // Set up resources such as icons and launch screens. App.icons({ 'iphone': 'icons/icon-60.png', - 'iphone-2x': 'icons/icon-60@2x.png', + 'iphone_2x': 'icons/icon-60@2x.png', // ... more screen sizes and platforms ... }); diff --git a/docs/client/data.js b/docs/client/data.js index f1a4b28f20..17358be291 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file From a4570b92df0d0f2e4b259df92de36adafef8df30 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 14:26:38 -0700 Subject: [PATCH 099/283] Replace runtime config regression selftest with simpler unit test --- packages/webapp/webapp_server.js | 10 +++++-- packages/webapp/webapp_tests.js | 22 +++++++++++++++ tools/tests/run.js | 48 -------------------------------- 3 files changed, 29 insertions(+), 51 deletions(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index b4c7d9053a..694f07002f 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -316,8 +316,11 @@ var getBoilerplate = function (request, arch) { return memoizedBoilerplate[memHash]; }; -var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { +WebAppInternals.generateBoilerplateInstance = function (arch, + manifest, + additionalOptions) { additionalOptions = additionalOptions || {}; + var runtimeConfig = _.extend( _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} @@ -575,8 +578,9 @@ var runWebAppServer = function () { syncQueue.runTask(function() { _.each(WebApp.clientPrograms, function (program, archName) { boilerplateByArch[archName] = - generateBoilerplateInstance(archName, program.manifest, - defaultOptionsForArch[archName]); + WebAppInternals.generateBoilerplateInstance( + archName, program.manifest, + defaultOptionsForArch[archName]); }); // Clear the memoized boilerplate cache. diff --git a/packages/webapp/webapp_tests.js b/packages/webapp/webapp_tests.js index 358dcd563e..97df3a3dfc 100644 --- a/packages/webapp/webapp_tests.js +++ b/packages/webapp/webapp_tests.js @@ -144,3 +144,25 @@ Tinytest.add("webapp - valid pid check", function (test) { test.isFalse(WebAppInternals.validPid("foobar")); test.isFalse(WebAppInternals.validPid("123foo")); }); + +// Regression test: `generateBoilerplateInstance` should not change +// `__meteor_runtime_config__`. +Tinytest.add("webapp - generating boilerplate should not change runtime config", function (test) { + // Set a dummy key in the runtime config served in the + // boilerplate. Test that the dummy key appears in the boilerplate, + // but not in __meteor_runtime_config__ after generating the + // boilerplate. + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); + + var boilerplate = WebAppInternals.generateBoilerplateInstance( + "web.browser", + {}, // empty manifest + { runtimeConfigOverrides: { WEBAPP_TEST_KEY: true } } + ); + + var boilerplateHtml = boilerplate.toHTML(); + test.isFalse(boilerplateHtml.indexOf("WEBAPP_TEST_KEY") === -1); + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); +}); diff --git a/tools/tests/run.js b/tools/tests/run.js index 59c7775501..5532ff2278 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -409,51 +409,3 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); - -// Regression test: previously, if ROOT_URL was set, then the process of -// generating the cordova boilerplate would change -// __meteor_runtime_config__, resulting in an incorrect browser -// boilerplate being generated the next time boilerplate generation -// occurs. -selftest.define("generating boilerplate does not change runtime config", function () { - var s = new Sandbox(); - var run; - - s.createApp("myapp", "standard-app"); - s.cd("myapp"); - - // Add 'android' to the .meteor/platforms file, just so that the - // Cordova boilerplate will be generated and served, without having - // to download the whole Android sdk. - var platforms = s.read(".meteor/platforms"); - s.write(".meteor/platforms", platforms + "\nandroid\n"); - - s.set("ROOT_URL", "http://127.0.0.1:3000"); - run = s.run(); - run.waitSecs(30); - run.match("Started your app"); - - var body = httpHelpers.getUrl("http://localhost:3000"); - var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL"); - } - - s.mkdir("client"); - s.cd("client"); - s.write("foo.js", "console.log(1);\n"); - - run.waitSecs(30); - // We don't expect the server to restart; we're testing that - // __meteor_runtime_config__ does not get modified over the life of - // a single server process. - run.forbidAll("restarted"); - run.match("Client modified"); - - body = httpHelpers.getUrl("http://localhost:3000"); - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL after modifying client"); - } - - run.stop(); -}); From bb29469856abe621275fe7bb520470a5ceb5edda Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 14:26:38 -0700 Subject: [PATCH 100/283] Replace runtime config regression selftest with simpler unit test --- packages/webapp/webapp_server.js | 10 +++++-- packages/webapp/webapp_tests.js | 22 +++++++++++++++ tools/tests/run.js | 48 -------------------------------- 3 files changed, 29 insertions(+), 51 deletions(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index b4c7d9053a..694f07002f 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -316,8 +316,11 @@ var getBoilerplate = function (request, arch) { return memoizedBoilerplate[memHash]; }; -var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { +WebAppInternals.generateBoilerplateInstance = function (arch, + manifest, + additionalOptions) { additionalOptions = additionalOptions || {}; + var runtimeConfig = _.extend( _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} @@ -575,8 +578,9 @@ var runWebAppServer = function () { syncQueue.runTask(function() { _.each(WebApp.clientPrograms, function (program, archName) { boilerplateByArch[archName] = - generateBoilerplateInstance(archName, program.manifest, - defaultOptionsForArch[archName]); + WebAppInternals.generateBoilerplateInstance( + archName, program.manifest, + defaultOptionsForArch[archName]); }); // Clear the memoized boilerplate cache. diff --git a/packages/webapp/webapp_tests.js b/packages/webapp/webapp_tests.js index 358dcd563e..97df3a3dfc 100644 --- a/packages/webapp/webapp_tests.js +++ b/packages/webapp/webapp_tests.js @@ -144,3 +144,25 @@ Tinytest.add("webapp - valid pid check", function (test) { test.isFalse(WebAppInternals.validPid("foobar")); test.isFalse(WebAppInternals.validPid("123foo")); }); + +// Regression test: `generateBoilerplateInstance` should not change +// `__meteor_runtime_config__`. +Tinytest.add("webapp - generating boilerplate should not change runtime config", function (test) { + // Set a dummy key in the runtime config served in the + // boilerplate. Test that the dummy key appears in the boilerplate, + // but not in __meteor_runtime_config__ after generating the + // boilerplate. + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); + + var boilerplate = WebAppInternals.generateBoilerplateInstance( + "web.browser", + {}, // empty manifest + { runtimeConfigOverrides: { WEBAPP_TEST_KEY: true } } + ); + + var boilerplateHtml = boilerplate.toHTML(); + test.isFalse(boilerplateHtml.indexOf("WEBAPP_TEST_KEY") === -1); + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); +}); diff --git a/tools/tests/run.js b/tools/tests/run.js index 59c7775501..5532ff2278 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -409,51 +409,3 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); - -// Regression test: previously, if ROOT_URL was set, then the process of -// generating the cordova boilerplate would change -// __meteor_runtime_config__, resulting in an incorrect browser -// boilerplate being generated the next time boilerplate generation -// occurs. -selftest.define("generating boilerplate does not change runtime config", function () { - var s = new Sandbox(); - var run; - - s.createApp("myapp", "standard-app"); - s.cd("myapp"); - - // Add 'android' to the .meteor/platforms file, just so that the - // Cordova boilerplate will be generated and served, without having - // to download the whole Android sdk. - var platforms = s.read(".meteor/platforms"); - s.write(".meteor/platforms", platforms + "\nandroid\n"); - - s.set("ROOT_URL", "http://127.0.0.1:3000"); - run = s.run(); - run.waitSecs(30); - run.match("Started your app"); - - var body = httpHelpers.getUrl("http://localhost:3000"); - var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL"); - } - - s.mkdir("client"); - s.cd("client"); - s.write("foo.js", "console.log(1);\n"); - - run.waitSecs(30); - // We don't expect the server to restart; we're testing that - // __meteor_runtime_config__ does not get modified over the life of - // a single server process. - run.forbidAll("restarted"); - run.match("Client modified"); - - body = httpHelpers.getUrl("http://localhost:3000"); - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL after modifying client"); - } - - run.stop(); -}); From 299fde2be9a60644a0455d12fb401aee367df9de Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 14:38:34 -0700 Subject: [PATCH 101/283] Check the new argument of clientVersions publications --- packages/autoupdate/autoupdate_server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index bdbbae2233..8a62571534 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -137,6 +137,8 @@ var updateVersions = function (shouldReloadClientProgram) { Meteor.publish( "meteor_autoupdate_clientVersions", function (appId) { + check(appId, Match.Optional(String)); + // Don't notify clients using wrong appId such as mobile apps built with a // different server but pointing at the same local url if (Autoupdate.appId && appId && Autoupdate.appId !== appId) From a200043285e40be61ed3a1defa2dab0ee1dcfa0e Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 30 Sep 2014 12:42:17 -0700 Subject: [PATCH 102/283] Log if phantomjs exits with error (e.g. missing libs) --- tools/selftest.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/selftest.js b/tools/selftest.js index 3b87098a5d..129544a44f 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -837,7 +837,12 @@ _.extend(PhantomClient.prototype, { '/bin/bash', ['-c', ("exec " + phantomPath + " --load-images=no /dev/stdin <<'END'\n" + - phantomScript + "\nEND\n")]); + phantomScript + "\nEND\n")], + {}, function (exitCode, stdout, stderr) { + if (exitCode != 0) { + console.log("PhantomJS exited with exitCode ", exitCode, "\nstdout:\n", stdout, "\nstderr:\n", stderr); + } + }); }, stop: function() { From eb24eb59d4ad7cab55356ca7a0fd6f0584d905de Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 103/283] Make icons/splashscreens options consistent with underscores --- examples/todos/mobile-config.js | 4 ++-- tools/commands-cordova.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js index b5f3952f19..ae73b56247 100644 --- a/examples/todos/mobile-config.js +++ b/examples/todos/mobile-config.js @@ -9,9 +9,9 @@ App.info({ App.icons({ // iOS 'iphone': 'resources/icons/icon-60.png', - 'iphone-2x': 'resources/icons/icon-60@2x.png', + 'iphone_2x': 'resources/icons/icon-60@2x.png', 'ipad': 'resources/icons/icon-72.png', - 'ipad-2x': 'resources/icons/icon-72@2x.png', + 'ipad_2x': 'resources/icons/icon-72@2x.png', // Android - XXX these are the same as iOS for now 'android_ldpi': 'resources/icons/icon-60.png', diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index e7094e4aa4..80fe86ce1d 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1160,10 +1160,10 @@ var requirePlatformReady = function (platform) { // Hard-coded constants var iconIosSizes = { 'iphone': '60x60', - 'iphone-2x': '120x120', - 'iphone-3x': '180x180', + 'iphone_2x': '120x120', + 'iphone_3x': '180x180', 'ipad': '76x76', - 'ipad-2x': '152x152' + 'ipad_2x': '152x152' }; var iconAndroidSizes = { @@ -1288,10 +1288,10 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { * * Valid key values: * - `iphone` - * - `iphone-2x` - * - `iphone-3x` + * - `iphone_2x` + * - `iphone_3x` * - `ipad` - * - `ipad-2x` + * - `ipad_2x` * - `android_ldpi` * - `android_mdpi` * - `android_hdpi` From 588bf284094e52da5b0d6e8d3c5a94ab45ecf82e Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 104/283] Make icons/splashscreens options consistent with underscores --- docs/client/api.html | 2 +- docs/client/data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index d0e893f0ed..f6a9270538 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -3638,7 +3638,7 @@ App.info({ // Set up resources such as icons and launch screens. App.icons({ 'iphone': 'icons/icon-60.png', - 'iphone-2x': 'icons/icon-60@2x.png', + 'iphone_2x': 'icons/icon-60@2x.png', // ... more screen sizes and platforms ... }); diff --git a/docs/client/data.js b/docs/client/data.js index 5af6749ee1..f3356cd199 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file From 438a87802ee11b6bd2e7ca0f6ebd14c07e758c51 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 14:38:34 -0700 Subject: [PATCH 105/283] Check the new argument of clientVersions publications --- packages/autoupdate/autoupdate_server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index bdbbae2233..8a62571534 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -137,6 +137,8 @@ var updateVersions = function (shouldReloadClientProgram) { Meteor.publish( "meteor_autoupdate_clientVersions", function (appId) { + check(appId, Match.Optional(String)); + // Don't notify clients using wrong appId such as mobile apps built with a // different server but pointing at the same local url if (Autoupdate.appId && appId && Autoupdate.appId !== appId) From d25bfb7cd8541d092022c2f1c50b76a886f2e98f Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 30 Sep 2014 12:42:17 -0700 Subject: [PATCH 106/283] Log if phantomjs exits with error (e.g. missing libs) --- tools/selftest.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/selftest.js b/tools/selftest.js index 3b87098a5d..129544a44f 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -837,7 +837,12 @@ _.extend(PhantomClient.prototype, { '/bin/bash', ['-c', ("exec " + phantomPath + " --load-images=no /dev/stdin <<'END'\n" + - phantomScript + "\nEND\n")]); + phantomScript + "\nEND\n")], + {}, function (exitCode, stdout, stderr) { + if (exitCode != 0) { + console.log("PhantomJS exited with exitCode ", exitCode, "\nstdout:\n", stdout, "\nstderr:\n", stderr); + } + }); }, stop: function() { From 9dcc5e8780f8a556e007800afe12079e51cb9ed6 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Wed, 8 Oct 2014 15:05:57 -0700 Subject: [PATCH 107/283] Show list of failed tests --- tools/selftest.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index f696819b0c..8fb0ecfaf3 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -1632,11 +1632,11 @@ var runTests = function (options) { } var totalRun = 0; - var failureCount = 0; + var failedTests = []; _.each(testList.filteredTests, function (test) { totalRun++; - Console.stderr.write(test.name + "... "); + Console.stderr.write(test.file + ": " + test.name + " ... "); var failure = null; try { @@ -1656,7 +1656,7 @@ var runTests = function (options) { if (failure) { Console.stderr.write("fail!\n"); - failureCount++; + failedTests.push(test); testList.notifyFailed(test); var frames = parseStack.parse(failure); @@ -1719,15 +1719,19 @@ var runTests = function (options) { if (testList.filteredTests.length === 0) { Console.stderr.write("No tests run.\n"); return 0; - } else if (failureCount === 0) { + } else if (failedTests.length === 0) { var disclaimers = ''; if (testList.filteredTests.length < testList.allTests.length) disclaimers += " other"; Console.stderr.write("All" + disclaimers + " tests passed.\n"); return 0; } else { + var failureCount = failedTests.length; Console.stderr.write(failureCount + " failure" + - (failureCount > 1 ? "s" : "") + ".\n"); + (failureCount > 1 ? "s" : "") + ":\n"); + _.each(failedTests, function (test) { + Console.stderr.write(" - " + test.file + ": " + test.name); + }); return 1; } }; From 45a18297d1d41b34b2f66a3315d67b72ec92fd1f Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Wed, 8 Oct 2014 15:17:03 -0700 Subject: [PATCH 108/283] Change docs to recommend using strings for Meteor.Error --- docs/client/api.html | 2 +- docs/client/data.js | 2 +- packages/meteor/errors.js | 31 ++++++++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index d0e893f0ed..fc9c9b834d 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -284,7 +284,7 @@ Example: check(arg2, [Number]); // .. do stuff .. if (you want to throw an error) - throw new Meteor.Error(404, "Can't find my pants"); + throw new Meteor.Error("pants-not-found", "Can't find my pants"); return "some return value"; }, diff --git a/docs/client/data.js b/docs/client/data.js index 5af6749ee1..04a20a1b38 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/packages/meteor/errors.js b/packages/meteor/errors.js index c2ce47bb31..9ef661d06e 100644 --- a/packages/meteor/errors.js +++ b/packages/meteor/errors.js @@ -46,9 +46,34 @@ Meteor.makeErrorType = function (name, constructor) { * @summary This class represents a symbolic error thrown by a method. * @locus Anywhere * @class - * @param {Number} error A numeric error code, likely similar to an HTTP code (eg, 404, 500). - * @param {String} [reason] Optional. A short human-readable summary of the error, like 'Not Found'. - * @param {String} [details] Optional. Additional information about the error, like a textual stack trace. + * @param {String} error A string code uniquely identifying this kind of error. + * This string should be used by callers of the method to determine the + * appropriate action to take, instead of attempting to parse the reason + * or details fields. For example: + * + * ``` + * // on the server, pick a code unique to this error + * // the reason field should be a useful debug message + * throw new Meteor.Error("logged-out", + * "The user must be logged in to post a comment."); + * + * // on the client + * Meteor.call("methodName", function (error) { + * // identify the error + * if (error.error === "logged-out") { + * // show a nice error message + * Session.set("errorMessage", "Please log in to post a comment."); + * } + * }); + * ``` + * + * For legacy reasons, some built-in Meteor functions such as `check` throw + * errors with a number in this field. + * + * @param {String} [reason] Optional. A short human-readable summary of the + * error, like 'Not Found'. + * @param {String} [details] Optional. Additional information about the error, + * like a textual stack trace. */ Meteor.Error = Meteor.makeErrorType( "Meteor.Error", From 1e3e65fbf53b6ff265a56907d328e9cbc29fb102 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:26:24 -0700 Subject: [PATCH 109/283] Use single quotes in 'packages with organizations' selftest --- tools/tests/package-tests.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 2c3af8602b..74a2a87bbc 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -361,7 +361,7 @@ var publishMostBasicPackage = function (s, fullPackageName) { s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(15); + run.waitSecs(60); run.expectExit(0); run.match("Done"); }); @@ -711,14 +711,18 @@ selftest.define("talk to package server with expired or no accounts token", var changeVersionAndPublish = function (s, expectAuthorizationFailure) { var packageJs = s.read("package.js"); // XXX Hack - var version = packageJs.match(/version: \"(\d\.\d\.\d)\"/)[1]; + var versionMatch = packageJs.match(/version: \'(\d\.\d\.\d)\'/); + if (! versionMatch) { + selftest.fail("package.js does not match version field: " + packageJs); + } + var version = versionMatch[1]; var versionParts = version.split("."); versionParts[0] = parseInt(versionParts[0]) + 1; packageJs = packageJs.replace(version, versionParts.join(".")); s.write("package.js", packageJs); var run = s.run("publish"); - run.waitSecs(30); + run.waitSecs(60); if (expectAuthorizationFailure) { run.matchErr("not an authorized maintainer"); // XXX Why is this 3? Other unauthorized errors (e.g. maintainers From 2d73bc082f0daab0fb1a636183cf2a3dd588fcc3 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:50:21 -0700 Subject: [PATCH 110/283] Fix argument parsing test; default port is now a string --- tools/tests/command-line.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 8109e1dbe0..690aeccd7e 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -56,52 +56,52 @@ selftest.define("argument parsing", function () { // successful command invocation, correct parsing of arguments run = s.run("dummy", "--email", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "", ""); - run.read('"x" 3000 none ["",""]\n'); + run.read('"x" "3000" none ["",""]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "-"); - run.read('"x" 3000 none ["-"]\n'); + run.read('"x" "3000" none ["-"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-exxx"); - run.read('"xxx" 3000 none []\n'); + run.read('"xxx" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "-"); - run.read('"-" 3000 none []\n'); + run.read('"-" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -121,7 +121,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "--port", "1234", "--changed"); - run.read('"--port" 3000 true ["1234"]\n'); + run.read('"--port" "3000" true ["1234"]\n'); run.expectEnd(); run.expectExit(0); @@ -237,17 +237,17 @@ selftest.define("argument parsing", function () { // '--' to end parsing run = s.run("dummy", "--email", "x", "--", "-p", "4000"); - run.read('"x" 3000 none ["-p","4000"]\n'); + run.read('"x" "3000" none ["-p","4000"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--", "--changed", "--changed"); - run.read('"x" 3000 none ["--changed","--changed"]\n'); + run.read('"x" "3000" none ["--changed","--changed"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -258,7 +258,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "x", "-UD", "--changed"); - run.read('"x" 3000 true []\nurl\n\delete\n'); + run.read('"x" "3000" true []\nurl\n\delete\n'); run.expectEnd(); run.expectExit(0); From c09f52d89b13e752e05da2871ba0590240ec869c Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:19:17 -0700 Subject: [PATCH 111/283] Update path in cordova builds selftest --- tools/tests/cordova-builds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 2d9210e027..7a3b3612ca 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -7,7 +7,7 @@ var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var checkMobileServer = selftest.markStack(function (s, expected) { - var output = s.read("android/assets/www/application/index.html"); + var output = s.read("android/project/assets/www/application/index.html"); if (! output.match(new RegExp( '"DDP_DEFAULT_CONNECTION_URL":"' + expected + '"'))) { selftest.fail( From 9fd8b1cd47f6c9f03879427abf471f3d9be49738 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:09:02 -0700 Subject: [PATCH 112/283] Update 'add cordova platforms' to match latest command output --- tools/tests/cordova-platforms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 389e31a347..6a9b310b07 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -14,8 +14,8 @@ selftest.define("add cordova platforms", function () { s.set("METEOR_TEST_TMP", files.mkdtemp()); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); run = s.run("add-platform", "android"); @@ -30,7 +30,7 @@ selftest.define("add cordova platforms", function () { run = s.run("remove-platform", "android"); run.match("removed"); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); }); From d8923c5874afa2587a3db9166a5fb8adeec52b57 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 7 Oct 2014 19:25:57 -0700 Subject: [PATCH 113/283] Fixes to 'add cordova plugins' selftest. * Remove --settings option that is no longer supported. * Add --server option that is now required. Test still doesn't pass. --- tools/tests/cordova-plugins.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index f0a1654102..50eaa1a248 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -30,7 +30,7 @@ var localCordova = path.join(files.getCurrentToolsDir(), "tools", // // sand: a sandbox, that has the main app directory as its cwd. // plugins: an array of plugins in order. -var checkCordovaPlugins = function(sand, plugins) { +var checkCordovaPlugins = selftest.markStack(function(sand, plugins) { var lines = selftest.execFileSync(localCordova, ['plugins'], { cwd: path.join(sand.cwd, '.meteor', 'local', 'cordova-build'), @@ -53,7 +53,7 @@ var checkCordovaPlugins = function(sand, plugins) { i++; }); selftest.expectEqual(plugins.length, i); -}; +}); // Given a sandbox, that has the app as its cwd, read the cordova plugins // file and check that it contains exactly the plugins specified, in order. @@ -147,7 +147,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("run", "android"); run.matchErr("not added to the project"); - run.matchErr("meteor add-platform "); + run.match("meteor add-platform "); run = s.run("add-platform", "android"); run.match("Do you agree"); @@ -185,7 +185,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("list-platforms"); run.match("android"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(30); // This fails because the FB plugin does not compile without additional // configuration for android. @@ -199,7 +199,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("remove", "contains-cordova-plugin"); run.match("removed"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -209,7 +209,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("removed"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -219,7 +219,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("added"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); checkCordovaPlugins(s, ["org.apache.cordova.device"]); From d8bd9264d7ea5b3a1f09e110e507f996b9c88337 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 10:59:41 -0700 Subject: [PATCH 114/283] Update 'add cordova plugins' test to reflect reality. If we fail to install one plugin, then we uninstall all plugins to avoid awakening the Cordova monsters. Previously, this test was passing because we were passing a `--settings` argument, which was allowing the facebookconnect plugin to install, but the build to fail to other, not-understood reasons. Now that we've removed `--settings`, the plugin fails to install, which means that all plugins get uninstalled. Test passes now. --- tools/tests/cordova-plugins.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index 50eaa1a248..c28ed989aa 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -191,9 +191,10 @@ selftest.define("add cordova plugins", ["slow"], function () { // configuration for android. run.expectExit(8); - checkCordovaPlugins(s, - ["org.apache.cordova.camera", - "com.phonegap.plugins.facebookconnect"]); + // When one plugin installation fails, we uninstall all the plugins + // (legend has it that Cordova can get in a weird inconsistent state + // if we don't do this). + checkCordovaPlugins(s, []); // Remove a plugin run = s.run("remove", "contains-cordova-plugin"); From ea51b6a26abf4155ea9ce103af6261df6cd8954a Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Wed, 8 Oct 2014 15:55:07 -0700 Subject: [PATCH 115/283] Update DDP.md --- packages/ddp/DDP.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/ddp/DDP.md b/packages/ddp/DDP.md index 2cb5cf5296..ca29b4b032 100644 --- a/packages/ddp/DDP.md +++ b/packages/ddp/DDP.md @@ -238,7 +238,7 @@ a `pong` message. If the received `ping` message includes an `id` field, the Errors appear in `result` and `nosub` messages in an optional error field. An error is an Object with the following fields: - * `error`: string + * `error`: string (previously a number. See appendix 3) * `reason`: optional string * `details`: optional string @@ -334,12 +334,25 @@ behaves differently to the server, then syncing will fix this. generated will be the same, and syncing will be a no-op. +## Appendix 3: Error message `error` field can be a string or a number + +In the `pre1` and `pre2` specifications for DDP, the `error` field on error +messages was documented as a number, and in practice often matched the closest +HTTP error code. + +It is typically better to be specific about the type of error being returned, so +new code should use strings like `'wrong-password'` instead of `401`. To support +both the new string error codes and the old number codes, a DDP client should +accept a string or a number in this field. Many meteor packages, including some +core packages, still use the old numeric codes. + + ## Version History -```pre1``` was the first version of DDP +`pre1` was the first version of DDP -```pre2``` added keep-alive (ping & pong messages), and randomSeed. +`pre2` added keep-alive (ping & pong messages), and randomSeed. -```1``` should be considered the first official version of DDP. It is -currently identical to pre2, although non-incompatible changes may be made to -it in future. +`1` should be considered the first official version of DDP. The type of the +error code field has been clarified to reflect the behavior of existing clients +and servers. From d166119beb7738c75a8c815e2cf9f16be8f25970 Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 16:03:29 -0700 Subject: [PATCH 116/283] do not use clone since the catalog is backed by a real db --- tools/tests/package-tests.js | 74 +++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 74a2a87bbc..677c9dce3c 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -7,6 +7,7 @@ var _= require('underscore'); var fs = require("fs"); var path = require("path"); var packageClient = require("../package-client.js"); +var buildmessage = require("../buildmessage.js"); var username = "test"; var password = "testtest"; @@ -84,6 +85,76 @@ var checkVersions = function(sand, packages) { selftest.expectEqual(packages.length, i); }; +// Takes in a remote catalog. Returns an object that can sort of immitate the +// catalog. We don't bother to copy all of the information for memory/efficiency +// reasons; the new 'catalog' has the following methods, which correspond to the +// same methods on the normal catalog. +// +// getAllPackageNames () - list of package names +// getPackage (p) - given a package name, return its record +// getSortedVersions (p) - given a package name, return a sorted list of its versions +// getAllReleaseTracks () - list of release tracks +// getSortedRecommendedReleaseVersions (t) - given a track name, get (see method name) +// getReleaseVersion (t, v) - given track & version, return the document record +var DataStub = function (remoteCatalog) { + var self = this; + buildmessage.capture( + { title: "copying catalog data" }, + function () { + var packageNames = remoteCatalog.getAllPackageNames(); + self.packages = {}; + _.each(packageNames, function (p) { + var versions = remoteCatalog.getSortedVersions(p); + var record = remoteCatalog.getPackage(p); + self.packages[p] = { versions: versions, record: record }; + }); + var releaseTracks = remoteCatalog.getAllReleaseTracks(); + self.releases = {}; + _.each(releaseTracks, function (t) { + var versions = + remoteCatalog.getSortedRecommendedReleaseVersions(t); + var records = {}; + _.each(versions, function (v) { + records[v] = remoteCatalog.getReleaseVersion(t, v); + }); + self.releases[t] = { versions: versions, records: records }; + }); + }); +}; + +_.extend(DataStub.prototype, { + getAllPackageNames: function () { + return _.keys(this.packages); + }, + getSortedVersions: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.versions; + }, + getPackage: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.record; + }, + getAllReleaseTracks: function () { + return _.keys(this.releases); + }, + getSortedRecommendedReleaseVersions: function (t) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.versions; + }, + getReleaseVersion: function (t, v) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.records[v]; + } +}); + // Add packages to an app. Change the contents of the packages and their // dependencies, make sure that the app still refreshes. selftest.define("change packages during hot code push", [], function () { @@ -539,7 +610,6 @@ selftest.define("update server package data unit test", function () { var s = new Sandbox(); var run; - var buildmessage = require("../buildmessage.js"); var packageStorageFileDir = files.mkdtemp("update-server-package-data"); @@ -560,7 +630,7 @@ selftest.define("update server package data unit test", packageServerUrl: selftest.testPackageServerUrl }); - var oldStorage = _.clone(packageStorage); + var oldStorage = new DataStub(packageStorage); var newPackageNames = []; // Publish more than a (small) page worth of packages. When we pass the From 6c8b0832d7429486829e54327ef9f4393630c3f2 Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 16:03:29 -0700 Subject: [PATCH 117/283] do not use clone since the catalog is backed by a real db --- tools/tests/package-tests.js | 74 +++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 74a2a87bbc..677c9dce3c 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -7,6 +7,7 @@ var _= require('underscore'); var fs = require("fs"); var path = require("path"); var packageClient = require("../package-client.js"); +var buildmessage = require("../buildmessage.js"); var username = "test"; var password = "testtest"; @@ -84,6 +85,76 @@ var checkVersions = function(sand, packages) { selftest.expectEqual(packages.length, i); }; +// Takes in a remote catalog. Returns an object that can sort of immitate the +// catalog. We don't bother to copy all of the information for memory/efficiency +// reasons; the new 'catalog' has the following methods, which correspond to the +// same methods on the normal catalog. +// +// getAllPackageNames () - list of package names +// getPackage (p) - given a package name, return its record +// getSortedVersions (p) - given a package name, return a sorted list of its versions +// getAllReleaseTracks () - list of release tracks +// getSortedRecommendedReleaseVersions (t) - given a track name, get (see method name) +// getReleaseVersion (t, v) - given track & version, return the document record +var DataStub = function (remoteCatalog) { + var self = this; + buildmessage.capture( + { title: "copying catalog data" }, + function () { + var packageNames = remoteCatalog.getAllPackageNames(); + self.packages = {}; + _.each(packageNames, function (p) { + var versions = remoteCatalog.getSortedVersions(p); + var record = remoteCatalog.getPackage(p); + self.packages[p] = { versions: versions, record: record }; + }); + var releaseTracks = remoteCatalog.getAllReleaseTracks(); + self.releases = {}; + _.each(releaseTracks, function (t) { + var versions = + remoteCatalog.getSortedRecommendedReleaseVersions(t); + var records = {}; + _.each(versions, function (v) { + records[v] = remoteCatalog.getReleaseVersion(t, v); + }); + self.releases[t] = { versions: versions, records: records }; + }); + }); +}; + +_.extend(DataStub.prototype, { + getAllPackageNames: function () { + return _.keys(this.packages); + }, + getSortedVersions: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.versions; + }, + getPackage: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.record; + }, + getAllReleaseTracks: function () { + return _.keys(this.releases); + }, + getSortedRecommendedReleaseVersions: function (t) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.versions; + }, + getReleaseVersion: function (t, v) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.records[v]; + } +}); + // Add packages to an app. Change the contents of the packages and their // dependencies, make sure that the app still refreshes. selftest.define("change packages during hot code push", [], function () { @@ -539,7 +610,6 @@ selftest.define("update server package data unit test", function () { var s = new Sandbox(); var run; - var buildmessage = require("../buildmessage.js"); var packageStorageFileDir = files.mkdtemp("update-server-package-data"); @@ -560,7 +630,7 @@ selftest.define("update server package data unit test", packageServerUrl: selftest.testPackageServerUrl }); - var oldStorage = _.clone(packageStorage); + var oldStorage = new DataStub(packageStorage); var newPackageNames = []; // Publish more than a (small) page worth of packages. When we pass the From 1df375d3a21c6de42a54c83ce8130e979d2c2095 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 8 Oct 2014 17:05:18 -0700 Subject: [PATCH 118/283] Fix test-package-server tag ... and also make some fixes to the 'update package server data' test, though it's possible that only the other change is strictly necessary --- tools/selftest.js | 4 +- tools/tests/package-tests.js | 95 ++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 50 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index fdb8b6f406..142ddece07 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -380,7 +380,7 @@ var Sandbox = function (options) { // assume that the release's packages can be found on the server should not. // Note that this only affects subprocess meteor runs, not direct invocation // of packageClient! - if (runningTest.tags['test-package-server']) { + if (_.contains(runningTest.tags, 'test-package-server')) { self.set('METEOR_PACKAGE_SERVER_URL', exports.testPackageServerUrl); } @@ -1330,7 +1330,7 @@ var Test = function (options) { self.name = options.name; self.file = options.file; self.fileHash = options.fileHash; - self.tags = options.tags || {}; + self.tags = options.tags || []; self.f = options.func; self.cleanupHandlers = []; }; diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 677c9dce3c..377b08e985 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -98,28 +98,26 @@ var checkVersions = function(sand, packages) { // getReleaseVersion (t, v) - given track & version, return the document record var DataStub = function (remoteCatalog) { var self = this; - buildmessage.capture( - { title: "copying catalog data" }, - function () { - var packageNames = remoteCatalog.getAllPackageNames(); - self.packages = {}; - _.each(packageNames, function (p) { - var versions = remoteCatalog.getSortedVersions(p); - var record = remoteCatalog.getPackage(p); - self.packages[p] = { versions: versions, record: record }; - }); - var releaseTracks = remoteCatalog.getAllReleaseTracks(); - self.releases = {}; - _.each(releaseTracks, function (t) { - var versions = - remoteCatalog.getSortedRecommendedReleaseVersions(t); - var records = {}; - _.each(versions, function (v) { - records[v] = remoteCatalog.getReleaseVersion(t, v); + selftest.doOrThrow(function () { + var packageNames = remoteCatalog.getAllPackageNames(); + self.packages = {}; + _.each(packageNames, function (p) { + var versions = remoteCatalog.getSortedVersions(p); + var record = remoteCatalog.getPackage(p); + self.packages[p] = { versions: versions, record: record }; + }); + var releaseTracks = remoteCatalog.getAllReleaseTracks(); + self.releases = {}; + _.each(releaseTracks, function (t) { + var versions = + remoteCatalog.getSortedRecommendedReleaseVersions(t); + var records = {}; + _.each(versions, function (v) { + records[v] = remoteCatalog.getReleaseVersion(t, v); + }); + self.releases[t] = { versions: versions, records: records }; }); - self.releases[t] = { versions: versions, records: records }; }); - }); }; _.extend(DataStub.prototype, { @@ -619,7 +617,10 @@ selftest.define("update server package data unit test", var packageStorageFile = config.getPackageStorage({root: packageStorageFileDir}); packageStorage.initialize({ - packageStorage : packageStorageFile + packageStorage : packageStorageFile, + // Don't let this catalog refresh: we do that manually, and in any case the + // catalog isn't smart enough to refresh with the right URL. + offline: true }); testUtils.login(s, username, password); @@ -647,34 +648,32 @@ selftest.define("update server package data unit test", useShortPages: true }); - buildmessage.capture( - { title: "comparing the test catalogs" }, - function () { - var packages = oldStorage.getAllPackageNames(); - _.each(packages, function (p) { - // We could be more pedantic about comparing all the records, but it - // is a significant effort, time-wise to do that. - selftest.expectEqual( - packageStorage.getPackage(p), oldStorage.getPackage(p)); - selftest.expectEqual( - packageStorage.getSortedVersions(p), - oldStorage.getSortedVersions(p)); - }); - var releaseTracks = oldStorage.getAllReleaseTracks; - _.each(releaseTracks, function (t) { - _.each(oldStorage.getSortedRecommendedReleaseVersions(t), - function (v) { - selftest.expectEqual( - packageStorage.getReleaseVersion(t, v), - oldStorage.getReleaseVersion(t, v)); - }); - }); - }); + selftest.doOrThrow(function () { + var packages = oldStorage.getAllPackageNames(); + _.each(packages, function (p) { + // We could be more pedantic about comparing all the records, but it + // is a significant effort, time-wise to do that. + selftest.expectEqual( + packageStorage.getPackage(p), oldStorage.getPackage(p)); + selftest.expectEqual( + packageStorage.getSortedVersions(p), + oldStorage.getSortedVersions(p)); + }); + var releaseTracks = oldStorage.getAllReleaseTracks; + _.each(releaseTracks, function (t) { + _.each(oldStorage.getSortedRecommendedReleaseVersions(t), + function (v) { + selftest.expectEqual( + packageStorage.getReleaseVersion(t, v), + oldStorage.getReleaseVersion(t, v)); + }); + }); - // Check that our newly published packages appear in newData and on disk. - _.each(newPackageNames, function (name) { - var found = packageStorage.getPackage(name); - selftest.expectEqual(!! found, true); + // Check that our newly published packages appear in newData and on disk. + _.each(newPackageNames, function (name) { + var found = packageStorage.getPackage(name); + selftest.expectEqual(!! found, true); + }); }); }); From e7820b5fbf7839003d95b61cd40cf911517d46ca Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 8 Oct 2014 17:25:48 -0700 Subject: [PATCH 119/283] jsdoc update --- docs/client/data.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/client/data.js b/docs/client/data.js index 71d3f9662c..46cbfd2501 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,6 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -<<<<<<< HEAD -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; -======= -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["Number"]},"description":"

A numeric error code, likely similar to an HTTP code (eg, 404, 500).

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the error, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error, like a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; ->>>>>>> d7bae95deb048b347b137c2807055a32d6d39877 +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file From d1ee2043f979c56d3229f364e1c3f3f65f2ab4da Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 17:27:28 -0700 Subject: [PATCH 120/283] Don't say "removed cordova:blah" if it wasn't in the project. --- tools/commands-packages.js | 9 +++++++-- tools/project.js | 5 +++++ tools/tests/cordova-plugins.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 217040bb98..c178f17ad3 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -2125,12 +2125,17 @@ main.registerCommand({ var cordovaPlugins = filteredPackages.plugins; // Update the plugins list - project.removeCordovaPlugins(cordovaPlugins); + var removedPlugins = project.removeCordovaPlugins(cordovaPlugins); + var notRemoved = _.difference(cordovaPlugins, removedPlugins); - _.each(cordovaPlugins, function (plugin) { + _.each(removedPlugins, function (plugin) { Console.info("removed cordova plugin " + plugin); }); + _.each(notRemoved, function (plugin) { + Console.error(plugin + " is not in this project."); + }); + var args = filteredPackages.rest; if (_.isEmpty(args)) diff --git a/tools/project.js b/tools/project.js index 8c21cdb5aa..5b9c4a5ff9 100644 --- a/tools/project.js +++ b/tools/project.js @@ -993,9 +993,12 @@ _.extend(Project.prototype, { // Removes the plugins from the cordova-plugins file if they existed. // pluginsToRemove - array of Cordova plugin identifiers + // + // Returns an array of plugin identifiers that were actually removed. removeCordovaPlugins: function (pluginsToRemove) { var self = this; + var removed = _.intersection(_.keys(self.cordovaPlugins), pluginsToRemove); self.cordovaPlugins = _.omit.apply(null, [self.cordovaPlugins].concat(pluginsToRemove)); @@ -1010,6 +1013,8 @@ _.extend(Project.prototype, { }); lines.push('\n'); fs.writeFileSync(plugins, lines.join('\n'), 'utf8'); + + return removed; }, // platforms - a list of strings diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index c28ed989aa..8150bccd37 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -225,3 +225,31 @@ selftest.define("add cordova plugins", ["slow"], function () { run.expectExit(0); checkCordovaPlugins(s, ["org.apache.cordova.device"]); }); + +selftest.define("remove cordova plugins", function () { + var s = new Sandbox(); + var run; + + s.createApp("myapp", "package-tests"); + s.cd("myapp"); + run = s.run("add", "cordova:org.apache.cordova.camera@0.3.0"); + run.waitSecs(5); + run.expectExit(0); + + checkUserPlugins(s, ["org.apache.cordova.camera"]); + + // Removing a plugin that hasn't been added should say that it isn't + // in this project. + run = s.run("remove", "cordova:blahblah"); + run.matchErr("not in this project"); + run.forbidAll("removed"); + run.expectExit(0); + + run = s.run("remove", "cordova:blahblah", + "cordova:org.apache.cordova.camera"); + run.waitSecs(5); + run.matchErr("not in this project"); + run.match("removed"); + run.expectExit(0); + checkUserPlugins(s, []); +}); From 659128025d924b9ba78f3eeec885047d7ebf6f51 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 8 Oct 2014 18:06:52 -0700 Subject: [PATCH 121/283] first step towards fixing a test --- tools/tests/publish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 98b3749f2c..07a2726eec 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -400,6 +400,7 @@ selftest.define("package-depends-on-either-version", var password = "testtest"; testUtils.login(s, username, password); var packageNameDependent = utils.randomToken(); + var run; // First, we publish fullPackageNameDep at 1.0 and publish it.. var fullPackageNameDep = username + ":" + packageNameDependent; @@ -439,7 +440,6 @@ selftest.define("package-depends-on-either-version", s.createApp("myapp", "package-tests"); s.cd("myapp"); s.set("METEOR_TEST_TMP", files.mkdtemp()); - s.set("METEOR_OFFLINE_CATALOG", "t"); run = s.run("add", fullPackageNameDep + "@=1.0.0"); run.match(fullPackageNameDep); From a98c6d030a732739d9beecef474e4c90d495a2f2 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 7 Oct 2014 15:43:35 -0700 Subject: [PATCH 122/283] server DDP: Use low-level websocket-driver module We want to support running DDP through a corporate proxy, but the higher-level faye-websocket can't support that and won't be changed to allow that: https://github.com/faye/faye-websocket-node/pull/30 Fair enough. Let's just switch to the lower-level module, since we don't care about getting a browser-compatible websocket API. This is a first step towards fixing #2515. --- packages/ddp/.npm/package/npm-shrinkwrap.json | 14 ++-- packages/ddp/package.js | 17 ++--- packages/ddp/stream_client_nodejs.js | 67 ++++++++++++++----- 3 files changed, 63 insertions(+), 35 deletions(-) diff --git a/packages/ddp/.npm/package/npm-shrinkwrap.json b/packages/ddp/.npm/package/npm-shrinkwrap.json index 3c44970ac2..650acac22d 100644 --- a/packages/ddp/.npm/package/npm-shrinkwrap.json +++ b/packages/ddp/.npm/package/npm-shrinkwrap.json @@ -1,20 +1,18 @@ { "dependencies": { - "faye-websocket": { - "version": "https://github.com/meteor/faye-websocket-node/tarball/ccc180998b1396093c24d0df7ebc1d199c276552", - "dependencies": { - "websocket-driver": { - "version": "0.3.4" - } - } - }, "sockjs": { "version": "0.3.9", "dependencies": { "node-uuid": { "version": "1.3.3" + }, + "faye-websocket": { + "version": "0.7.2" } } + }, + "websocket-driver": { + "version": "0.3.6" } } } diff --git a/packages/ddp/package.js b/packages/ddp/package.js index 720544a08d..89a098b44c 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -3,19 +3,16 @@ Package.describe({ version: '1.0.10-rc.0' }); -// We use 'faye-websocket' for connections in server-to-server DDP, mostly -// because it's the same library used as a server in sockjs, and it's easiest to -// deal with a single websocket implementation. (Plus, its maintainer is easy -// to work with on pull requests.) +// We use Faye's 'websocket-driver' for connections in server-to-server DDP, +// mostly because it's the same library used as a server in sockjs, and it's +// easiest to deal with a single websocket implementation. (Plus, its +// maintainer is easy to work with on pull requests.) // -// (By listing faye-websocket first, it's more likely that npm deduplication -// will prevent a second copy of faye-websocket from being installed inside +// (By listing websocket-driver first, it's more likely that npm deduplication +// will prevent a second copy of websocket-driver from being installed inside // sockjs.) Npm.depends({ - // A fork fixing https://github.com/faye/websocket-driver-node/pull/8 (ie - // "open from inactive client" errors). Note that sockjs won't use this fork, - // but the bug only affects the websocket client, not the server. - "faye-websocket": "https://github.com/meteor/faye-websocket-node/tarball/ccc180998b1396093c24d0df7ebc1d199c276552", + "websocket-driver": "0.3.6", sockjs: "0.3.9" }); diff --git a/packages/ddp/stream_client_nodejs.js b/packages/ddp/stream_client_nodejs.js index 6ee13a1a23..09df55c540 100644 --- a/packages/ddp/stream_client_nodejs.js +++ b/packages/ddp/stream_client_nodejs.js @@ -36,7 +36,7 @@ _.extend(LivedataTest.ClientStream.prototype, { send: function (data) { var self = this; if (self.currentStatus.connected) { - self.client.send(data); + self.client.messages.write(data); } }, @@ -118,18 +118,33 @@ _.extend(LivedataTest.ClientStream.prototype, { // Since server-to-server DDP is still an experimental feature, we only // require the module if we actually create a server-to-server // connection. - var FayeWebSocket = Npm.require('faye-websocket'); + var websocketDriver = Npm.require('websocket-driver'); // We would like to specify 'ddp' as the subprotocol here. The npm module we // used to use as a client would fail the handshake if we ask for a // subprotocol and the server doesn't send one back (and sockjs doesn't). // Faye doesn't have that behavior; it's unclear from reading RFC 6455 if // Faye is erroneous or not. So for now, we don't specify protocols. - var client = self.client = new FayeWebSocket.Client( - toWebsocketUrl(self.endpoint), - [/*no subprotocols*/], - {headers: self.headers} - ); + var wsUrl = toWebsocketUrl(self.endpoint); + var client = self.client = websocketDriver.client(wsUrl); + + var parsedUrl = Npm.require('url').parse(wsUrl); + var stream; + var onConnect = function () { + client.start(); + }; + if (parsedUrl.protocol === 'wss:') { + stream = Npm.require('tls').connect( + parsedUrl.port || 443, parsedUrl.hostname, onConnect); + } else { + stream = Npm.require('net').createConnection( + parsedUrl.port || 80, parsedUrl.hostname); + stream.on('connect', onConnect); + } + + _.each(self.headers, function (header, name) { + client.setHeader(name, header); + }); self._clearConnectionTimer(); self.connectionTimer = Meteor.setTimeout( @@ -152,29 +167,47 @@ _.extend(LivedataTest.ClientStream.prototype, { }, description)); }; - clientOnIfCurrent('error', 'stream error callback', function (error) { + var finalize = Meteor.bindEnvironment(function () { + stream.end(); + if (client === self.client) { + self._lostConnection(); + } + }, "finalizing stream"); + + stream.on('end', finalize); + stream.on('close', finalize); + client.on('close', finalize); + + var onError = function (message) { if (!self.options._dontPrintErrors) - Meteor._debug("stream error", error.message); + Meteor._debug("driver error", message); // Faye's 'error' object is not a JS error (and among other things, // doesn't stringify well). Convert it to one. - self._lostConnection(new DDP.ConnectionError(error.message)); - }); - - - clientOnIfCurrent('close', 'stream close callback', function () { - self._lostConnection(); + self._lostConnection(new DDP.ConnectionError(message)); + }; + + clientOnIfCurrent('error', 'driver error callback', function (error) { + onError(error.message); }); + stream.on('error', Meteor.bindEnvironment(function (error) { + if (client === self.client) { + onError('Network error: ' + wsUrl + ': ' + error.message); + } + stream.end(); + })); clientOnIfCurrent('message', 'stream message callback', function (message) { - // Ignore binary frames, where message.data is a Buffer + // Ignore binary frames, where data is a Buffer if (typeof message.data !== "string") return; - _.each(self.eventCallbacks.message, function (callback) { callback(message.data); }); }); + + stream.pipe(self.client.io); + self.client.io.pipe(stream); } }); From 7f134bdfb4a1e95c74049c0039135610f6fd308a Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 19:48:57 -0700 Subject: [PATCH 123/283] changed the test to catch that we fail to not link in the export variable --- .../apps/package-tests/packages/debug-only/debug-only.js | 1 + .../apps/package-tests/packages/debug-only/package.js | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/tests/apps/package-tests/packages/debug-only/debug-only.js b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js index 3740f30ec1..a5b8f3c565 100644 --- a/tools/tests/apps/package-tests/packages/debug-only/debug-only.js +++ b/tools/tests/apps/package-tests/packages/debug-only/debug-only.js @@ -1 +1,2 @@ +Debug = 5; global.DEBUG_ONLY_LOADED = true; diff --git a/tools/tests/apps/package-tests/packages/debug-only/package.js b/tools/tests/apps/package-tests/packages/debug-only/package.js index 1912e818e6..b0909a9f31 100644 --- a/tools/tests/apps/package-tests/packages/debug-only/package.js +++ b/tools/tests/apps/package-tests/packages/debug-only/package.js @@ -6,10 +6,5 @@ Package.describe({ Package.onUse(function(api) { // api.versionsFrom('0.9.3.1'); api.addFiles('debug-only.js'); -}); - -Package.onTest(function(api) { - api.use('tinytest'); - api.use('debug-only'); - api.addFiles('debug-only-tests.js'); + api.export('Debug'); }); From 4a4e7c19ffc93ac8546d56dc70a48f1771ddb609 Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 22:04:05 -0700 Subject: [PATCH 124/283] treat exports from debugOnly packages same way that we treat weak dependencies and do not export them by default --- tools/isopack.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/isopack.js b/tools/isopack.js index 4a5440149c..603feab45c 100644 --- a/tools/isopack.js +++ b/tools/isopack.js @@ -132,14 +132,15 @@ _.extend(Unibuild.prototype, { // packages get precedence. // // We don't get imports from unordered dependencies (since they may not be - // defined yet) or from weak dependencies (because the meaning of a name - // shouldn't be affected by the non-local decision of whether or not an - // unrelated package in the target depends on something). + // defined yet) or from weak/debugOnly dependencies (because the meaning of + // a name shouldn't be affected by the non-local decision of whether or not + // an unrelated package in the target depends on something). var imports = {}; // map from symbol to supplying package name compiler.eachUsedUnibuild( self.uses, bundleArch, loader, - {skipUnordered: true}, function (depUnibuild) { + { skipUnordered: true, skipDebugOnly: true }, + function (depUnibuild) { _.each(depUnibuild.packageVariables, function (symbol) { // Slightly hacky implementation of test-only exports. if (symbol.export === true || From cca0112b990748ee2ca88165420e704b56b8efd1 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 8 Oct 2014 22:18:15 -0700 Subject: [PATCH 125/283] use format 1.1 sync token! fixes ability to get new styles of data, including package-depends-on-either-version test --- tools/catalog-remote.js | 2 +- tools/package-client.js | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index a2d4f8b47c..dc95fce815 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -825,7 +825,7 @@ _.extend(RemoteCatalog.prototype, { var result = self._simpleQuery("SELECT content FROM syncToken WHERE _id=?", [ SYNCTOKEN_ID ]); if (!result || result.length === 0) { Console.debug("No sync token found"); - return {}; + return null; } if (result.length !== 1) { throw new Error("Unexpected number of sync tokens found"); diff --git a/tools/package-client.js b/tools/package-client.js index 2bfaf642a7..9a4bf7eb49 100644 --- a/tools/package-client.js +++ b/tools/package-client.js @@ -38,13 +38,6 @@ var openPackageServerConnection = function (packageServerUrl) { _dontPrintErrors: true}); }; -var emptyCachedServerDataJson = function () { - return { - syncToken: { format: "1.1" }, - collections: null - }; -}; - // Given a connection, makes a call to the package server. (Checks to see if // the connection is connected, and reconnects if needed -- a workaround for // the fact that connections in the tool do not reconnect) @@ -146,7 +139,7 @@ _updateServerPackageData = function (dataStore, options) { buildmessage.reportProgress(state); var getSomeData = function () { - var syncToken = dataStore.getSyncToken() || {}; + var syncToken = dataStore.getSyncToken() || {format: "1.1"}; if (!start) { start = {}; From b8d927851a55713d1aa3037dfe681b8a27194c79 Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 22:31:37 -0700 Subject: [PATCH 126/283] increment client cache format to v2 The client cache in sql-land was broken: it sent over the wrong sync token as the default. This meant that the server thought that this was a much older client. As a result, any 0.9.3+ packages with '_' or '||' in their versions/dependencies were filtered out. There is no easy way to undo that sort of filtering without deleting the db for a variety of reasons, and if we are going to delete the db, we might as well increment the version so we don't have to worry about consistency. --- tools/config.js | 2 +- tools/selftest.js | 5 +++-- tools/tests/autoupdate.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/config.js b/tools/config.js index 7e32722550..c1ac0d7db3 100644 --- a/tools/config.js +++ b/tools/config.js @@ -213,7 +213,7 @@ _.extend(exports, { getPackageStorage: function (tropo) { var self = this; tropo = tropo || tropohouse.default; - return path.join(tropo.root, "package-metadata", "v2", + return path.join(tropo.root, "package-metadata", "v2.0.1", self.getLocalPackageCacheFilename()); }, diff --git a/tools/selftest.js b/tools/selftest.js index 142ddece07..7e2ad61f80 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -641,7 +641,7 @@ _.extend(Sandbox.prototype, { files.mkdir_p(path.join(self.warehouse, packagesDirectoryName), 0755); files.mkdir_p(path.join(self.warehouse, 'package-metadata', 'v1'), 0755); files.mkdir_p(path.join(self.warehouse, 'package-metadata', 'v1.1'), 0755); - files.mkdir_p(path.join(self.warehouse, 'package-metadata', 'v2'), 0755); + files.mkdir_p(path.join(self.warehouse, 'package-metadata', 'v2.0.1'), 0755); var stubCatalog = { syncToken: {}, @@ -788,7 +788,8 @@ _.extend(Sandbox.prototype, { var dataFile = config.getLocalPackageCacheFilename(serverUrl); var tmpCatalog = new catalogRemote.RemoteCatalog(); - tmpCatalog.initialize({packageStorage: path.join(self.warehouse, 'package-metadata', 'v2', dataFile)}); + tmpCatalog.initialize({ + packageStorage: path.join(self.warehouse, 'package-metadata', 'v2.0.1', dataFile)}); tmpCatalog.insertData(stubCatalog); // And a cherry on top diff --git a/tools/tests/autoupdate.js b/tools/tests/autoupdate.js index 4cc14fb2d6..428ddeb9e2 100644 --- a/tools/tests/autoupdate.js +++ b/tools/tests/autoupdate.js @@ -9,7 +9,7 @@ var Sandbox = selftest.Sandbox; var getCatalog = function (sandbox) { var dataFile = path.join(sandbox.warehouse, - 'package-metadata', 'v2', + 'package-metadata', 'v2.0.1', config.getLocalPackageCacheFilename()); var catalog = new catalogRemote.RemoteCatalog(); catalog.initialize( {packageStorage: dataFile}); From 6bc2cff03a67ddade76a844b8c574be664b15832 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 10:24:11 -0700 Subject: [PATCH 127/283] Pass --progress-bar to curl in ensure_android_bundle Alternatives (doing it all in node) were much more invasive. --- tools/cordova-scripts/ensure_android_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cordova-scripts/ensure_android_bundle.sh b/tools/cordova-scripts/ensure_android_bundle.sh index 31bbfd6df2..ba198142cb 100755 --- a/tools/cordova-scripts/ensure_android_bundle.sh +++ b/tools/cordova-scripts/ensure_android_bundle.sh @@ -40,7 +40,7 @@ install_android_bundle () { echo "Skipping download and installing kit from $DEST_DIR/$TARBALL" >&2 tar -xzf "$DEST_DIR/$TARBALL" -C "$BUNDLE_TMPDIR" else - curl "$ANDROID_BUNDLE_URL_ROOT$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR" + curl --progress-bar "$ANDROID_BUNDLE_URL_ROOT$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR" fi # Delete old dev bundle and rename the new one on top of it. From cce79392710fe264d10066fa6139e3de744dc768 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 11:27:44 -0700 Subject: [PATCH 128/283] Run jsdoc script --- docs/client/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/client/data.js b/docs/client/data.js index 64bc697bef..46cbfd2501 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file From e0876ece3a5df1cd8b85662c585c5ec219aff420 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 11:45:01 -0700 Subject: [PATCH 129/283] Parse the curl progress to output it cleanly Not the greatest solution technically, but it improves UX. --- tools/commands-cordova.js | 65 +++++++++++++++++++++++++++------------ tools/processes.js | 3 ++ 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 76583e90e2..f6fa3bf3a9 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -233,25 +233,10 @@ var getLoadedPackages = _.once(function () { // --- Cordova routines --- -var cordovaScriptExecutionCache = {}; -var runCordovaScript = function (name, cache) { - var scriptPath = - path.join(files.getCurrentToolsDir(), 'tools', 'cordova-scripts', name); +var ensureAndroidBundle = function (command, options) { + options = options || {}; - if (cache && cordovaScriptExecutionCache[scriptPath]) { - verboseLog('Script already checked: ' + name); - return; - } - - verboseLog('Running script ' + name); - execFileSyncOrThrow('bash', [scriptPath], { pipeOutput: true }); - if (cache) { - cordovaScriptExecutionCache[scriptPath] = true; - } -}; - -var ensureAndroidBundle = function (command) { if (command && ! _.contains([localAdb, localAndroid], command)) { if (command !== localCordova || ! _.contains(project.getCordovaPlatforms(), 'android')) @@ -259,7 +244,49 @@ var ensureAndroidBundle = function (command) { } try { - runCordovaScript('ensure_android_bundle.sh', true); + buildmessage.enterJob({ title: 'Downloading Android bundle' }, function () { + var scriptPath = path.join(files.getCurrentToolsDir(), 'tools', 'cordova-scripts', 'ensure_android_bundle.sh'); + + verboseLog('Running script ' + scriptPath); + + var runOptions = {}; + runOptions.env = _.extend( { "USE_GLOBAL_ADK": "" }, + { "METEOR_WAREHOUSE_DIR": tropo.root }, + process.env, + options.env || {}); + + var progress = buildmessage.getCurrentProgressTracker(); + + if (progress) { + runOptions.onStderr = function (data) { + var s = data.toString(); + // Output looks like: ### 10.3% + var re = /#+\s*([0-9.]{1,4})%/; + var match = re.exec(s); + if (match) { + var status = {current: parseInt(match[1]), end: 100}; + progress.reportProgress(status); + } + }; + } + + var cmd = new processes.RunCommand('bash', [scriptPath], runOptions); + var execution = cmd.run(); + + if (progress) { + progress.reportProgressDone(); + } + + if (execution.exitCode != 0) { + Console.warn("Unexpected exit code from script: " + execution.exitCode); + Console.warn("stdout: " + execution.stdout); + Console.warn("stderr: " + execution.stderr); + throw new Error('Could not download Android bundle'); + } + + + }); + } catch (err) { verboseLog('Failed to install android_bundle ', err.stack); Console.warn("Failed to install android_bundle"); @@ -1849,7 +1876,7 @@ _.extend(Android.prototype, { installTarget: function (target) { var self = this; - buildmessage.enterJob({ title: 'Installing Android API library'}, function () { + buildmessage.enterJob({ title: 'Installing Android target support'}, function () { var options = {stdin: 'y\n'}; options.progress = buildmessage.getCurrentProgressTracker(); var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], options); diff --git a/tools/processes.js b/tools/processes.js index 39aaba4a21..02a8a62e43 100644 --- a/tools/processes.js +++ b/tools/processes.js @@ -69,6 +69,9 @@ _.extend(RunCommand.prototype, { if (self.options.pipeOutput) { Console.stderr.write(data); } + if (self.options.onStderr) { + self.options.onStderr(data); + } }); self.stdin = self.process.stdin; From 5af5a98342bb2e209cd263edd20f229c9e0be2a9 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Thu, 9 Oct 2014 11:35:04 -0700 Subject: [PATCH 130/283] Hide springboard progress bar when complete Fixes https://app.asana.com/0/802778796897/17391461309554 Apparently Console.enableProgressBar is written to do nothing if Console is not in pretty mode. --- tools/console.js | 2 +- tools/main.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/console.js b/tools/console.js index 8f5a088543..6e8f1cf129 100644 --- a/tools/console.js +++ b/tools/console.js @@ -370,7 +370,7 @@ _.extend(Console.prototype, { } if (info) { - message = info + ": " + message + message = info + ": " + message; } self.error(message); diff --git a/tools/main.js b/tools/main.js index 3d16cdf626..fa42ed109b 100644 --- a/tools/main.js +++ b/tools/main.js @@ -363,8 +363,12 @@ var springboard = function (rel, releaseOverride) { }); }); - Console.setPretty(false); + // It's important to call setPretty *after* enableProgressBar, + // since `Console.enableProgressBar(false)` is silently ignored + // when not in pretty mode. XXX Maybe we should change that + // behavior? Console.enableProgressBar(false); + Console.setPretty(false); } catch (err) { // We have failed to download the tool that we are supposed to springboard // to! That's bad. Let's exit. From 0dc9149d85b5b26356be40429ad6808b89ed44ca Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Thu, 9 Oct 2014 11:35:04 -0700 Subject: [PATCH 131/283] Hide springboard progress bar when complete Fixes https://app.asana.com/0/802778796897/17391461309554 Apparently Console.enableProgressBar is written to do nothing if Console is not in pretty mode. --- tools/console.js | 2 +- tools/main.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/console.js b/tools/console.js index 8f5a088543..6e8f1cf129 100644 --- a/tools/console.js +++ b/tools/console.js @@ -370,7 +370,7 @@ _.extend(Console.prototype, { } if (info) { - message = info + ": " + message + message = info + ": " + message; } self.error(message); diff --git a/tools/main.js b/tools/main.js index 3d16cdf626..fa42ed109b 100644 --- a/tools/main.js +++ b/tools/main.js @@ -363,8 +363,12 @@ var springboard = function (rel, releaseOverride) { }); }); - Console.setPretty(false); + // It's important to call setPretty *after* enableProgressBar, + // since `Console.enableProgressBar(false)` is silently ignored + // when not in pretty mode. XXX Maybe we should change that + // behavior? Console.enableProgressBar(false); + Console.setPretty(false); } catch (err) { // We have failed to download the tool that we are supposed to springboard // to! That's bad. Let's exit. From bff1cec3dd37df3aa20d5236162431898497e6b0 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 11:51:50 -0700 Subject: [PATCH 132/283] Bump the timeout for waiting for the emulator to start On first boot, it can take more than 2 minutes. --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index f6fa3bf3a9..88fb035490 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2094,7 +2094,7 @@ _.extend(Android.prototype, { waitForEmulator: function () { var self = this; - var timeLimit = 120 * 1000; + var timeLimit = 240 * 1000; var interval = 1000; for (var i = 0; i < timeLimit / interval; i++) { Console.debug("Waiting for emulator"); From 3dab2c9b50c0052a095b87a9200a74eddc5a4410 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 12:27:02 -0700 Subject: [PATCH 133/283] First pass at History.md --- History.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index c4d482e6b8..7bb7e29d76 100644 --- a/History.md +++ b/History.md @@ -1,7 +1,8 @@ ## v.NEXT * Rename `{{> UI.dynamic}}` to `{{> Template.dynamic}}`, and likewise - with `UI.contentBlock` and `UI.elseBlock`. + with `UI.contentBlock` and `UI.elseBlock`. The UI namespace is no longer + used anywhere except for backwards compatibility. * Deprecate the `amplify`, `backbone`, `bootstrap`, and `d3` integration packages in favor of community alternatives. These packages will no @@ -22,6 +23,66 @@ option for 'meteor run' and '--server' for 'meteor build'. --server is required for meteor build. describe defaults for --mobile-server. +* The local package catalog now uses SQLite, which is much faster than the +previous implementation. + +* Operations that take longer than a few seconds, such as downloading packages, +installing the Android SDK, and some others, now show a progress bar. + +* Package.registerBuildPlugin its associated functions have been added to the +public API, cleaned up, and documented. The new function is identical to the +earlier _transitional_registerBuildPlugin except for one or two backwards- +compatible API changes. + +* The `unipackage.json` file inside downloaded packages has been renamed to +`isopack.json` and has an improved forwards-compatible format. To maintain +backwards compatibility with previous releases, packages will have both +files included. + +* New callbacks that make it easier to build custom user interfaces on top of +the accounts system: `Accounts.onResetPasswordLink`, +`Accounts.onEnrollmentLink`, and `Accounts.onEmailVerificationLink`. These +callbacks should be registered before `Meteor.startup` fires, and will be called +if the URL matches a link in an email sent by `Accounts.resetPassword`, etc. + +* The `.meteor/cordova-platforms` file has been renamed to `.meteor/platforms` +to reflect the possibility of adding non-Cordova platforms in the future. This +file now automatically includes the platforms `server` and `browser`, which +can't currently be removed. The old file will be automatically migrated to +the new one when the app is run with Meteor 0.9.4 or above. + +* Meteor can now run [Velocity](https://github.com/meteor-velocity/velocity) + tests with `meteor run --test`. + +* There is a new `meteor debug` command and `--debug-port` command line option +for `meteor run` that allows you to easily use node-inspector to debug your +server-side code. Add a `debugger` statement to your code to create a +breakpoint. + +* A new special file, `/mobile-config.js`, allows you to set app metadata, +icons, splash screens, preferences, and PhoneGap/Cordova plugin settings without +needing a `cordova_build_override` directory. + +* Change the mechanism that the Meteor tool uses to clean up app server +processes. The new mechanism is more resilient to slow app bundles and +other CPU-intensive tasks. #2536, #2588. + +* The constraint solver used by the client to find compatible versions of +packages is now much faster. + +* The process and documentation for installing SDKs for Android and iOS has +been significantly improved, and is more intelligent about detecting existing +SDK installs. + +* Improved output from `meteor build` to make it easier to publish mobile +apps to the App Store and Play Store, and added documentation about all of the +steps from building the app to publishing it. + +* Packages can now be marked as `debugOnly` by adding `debugOnly: true` to +`Package.describe`. Debug-only packages are not bundled for production, allowing +package authors to build packages specifically for testing and debugging without +increasing the size of the resulting app bundle or causing apps to ship with +debug functionality built in. ## v0.9.3.1 From 60a9da16067ee5f2e6b44bb46cd6db15d562784f Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 11:45:01 -0700 Subject: [PATCH 134/283] Parse the curl progress to output it cleanly Not the greatest solution technically, but it improves UX. --- tools/commands-cordova.js | 65 +++++++++++++++++++++++++++------------ tools/processes.js | 3 ++ 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 76583e90e2..f6fa3bf3a9 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -233,25 +233,10 @@ var getLoadedPackages = _.once(function () { // --- Cordova routines --- -var cordovaScriptExecutionCache = {}; -var runCordovaScript = function (name, cache) { - var scriptPath = - path.join(files.getCurrentToolsDir(), 'tools', 'cordova-scripts', name); +var ensureAndroidBundle = function (command, options) { + options = options || {}; - if (cache && cordovaScriptExecutionCache[scriptPath]) { - verboseLog('Script already checked: ' + name); - return; - } - - verboseLog('Running script ' + name); - execFileSyncOrThrow('bash', [scriptPath], { pipeOutput: true }); - if (cache) { - cordovaScriptExecutionCache[scriptPath] = true; - } -}; - -var ensureAndroidBundle = function (command) { if (command && ! _.contains([localAdb, localAndroid], command)) { if (command !== localCordova || ! _.contains(project.getCordovaPlatforms(), 'android')) @@ -259,7 +244,49 @@ var ensureAndroidBundle = function (command) { } try { - runCordovaScript('ensure_android_bundle.sh', true); + buildmessage.enterJob({ title: 'Downloading Android bundle' }, function () { + var scriptPath = path.join(files.getCurrentToolsDir(), 'tools', 'cordova-scripts', 'ensure_android_bundle.sh'); + + verboseLog('Running script ' + scriptPath); + + var runOptions = {}; + runOptions.env = _.extend( { "USE_GLOBAL_ADK": "" }, + { "METEOR_WAREHOUSE_DIR": tropo.root }, + process.env, + options.env || {}); + + var progress = buildmessage.getCurrentProgressTracker(); + + if (progress) { + runOptions.onStderr = function (data) { + var s = data.toString(); + // Output looks like: ### 10.3% + var re = /#+\s*([0-9.]{1,4})%/; + var match = re.exec(s); + if (match) { + var status = {current: parseInt(match[1]), end: 100}; + progress.reportProgress(status); + } + }; + } + + var cmd = new processes.RunCommand('bash', [scriptPath], runOptions); + var execution = cmd.run(); + + if (progress) { + progress.reportProgressDone(); + } + + if (execution.exitCode != 0) { + Console.warn("Unexpected exit code from script: " + execution.exitCode); + Console.warn("stdout: " + execution.stdout); + Console.warn("stderr: " + execution.stderr); + throw new Error('Could not download Android bundle'); + } + + + }); + } catch (err) { verboseLog('Failed to install android_bundle ', err.stack); Console.warn("Failed to install android_bundle"); @@ -1849,7 +1876,7 @@ _.extend(Android.prototype, { installTarget: function (target) { var self = this; - buildmessage.enterJob({ title: 'Installing Android API library'}, function () { + buildmessage.enterJob({ title: 'Installing Android target support'}, function () { var options = {stdin: 'y\n'}; options.progress = buildmessage.getCurrentProgressTracker(); var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], options); diff --git a/tools/processes.js b/tools/processes.js index 39aaba4a21..02a8a62e43 100644 --- a/tools/processes.js +++ b/tools/processes.js @@ -69,6 +69,9 @@ _.extend(RunCommand.prototype, { if (self.options.pipeOutput) { Console.stderr.write(data); } + if (self.options.onStderr) { + self.options.onStderr(data); + } }); self.stdin = self.process.stdin; From ab3643397299fd5e2f4df9de72c078affb6228b2 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 11:51:50 -0700 Subject: [PATCH 135/283] Bump the timeout for waiting for the emulator to start On first boot, it can take more than 2 minutes. --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index f6fa3bf3a9..88fb035490 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2094,7 +2094,7 @@ _.extend(Android.prototype, { waitForEmulator: function () { var self = this; - var timeLimit = 120 * 1000; + var timeLimit = 240 * 1000; var interval = 1000; for (var i = 0; i < timeLimit / interval; i++) { Console.debug("Waiting for emulator"); From 9be657f8624399a27049e87503dcc2a9f774dd90 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 12:30:57 -0700 Subject: [PATCH 136/283] Update checkout apps to the head of official track by default --- tools/commands-packages.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 217040bb98..f9db611d7b 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1596,6 +1596,13 @@ var maybeUpdateRelease = function (options) { return catalog.official.getReleaseVersion(appTrack, appVersion); }); var appOrderKey = (appReleaseInfo && appReleaseInfo.orderKey) || null; + + // If on a 'none' app, try to update it to the head of the official release + // track METEOR@. + if (appTrack === 'none') { + appTrack = 'METEOR'; + } + releaseVersionsToTry = catalog.official.getSortedRecommendedReleaseVersions( appTrack, appOrderKey); if (!releaseVersionsToTry.length) { From d07f4f1abf45e6a9553e34040203be4db30e4cf2 Mon Sep 17 00:00:00 2001 From: ekatek Date: Thu, 9 Oct 2014 13:13:37 -0700 Subject: [PATCH 137/283] do not print unstable version warning if the version is local --- tools/catalog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/catalog.js b/tools/catalog.js index 5ddb806ab9..b3e53e4f55 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -272,10 +272,11 @@ _.extend(LayeredCatalog.prototype, { var printMe = true; _.each(oldConstraints, function (oC) { _.each(oC.constraints, function (specOC) { - if (specOC.version === version) { + if (specOC.version === version || + self.isLocalPackage(package)) { printMe = false; } - }); + }); }); if (printMe) { expPackages.push({ From 000af3ad2e8822e997a261fde09294bc7e265ff6 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 12:30:57 -0700 Subject: [PATCH 138/283] Update checkout apps to the head of official track by default --- tools/commands-packages.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index c178f17ad3..2da7c720e6 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1596,6 +1596,13 @@ var maybeUpdateRelease = function (options) { return catalog.official.getReleaseVersion(appTrack, appVersion); }); var appOrderKey = (appReleaseInfo && appReleaseInfo.orderKey) || null; + + // If on a 'none' app, try to update it to the head of the official release + // track METEOR@. + if (appTrack === 'none') { + appTrack = 'METEOR'; + } + releaseVersionsToTry = catalog.official.getSortedRecommendedReleaseVersions( appTrack, appOrderKey); if (!releaseVersionsToTry.length) { From bae041b39c5b287ea8da7cd56d6f90461a34490f Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 15:22:19 -0700 Subject: [PATCH 139/283] Explicitly ban some names for Templates. Fixes the test failure on IEs because for IEs 'name' is not a magical property on functions. --- packages/templating/templating.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/templating/templating.js b/packages/templating/templating.js index e9de901ef2..ecd4007d5a 100644 --- a/packages/templating/templating.js +++ b/packages/templating/templating.js @@ -8,9 +8,15 @@ */ Template = Blaze.Template; +var RESERVED_TEMPLATE_NAMES = "__proto__ name".split(" "); + // Check for duplicate template names and illegal names that won't work. Template.__checkName = function (name) { - if (name in Template) { + // Some names can't be used for Templates. These include: + // - Properties Blaze sets on the Template object. + // - Properties that some browsers don't let the code to set. + // These are specified in RESERVED_TEMPLATE_NAMES. + if (name in Template || RESERVED_TEMPLATE_NAMES.indexOf(name) !== -1) { if ((Template[name] instanceof Template) && name !== "body") throw new Error("There are multiple templates named '" + name + "'. Each template needs a unique name."); throw new Error("This template name is reserved: " + name); From ce98ea08d5c866653ccc4ba1052a394fd4c830a3 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 15:22:19 -0700 Subject: [PATCH 140/283] Explicitly ban some names for Templates. Fixes the test failure on IEs because for IEs 'name' is not a magical property on functions. --- packages/templating/templating.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/templating/templating.js b/packages/templating/templating.js index e9de901ef2..ecd4007d5a 100644 --- a/packages/templating/templating.js +++ b/packages/templating/templating.js @@ -8,9 +8,15 @@ */ Template = Blaze.Template; +var RESERVED_TEMPLATE_NAMES = "__proto__ name".split(" "); + // Check for duplicate template names and illegal names that won't work. Template.__checkName = function (name) { - if (name in Template) { + // Some names can't be used for Templates. These include: + // - Properties Blaze sets on the Template object. + // - Properties that some browsers don't let the code to set. + // These are specified in RESERVED_TEMPLATE_NAMES. + if (name in Template || RESERVED_TEMPLATE_NAMES.indexOf(name) !== -1) { if ((Template[name] instanceof Template) && name !== "body") throw new Error("There are multiple templates named '" + name + "'. Each template needs a unique name."); throw new Error("This template name is reserved: " + name); From 96bccec0ac3e1bdc48590f9ea24b7713ca347383 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 13:28:24 -0700 Subject: [PATCH 141/283] Throttle yields, so we don't slow down in case of rapid calls to yield This restores the behavior I lost when I removed Patience --- tools/catalog.js | 7 ++++--- tools/utils.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/tools/catalog.js b/tools/catalog.js index 5ddb806ab9..abe53ca7f1 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -319,6 +319,9 @@ _.extend(LayeredCatalog.prototype, { _initializeResolver: function () { var self = this; var uniload = require('./uniload.js'); + + var yielder = new utils.ThrottledYield(); + var constraintSolverPackage = uniload.load({ packages: [ 'constraint-solver'] })['constraint-solver']; @@ -330,9 +333,7 @@ _.extend(LayeredCatalog.prototype, { utils.Patience.nudge(); buildmessage.nudge(); - // XXX: Call this more judiciously - // (I broke this when I removed Patience; need a quick fix for now) - utils.sleepMs(1); + yielder.yield(); } }); }, diff --git a/tools/utils.js b/tools/utils.js index 47fd6008ac..3eeb275875 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -638,6 +638,40 @@ _.extend(exports.Patience.prototype, { } }); + +// This is a stripped down version of Patience, that just regulates the frequency of calling yield. +// It should behave similarly to calling yield on every iteration of a loop, +// except that it won't actually yield if there hasn't been a long enough time interval +// +// options: +// interval: minimum interval of time between yield calls +// (more frequent calls are simply dropped) +// +// XXX: Have Patience use ThrottledYield +exports.ThrottledYield = function (options) { + var self = this; + + options = _.extend({ interval: 150 }, options || {}); + self.interval = options.interval; + var now = +(new Date); + + // The next yield time is interval from now. + self.nextYield = now + self.interval; +}; + +_.extend(exports.ThrottledYield.prototype, { + yield: function () { + var self = this; + var now = +(new Date); + + if (now >= self.nextYield) { + self.nextYield = now + self.interval; + utils.sleepMs(1); + } + } +}); + + // Are we running on device? exports.runOnDevice = function (options) { return !! _.intersection(options.args, From f00643dbaeacd1b237414c452ce22453a4b6d819 Mon Sep 17 00:00:00 2001 From: ekatek Date: Thu, 9 Oct 2014 16:26:19 -0700 Subject: [PATCH 142/283] move the check for local package up --- tools/catalog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/catalog.js b/tools/catalog.js index b3e53e4f55..e662224b94 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -265,6 +265,8 @@ _.extend(LayeredCatalog.prototype, { if (ret["usedRCs"]) { var expPackages = []; _.each(ret.answer, function(version, package) { + if (self.isLocalPackage(package)) + return; if (version.split('-').length > 1) { if (!(resolverOpts.previousSolution && resolverOpts.previousSolution[package] === version)) { @@ -272,8 +274,7 @@ _.extend(LayeredCatalog.prototype, { var printMe = true; _.each(oldConstraints, function (oC) { _.each(oC.constraints, function (specOC) { - if (specOC.version === version || - self.isLocalPackage(package)) { + if (specOC.version === version) { printMe = false; } }); From 38b437b6764814f860727385eed9181a55f54eaf Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 16:28:15 -0700 Subject: [PATCH 143/283] Update todos to newest code with touchwipe --- examples/todos/.meteor/packages | 1 - examples/todos/.meteor/versions | 118 +- examples/todos/client/lib/hammer.js | 2463 ----------------- examples/todos/client/lib/jquery.touchwipe.js | 82 + examples/todos/client/templates/app-body.html | 2 +- examples/todos/client/templates/app-body.js | 27 +- 6 files changed, 149 insertions(+), 2544 deletions(-) delete mode 100644 examples/todos/client/lib/hammer.js create mode 100644 examples/todos/client/lib/jquery.touchwipe.js diff --git a/examples/todos/.meteor/packages b/examples/todos/.meteor/packages index da825e90c6..584b918846 100644 --- a/examples/todos/.meteor/packages +++ b/examples/todos/.meteor/packages @@ -8,4 +8,3 @@ insecure less iron:router accounts-password -fastclick diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index 207ecba4d6..c929f6de6b 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -1,64 +1,64 @@ -accounts-base@1.1.2-pre.2 -accounts-password@1.0.3-pre.2 -application-configuration@1.0.3-pre.2 -autoupdate@1.1.2-pre.4 -base64@1.0.1-pre.2 -binary-heap@1.0.1-pre.2 -blaze-tools@1.0.1-pre.2 -blaze@2.0.2-pre.2 -boilerplate-generator@1.0.1-pre.4 -callback-hook@1.0.1-pre.2 -check@1.0.2-pre.2 -ctl-helper@1.0.4-pre.2 -ctl@1.0.2-pre.2 -ddp@1.0.10-pre.2 -deps@1.0.5-pre.2 -ejson@1.0.4-pre.2 -email@1.0.4-pre.2 -fastclick@1.0.1-pre.3 -follower-livedata@1.0.2-pre.2 -geojson-utils@1.0.1-pre.2 -html-tools@1.0.2-pre.2 -htmljs@1.0.2-pre.3 -http@1.0.7-pre.2 -id-map@1.0.1-pre.2 -insecure@1.0.1-pre.2 +accounts-base@1.1.2-rc.0 +accounts-password@1.0.3-rc.0 +application-configuration@1.0.3-rc.0 +autoupdate@1.1.2-rc.0 +base64@1.0.1-rc.0 +binary-heap@1.0.1-rc.0 +blaze-tools@1.0.1-rc.0 +blaze@2.0.2-rc.0 +boilerplate-generator@1.0.1-rc.0 +callback-hook@1.0.1-rc.0 +check@1.0.2-rc.0 +ctl-helper@1.0.4-rc.0 +ctl@1.0.2-rc.0 +ddp@1.0.10-rc.0 +deps@1.0.5-rc.0 +ejson@1.0.4-rc.0 +email@1.0.4-rc.0 +fastclick@1.0.1-rc.0 +follower-livedata@1.0.2-rc.0 +geojson-utils@1.0.1-rc.0 +html-tools@1.0.2-rc.0 +htmljs@1.0.2-rc.0 +http@1.0.7-rc.0 +id-map@1.0.1-rc.0 +insecure@1.0.1-rc.0 iron:core@0.3.4 iron:dynamic-template@0.4.1 iron:layout@0.4.1 iron:router@0.9.4 -jquery@1.0.1-pre.2 -json@1.0.1-pre.2 -less@1.0.10-pre.3 -livedata@1.0.11-pre.2 -localstorage@1.0.1-pre.2 -logging@1.0.4-pre.2 -meteor-platform@1.1.2-pre.4 -meteor@1.1.2-pre.3 -minifiers@1.1.1-pre.2 -minimongo@1.0.4-pre.3 -mobile-status-bar@1.0.1-pre.2 -mongo@1.0.7-pre.2 +jquery@1.0.1-rc.0 +json@1.0.1-rc.0 +less@1.0.10-rc.0 +livedata@1.0.11-rc.0 +localstorage@1.0.1-rc.0 +logging@1.0.4-rc.0 +meteor-platform@1.1.2-rc.0 +meteor@1.1.2-rc.1 +minifiers@1.1.1-rc.0 +minimongo@1.0.4-rc.0 +mobile-status-bar@1.0.1-rc.0 +mongo@1.0.7-rc.0 npm-bcrypt@0.7.7 -observe-sequence@1.0.3-pre.2 -ordered-dict@1.0.1-pre.2 -random@1.0.1-pre.2 -reactive-dict@1.0.4-pre.2 -reactive-var@1.0.3-pre.2 -reload@1.1.1-pre.2 -retry@1.0.1-pre.2 -routepolicy@1.0.2-pre.2 -service-configuration@1.0.2-pre.2 -session@1.0.3-pre.2 -sha@1.0.1-pre.2 -spacebars-compiler@1.0.3-pre.2 -spacebars@1.0.3-pre.2 -srp@1.0.1-pre.1 -standard-app-packages@1.0.3-pre.2 -templating@1.0.8-pre.3 -tracker@1.0.3-pre.2 -ui@1.0.4-pre.2 -underscore@1.0.1-pre.2 -url@1.0.1-pre.2 -webapp-hashing@1.0.1-pre.2 -webapp@1.1.3-pre.3 +observe-sequence@1.0.3-rc.0 +ordered-dict@1.0.1-rc.0 +random@1.0.1-rc.0 +reactive-dict@1.0.4-rc.0 +reactive-var@1.0.3-rc.0 +reload@1.1.1-rc.0 +retry@1.0.1-rc.0 +routepolicy@1.0.2-rc.0 +service-configuration@1.0.2-rc.0 +session@1.0.3-rc.0 +sha@1.0.1-rc.0 +spacebars-compiler@1.0.3-rc.0 +spacebars@1.0.3-rc.0 +srp@1.0.1-rc.0 +standard-app-packages@1.0.3-rc.0 +templating@1.0.8-rc.0 +tracker@1.0.3-rc.0 +ui@1.0.4-rc.0 +underscore@1.0.1-rc.0 +url@1.0.1-rc.0 +webapp-hashing@1.0.1-rc.0 +webapp@1.1.3-rc.0 diff --git a/examples/todos/client/lib/hammer.js b/examples/todos/client/lib/hammer.js deleted file mode 100644 index 5226688998..0000000000 --- a/examples/todos/client/lib/hammer.js +++ /dev/null @@ -1,2463 +0,0 @@ -/*! Hammer.JS - v2.0.4 - 2014-09-28 - * http://hammerjs.github.io/ - * - * Copyright (c) 2014 Jorik Tangelder; - * Licensed under the MIT license */ -(function(window, document, exportName, undefined) { - 'use strict'; - -var VENDOR_PREFIXES = ['', 'webkit', 'moz', 'MS', 'ms', 'o']; -var TEST_ELEMENT = document.createElement('div'); - -var TYPE_FUNCTION = 'function'; - -var round = Math.round; -var abs = Math.abs; -var now = Date.now; - -/** - * set a timeout with a given scope - * @param {Function} fn - * @param {Number} timeout - * @param {Object} context - * @returns {number} - */ -function setTimeoutContext(fn, timeout, context) { - return setTimeout(bindFn(fn, context), timeout); -} - -/** - * if the argument is an array, we want to execute the fn on each entry - * if it aint an array we don't want to do a thing. - * this is used by all the methods that accept a single and array argument. - * @param {*|Array} arg - * @param {String} fn - * @param {Object} [context] - * @returns {Boolean} - */ -function invokeArrayArg(arg, fn, context) { - if (Array.isArray(arg)) { - each(arg, context[fn], context); - return true; - } - return false; -} - -/** - * walk objects and arrays - * @param {Object} obj - * @param {Function} iterator - * @param {Object} context - */ -function each(obj, iterator, context) { - var i; - - if (!obj) { - return; - } - - if (obj.forEach) { - obj.forEach(iterator, context); - } else if (obj.length !== undefined) { - i = 0; - while (i < obj.length) { - iterator.call(context, obj[i], i, obj); - i++; - } - } else { - for (i in obj) { - obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); - } - } -} - -/** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} dest - * @param {Object} src - * @param {Boolean} [merge] - * @returns {Object} dest - */ -function extend(dest, src, merge) { - var keys = Object.keys(src); - var i = 0; - while (i < keys.length) { - if (!merge || (merge && dest[keys[i]] === undefined)) { - dest[keys[i]] = src[keys[i]]; - } - i++; - } - return dest; -} - -/** - * merge the values from src in the dest. - * means that properties that exist in dest will not be overwritten by src - * @param {Object} dest - * @param {Object} src - * @returns {Object} dest - */ -function merge(dest, src) { - return extend(dest, src, true); -} - -/** - * simple class inheritance - * @param {Function} child - * @param {Function} base - * @param {Object} [properties] - */ -function inherit(child, base, properties) { - var baseP = base.prototype, - childP; - - childP = child.prototype = Object.create(baseP); - childP.constructor = child; - childP._super = baseP; - - if (properties) { - extend(childP, properties); - } -} - -/** - * simple function bind - * @param {Function} fn - * @param {Object} context - * @returns {Function} - */ -function bindFn(fn, context) { - return function boundFn() { - return fn.apply(context, arguments); - }; -} - -/** - * let a boolean value also be a function that must return a boolean - * this first item in args will be used as the context - * @param {Boolean|Function} val - * @param {Array} [args] - * @returns {Boolean} - */ -function boolOrFn(val, args) { - if (typeof val == TYPE_FUNCTION) { - return val.apply(args ? args[0] || undefined : undefined, args); - } - return val; -} - -/** - * use the val2 when val1 is undefined - * @param {*} val1 - * @param {*} val2 - * @returns {*} - */ -function ifUndefined(val1, val2) { - return (val1 === undefined) ? val2 : val1; -} - -/** - * addEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function addEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.addEventListener(type, handler, false); - }); -} - -/** - * removeEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function removeEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.removeEventListener(type, handler, false); - }); -} - -/** - * find if a node is in the given parent - * @method hasParent - * @param {HTMLElement} node - * @param {HTMLElement} parent - * @return {Boolean} found - */ -function hasParent(node, parent) { - while (node) { - if (node == parent) { - return true; - } - node = node.parentNode; - } - return false; -} - -/** - * small indexOf wrapper - * @param {String} str - * @param {String} find - * @returns {Boolean} found - */ -function inStr(str, find) { - return str.indexOf(find) > -1; -} - -/** - * split string on whitespace - * @param {String} str - * @returns {Array} words - */ -function splitStr(str) { - return str.trim().split(/\s+/g); -} - -/** - * find if a array contains the object using indexOf or a simple polyFill - * @param {Array} src - * @param {String} find - * @param {String} [findByKey] - * @return {Boolean|Number} false when not found, or the index - */ -function inArray(src, find, findByKey) { - if (src.indexOf && !findByKey) { - return src.indexOf(find); - } else { - var i = 0; - while (i < src.length) { - if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { - return i; - } - i++; - } - return -1; - } -} - -/** - * convert array-like objects to real arrays - * @param {Object} obj - * @returns {Array} - */ -function toArray(obj) { - return Array.prototype.slice.call(obj, 0); -} - -/** - * unique array with objects based on a key (like 'id') or just by the array's value - * @param {Array} src [{id:1},{id:2},{id:1}] - * @param {String} [key] - * @param {Boolean} [sort=False] - * @returns {Array} [{id:1},{id:2}] - */ -function uniqueArray(src, key, sort) { - var results = []; - var values = []; - var i = 0; - - while (i < src.length) { - var val = key ? src[i][key] : src[i]; - if (inArray(values, val) < 0) { - results.push(src[i]); - } - values[i] = val; - i++; - } - - if (sort) { - if (!key) { - results = results.sort(); - } else { - results = results.sort(function sortUniqueArray(a, b) { - return a[key] > b[key]; - }); - } - } - - return results; -} - -/** - * get the prefixed property - * @param {Object} obj - * @param {String} property - * @returns {String|Undefined} prefixed - */ -function prefixed(obj, property) { - var prefix, prop; - var camelProp = property[0].toUpperCase() + property.slice(1); - - var i = 0; - while (i < VENDOR_PREFIXES.length) { - prefix = VENDOR_PREFIXES[i]; - prop = (prefix) ? prefix + camelProp : property; - - if (prop in obj) { - return prop; - } - i++; - } - return undefined; -} - -/** - * get a unique id - * @returns {number} uniqueId - */ -var _uniqueId = 1; -function uniqueId() { - return _uniqueId++; -} - -/** - * get the window object of an element - * @param {HTMLElement} element - * @returns {DocumentView|Window} - */ -function getWindowForElement(element) { - var doc = element.ownerDocument; - return (doc.defaultView || doc.parentWindow); -} - -var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; - -var SUPPORT_TOUCH = ('ontouchstart' in window); -var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; -var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); - -var INPUT_TYPE_TOUCH = 'touch'; -var INPUT_TYPE_PEN = 'pen'; -var INPUT_TYPE_MOUSE = 'mouse'; -var INPUT_TYPE_KINECT = 'kinect'; - -var COMPUTE_INTERVAL = 25; - -var INPUT_START = 1; -var INPUT_MOVE = 2; -var INPUT_END = 4; -var INPUT_CANCEL = 8; - -var DIRECTION_NONE = 1; -var DIRECTION_LEFT = 2; -var DIRECTION_RIGHT = 4; -var DIRECTION_UP = 8; -var DIRECTION_DOWN = 16; - -var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; -var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; -var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; - -var PROPS_XY = ['x', 'y']; -var PROPS_CLIENT_XY = ['clientX', 'clientY']; - -/** - * create new input type manager - * @param {Manager} manager - * @param {Function} callback - * @returns {Input} - * @constructor - */ -function Input(manager, callback) { - var self = this; - this.manager = manager; - this.callback = callback; - this.element = manager.element; - this.target = manager.options.inputTarget; - - // smaller wrapper around the handler, for the scope and the enabled state of the manager, - // so when disabled the input events are completely bypassed. - this.domHandler = function(ev) { - if (boolOrFn(manager.options.enable, [manager])) { - self.handler(ev); - } - }; - - this.init(); - -} - -Input.prototype = { - /** - * should handle the inputEvent data and trigger the callback - * @virtual - */ - handler: function() { }, - - /** - * bind the events - */ - init: function() { - this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - }, - - /** - * unbind the events - */ - destroy: function() { - this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - } -}; - -/** - * create new input type manager - * called by the Manager constructor - * @param {Hammer} manager - * @returns {Input} - */ -function createInputInstance(manager) { - var Type; - var inputClass = manager.options.inputClass; - - if (inputClass) { - Type = inputClass; - } else if (SUPPORT_POINTER_EVENTS) { - Type = PointerEventInput; - } else if (SUPPORT_ONLY_TOUCH) { - Type = TouchInput; - } else if (!SUPPORT_TOUCH) { - Type = MouseInput; - } else { - Type = TouchMouseInput; - } - return new (Type)(manager, inputHandler); -} - -/** - * handle input events - * @param {Manager} manager - * @param {String} eventType - * @param {Object} input - */ -function inputHandler(manager, eventType, input) { - var pointersLen = input.pointers.length; - var changedPointersLen = input.changedPointers.length; - var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); - var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); - - input.isFirst = !!isFirst; - input.isFinal = !!isFinal; - - if (isFirst) { - manager.session = {}; - } - - // source event is the normalized value of the domEvents - // like 'touchstart, mouseup, pointerdown' - input.eventType = eventType; - - // compute scale, rotation etc - computeInputData(manager, input); - - // emit secret event - manager.emit('hammer.input', input); - - manager.recognize(input); - manager.session.prevInput = input; -} - -/** - * extend the data with some usable properties like scale, rotate, velocity etc - * @param {Object} manager - * @param {Object} input - */ -function computeInputData(manager, input) { - var session = manager.session; - var pointers = input.pointers; - var pointersLength = pointers.length; - - // store the first input to calculate the distance and direction - if (!session.firstInput) { - session.firstInput = simpleCloneInputData(input); - } - - // to compute scale and rotation we need to store the multiple touches - if (pointersLength > 1 && !session.firstMultiple) { - session.firstMultiple = simpleCloneInputData(input); - } else if (pointersLength === 1) { - session.firstMultiple = false; - } - - var firstInput = session.firstInput; - var firstMultiple = session.firstMultiple; - var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; - - var center = input.center = getCenter(pointers); - input.timeStamp = now(); - input.deltaTime = input.timeStamp - firstInput.timeStamp; - - input.angle = getAngle(offsetCenter, center); - input.distance = getDistance(offsetCenter, center); - - computeDeltaXY(session, input); - input.offsetDirection = getDirection(input.deltaX, input.deltaY); - - input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; - input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; - - computeIntervalInputData(session, input); - - // find the correct target - var target = manager.element; - if (hasParent(input.srcEvent.target, target)) { - target = input.srcEvent.target; - } - input.target = target; -} - -function computeDeltaXY(session, input) { - var center = input.center; - var offset = session.offsetDelta || {}; - var prevDelta = session.prevDelta || {}; - var prevInput = session.prevInput || {}; - - if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { - prevDelta = session.prevDelta = { - x: prevInput.deltaX || 0, - y: prevInput.deltaY || 0 - }; - - offset = session.offsetDelta = { - x: center.x, - y: center.y - }; - } - - input.deltaX = prevDelta.x + (center.x - offset.x); - input.deltaY = prevDelta.y + (center.y - offset.y); -} - -/** - * velocity is calculated every x ms - * @param {Object} session - * @param {Object} input - */ -function computeIntervalInputData(session, input) { - var last = session.lastInterval || input, - deltaTime = input.timeStamp - last.timeStamp, - velocity, velocityX, velocityY, direction; - - if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { - var deltaX = last.deltaX - input.deltaX; - var deltaY = last.deltaY - input.deltaY; - - var v = getVelocity(deltaTime, deltaX, deltaY); - velocityX = v.x; - velocityY = v.y; - velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; - direction = getDirection(deltaX, deltaY); - - session.lastInterval = input; - } else { - // use latest velocity info if it doesn't overtake a minimum period - velocity = last.velocity; - velocityX = last.velocityX; - velocityY = last.velocityY; - direction = last.direction; - } - - input.velocity = velocity; - input.velocityX = velocityX; - input.velocityY = velocityY; - input.direction = direction; -} - -/** - * create a simple clone from the input used for storage of firstInput and firstMultiple - * @param {Object} input - * @returns {Object} clonedInputData - */ -function simpleCloneInputData(input) { - // make a simple copy of the pointers because we will get a reference if we don't - // we only need clientXY for the calculations - var pointers = []; - var i = 0; - while (i < input.pointers.length) { - pointers[i] = { - clientX: round(input.pointers[i].clientX), - clientY: round(input.pointers[i].clientY) - }; - i++; - } - - return { - timeStamp: now(), - pointers: pointers, - center: getCenter(pointers), - deltaX: input.deltaX, - deltaY: input.deltaY - }; -} - -/** - * get the center of all the pointers - * @param {Array} pointers - * @return {Object} center contains `x` and `y` properties - */ -function getCenter(pointers) { - var pointersLength = pointers.length; - - // no need to loop when only one touch - if (pointersLength === 1) { - return { - x: round(pointers[0].clientX), - y: round(pointers[0].clientY) - }; - } - - var x = 0, y = 0, i = 0; - while (i < pointersLength) { - x += pointers[i].clientX; - y += pointers[i].clientY; - i++; - } - - return { - x: round(x / pointersLength), - y: round(y / pointersLength) - }; -} - -/** - * calculate the velocity between two points. unit is in px per ms. - * @param {Number} deltaTime - * @param {Number} x - * @param {Number} y - * @return {Object} velocity `x` and `y` - */ -function getVelocity(deltaTime, x, y) { - return { - x: x / deltaTime || 0, - y: y / deltaTime || 0 - }; -} - -/** - * get the direction between two points - * @param {Number} x - * @param {Number} y - * @return {Number} direction - */ -function getDirection(x, y) { - if (x === y) { - return DIRECTION_NONE; - } - - if (abs(x) >= abs(y)) { - return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; - } - return y > 0 ? DIRECTION_UP : DIRECTION_DOWN; -} - -/** - * calculate the absolute distance between two points - * @param {Object} p1 {x, y} - * @param {Object} p2 {x, y} - * @param {Array} [props] containing x and y keys - * @return {Number} distance - */ -function getDistance(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - - return Math.sqrt((x * x) + (y * y)); -} - -/** - * calculate the angle between two coordinates - * @param {Object} p1 - * @param {Object} p2 - * @param {Array} [props] containing x and y keys - * @return {Number} angle - */ -function getAngle(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - return Math.atan2(y, x) * 180 / Math.PI; -} - -/** - * calculate the rotation degrees between two pointersets - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} rotation - */ -function getRotation(start, end) { - return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY); -} - -/** - * calculate the scale factor between two pointersets - * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} scale - */ -function getScale(start, end) { - return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); -} - -var MOUSE_INPUT_MAP = { - mousedown: INPUT_START, - mousemove: INPUT_MOVE, - mouseup: INPUT_END -}; - -var MOUSE_ELEMENT_EVENTS = 'mousedown'; -var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; - -/** - * Mouse events input - * @constructor - * @extends Input - */ -function MouseInput() { - this.evEl = MOUSE_ELEMENT_EVENTS; - this.evWin = MOUSE_WINDOW_EVENTS; - - this.allow = true; // used by Input.TouchMouse to disable mouse events - this.pressed = false; // mousedown state - - Input.apply(this, arguments); -} - -inherit(MouseInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function MEhandler(ev) { - var eventType = MOUSE_INPUT_MAP[ev.type]; - - // on start we want to have the left mouse button down - if (eventType & INPUT_START && ev.button === 0) { - this.pressed = true; - } - - if (eventType & INPUT_MOVE && ev.which !== 1) { - eventType = INPUT_END; - } - - // mouse must be down, and mouse events are allowed (see the TouchMouse input) - if (!this.pressed || !this.allow) { - return; - } - - if (eventType & INPUT_END) { - this.pressed = false; - } - - this.callback(this.manager, eventType, { - pointers: [ev], - changedPointers: [ev], - pointerType: INPUT_TYPE_MOUSE, - srcEvent: ev - }); - } -}); - -var POINTER_INPUT_MAP = { - pointerdown: INPUT_START, - pointermove: INPUT_MOVE, - pointerup: INPUT_END, - pointercancel: INPUT_CANCEL, - pointerout: INPUT_CANCEL -}; - -// in IE10 the pointer types is defined as an enum -var IE10_POINTER_TYPE_ENUM = { - 2: INPUT_TYPE_TOUCH, - 3: INPUT_TYPE_PEN, - 4: INPUT_TYPE_MOUSE, - 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 -}; - -var POINTER_ELEMENT_EVENTS = 'pointerdown'; -var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; - -// IE10 has prefixed support, and case-sensitive -if (window.MSPointerEvent) { - POINTER_ELEMENT_EVENTS = 'MSPointerDown'; - POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; -} - -/** - * Pointer events input - * @constructor - * @extends Input - */ -function PointerEventInput() { - this.evEl = POINTER_ELEMENT_EVENTS; - this.evWin = POINTER_WINDOW_EVENTS; - - Input.apply(this, arguments); - - this.store = (this.manager.session.pointerEvents = []); -} - -inherit(PointerEventInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function PEhandler(ev) { - var store = this.store; - var removePointer = false; - - var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); - var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; - var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - - var isTouch = (pointerType == INPUT_TYPE_TOUCH); - - // get index of the event in the store - var storeIndex = inArray(store, ev.pointerId, 'pointerId'); - - // start and mouse must be down - if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { - if (storeIndex < 0) { - store.push(ev); - storeIndex = store.length - 1; - } - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - removePointer = true; - } - - // it not found, so the pointer hasn't been down (so it's probably a hover) - if (storeIndex < 0) { - return; - } - - // update the event in the store - store[storeIndex] = ev; - - this.callback(this.manager, eventType, { - pointers: store, - changedPointers: [ev], - pointerType: pointerType, - srcEvent: ev - }); - - if (removePointer) { - // remove from the store - store.splice(storeIndex, 1); - } - } -}); - -var SINGLE_TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; -var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Touch events input - * @constructor - * @extends Input - */ -function SingleTouchInput() { - this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; - this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; - this.started = false; - - Input.apply(this, arguments); -} - -inherit(SingleTouchInput, Input, { - handler: function TEhandler(ev) { - var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; - - // should we handle the touch events? - if (type === INPUT_START) { - this.started = true; - } - - if (!this.started) { - return; - } - - var touches = normalizeSingleTouches.call(this, ev, type); - - // when done, reset the started state - if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { - this.started = false; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function normalizeSingleTouches(ev, type) { - var all = toArray(ev.touches); - var changed = toArray(ev.changedTouches); - - if (type & (INPUT_END | INPUT_CANCEL)) { - all = uniqueArray(all.concat(changed), 'identifier', true); - } - - return [all, changed]; -} - -var TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Multi-user touch events input - * @constructor - * @extends Input - */ -function TouchInput() { - this.evTarget = TOUCH_TARGET_EVENTS; - this.targetIds = {}; - - Input.apply(this, arguments); -} - -inherit(TouchInput, Input, { - handler: function MTEhandler(ev) { - var type = TOUCH_INPUT_MAP[ev.type]; - var touches = getTouches.call(this, ev, type); - if (!touches) { - return; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function getTouches(ev, type) { - var allTouches = toArray(ev.touches); - var targetIds = this.targetIds; - - // when there is only one touch, the process can be simplified - if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { - targetIds[allTouches[0].identifier] = true; - return [allTouches, allTouches]; - } - - var i, - targetTouches, - changedTouches = toArray(ev.changedTouches), - changedTargetTouches = [], - target = this.target; - - // get target touches from touches - targetTouches = allTouches.filter(function(touch) { - return hasParent(touch.target, target); - }); - - // collect touches - if (type === INPUT_START) { - i = 0; - while (i < targetTouches.length) { - targetIds[targetTouches[i].identifier] = true; - i++; - } - } - - // filter changed touches to only contain touches that exist in the collected target ids - i = 0; - while (i < changedTouches.length) { - if (targetIds[changedTouches[i].identifier]) { - changedTargetTouches.push(changedTouches[i]); - } - - // cleanup removed touches - if (type & (INPUT_END | INPUT_CANCEL)) { - delete targetIds[changedTouches[i].identifier]; - } - i++; - } - - if (!changedTargetTouches.length) { - return; - } - - return [ - // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' - uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), - changedTargetTouches - ]; -} - -/** - * Combined touch and mouse input - * - * Touch has a higher priority then mouse, and while touching no mouse events are allowed. - * This because touch devices also emit mouse events while doing a touch. - * - * @constructor - * @extends Input - */ -function TouchMouseInput() { - Input.apply(this, arguments); - - var handler = bindFn(this.handler, this); - this.touch = new TouchInput(this.manager, handler); - this.mouse = new MouseInput(this.manager, handler); -} - -inherit(TouchMouseInput, Input, { - /** - * handle mouse and touch events - * @param {Hammer} manager - * @param {String} inputEvent - * @param {Object} inputData - */ - handler: function TMEhandler(manager, inputEvent, inputData) { - var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), - isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); - - // when we're in a touch event, so block all upcoming mouse events - // most mobile browser also emit mouseevents, right after touchstart - if (isTouch) { - this.mouse.allow = false; - } else if (isMouse && !this.mouse.allow) { - return; - } - - // reset the allowMouse when we're done - if (inputEvent & (INPUT_END | INPUT_CANCEL)) { - this.mouse.allow = true; - } - - this.callback(manager, inputEvent, inputData); - }, - - /** - * remove the event listeners - */ - destroy: function destroy() { - this.touch.destroy(); - this.mouse.destroy(); - } -}); - -var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); -var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; - -// magical touchAction value -var TOUCH_ACTION_COMPUTE = 'compute'; -var TOUCH_ACTION_AUTO = 'auto'; -var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented -var TOUCH_ACTION_NONE = 'none'; -var TOUCH_ACTION_PAN_X = 'pan-x'; -var TOUCH_ACTION_PAN_Y = 'pan-y'; - -/** - * Touch Action - * sets the touchAction property or uses the js alternative - * @param {Manager} manager - * @param {String} value - * @constructor - */ -function TouchAction(manager, value) { - this.manager = manager; - this.set(value); -} - -TouchAction.prototype = { - /** - * set the touchAction value on the element or enable the polyfill - * @param {String} value - */ - set: function(value) { - // find out the touch-action by the event handlers - if (value == TOUCH_ACTION_COMPUTE) { - value = this.compute(); - } - - if (NATIVE_TOUCH_ACTION) { - this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; - } - this.actions = value.toLowerCase().trim(); - }, - - /** - * just re-set the touchAction value - */ - update: function() { - this.set(this.manager.options.touchAction); - }, - - /** - * compute the value for the touchAction property based on the recognizer's settings - * @returns {String} value - */ - compute: function() { - var actions = []; - each(this.manager.recognizers, function(recognizer) { - if (boolOrFn(recognizer.options.enable, [recognizer])) { - actions = actions.concat(recognizer.getTouchAction()); - } - }); - return cleanTouchActions(actions.join(' ')); - }, - - /** - * this method is called on each input cycle and provides the preventing of the browser behavior - * @param {Object} input - */ - preventDefaults: function(input) { - // not needed with native support for the touchAction property - if (NATIVE_TOUCH_ACTION) { - return; - } - - var srcEvent = input.srcEvent; - var direction = input.offsetDirection; - - // if the touch action did prevented once this session - if (this.manager.session.prevented) { - srcEvent.preventDefault(); - return; - } - - var actions = this.actions; - var hasNone = inStr(actions, TOUCH_ACTION_NONE); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - - if (hasNone || - (hasPanY && direction & DIRECTION_HORIZONTAL) || - (hasPanX && direction & DIRECTION_VERTICAL)) { - return this.preventSrc(srcEvent); - } - }, - - /** - * call preventDefault to prevent the browser's default behavior (scrolling in most cases) - * @param {Object} srcEvent - */ - preventSrc: function(srcEvent) { - this.manager.session.prevented = true; - srcEvent.preventDefault(); - } -}; - -/** - * when the touchActions are collected they are not a valid value, so we need to clean things up. * - * @param {String} actions - * @returns {*} - */ -function cleanTouchActions(actions) { - // none - if (inStr(actions, TOUCH_ACTION_NONE)) { - return TOUCH_ACTION_NONE; - } - - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - - // pan-x and pan-y can be combined - if (hasPanX && hasPanY) { - return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y; - } - - // pan-x OR pan-y - if (hasPanX || hasPanY) { - return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; - } - - // manipulation - if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { - return TOUCH_ACTION_MANIPULATION; - } - - return TOUCH_ACTION_AUTO; -} - -/** - * Recognizer flow explained; * - * All recognizers have the initial state of POSSIBLE when a input session starts. - * The definition of a input session is from the first input until the last input, with all it's movement in it. * - * Example session for mouse-input: mousedown -> mousemove -> mouseup - * - * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed - * which determines with state it should be. - * - * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to - * POSSIBLE to give it another change on the next cycle. - * - * Possible - * | - * +-----+---------------+ - * | | - * +-----+-----+ | - * | | | - * Failed Cancelled | - * +-------+------+ - * | | - * Recognized Began - * | - * Changed - * | - * Ended/Recognized - */ -var STATE_POSSIBLE = 1; -var STATE_BEGAN = 2; -var STATE_CHANGED = 4; -var STATE_ENDED = 8; -var STATE_RECOGNIZED = STATE_ENDED; -var STATE_CANCELLED = 16; -var STATE_FAILED = 32; - -/** - * Recognizer - * Every recognizer needs to extend from this class. - * @constructor - * @param {Object} options - */ -function Recognizer(options) { - this.id = uniqueId(); - - this.manager = null; - this.options = merge(options || {}, this.defaults); - - // default is enable true - this.options.enable = ifUndefined(this.options.enable, true); - - this.state = STATE_POSSIBLE; - - this.simultaneous = {}; - this.requireFail = []; -} - -Recognizer.prototype = { - /** - * @virtual - * @type {Object} - */ - defaults: {}, - - /** - * set options - * @param {Object} options - * @return {Recognizer} - */ - set: function(options) { - extend(this.options, options); - - // also update the touchAction, in case something changed about the directions/enabled state - this.manager && this.manager.touchAction.update(); - return this; - }, - - /** - * recognize simultaneous with an other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - recognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { - return this; - } - - var simultaneous = this.simultaneous; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (!simultaneous[otherRecognizer.id]) { - simultaneous[otherRecognizer.id] = otherRecognizer; - otherRecognizer.recognizeWith(this); - } - return this; - }, - - /** - * drop the simultaneous link. it doesnt remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRecognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - delete this.simultaneous[otherRecognizer.id]; - return this; - }, - - /** - * recognizer can only run when an other is failing - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - requireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { - return this; - } - - var requireFail = this.requireFail; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (inArray(requireFail, otherRecognizer) === -1) { - requireFail.push(otherRecognizer); - otherRecognizer.requireFailure(this); - } - return this; - }, - - /** - * drop the requireFailure link. it does not remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRequireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - var index = inArray(this.requireFail, otherRecognizer); - if (index > -1) { - this.requireFail.splice(index, 1); - } - return this; - }, - - /** - * has require failures boolean - * @returns {boolean} - */ - hasRequireFailures: function() { - return this.requireFail.length > 0; - }, - - /** - * if the recognizer can recognize simultaneous with an other recognizer - * @param {Recognizer} otherRecognizer - * @returns {Boolean} - */ - canRecognizeWith: function(otherRecognizer) { - return !!this.simultaneous[otherRecognizer.id]; - }, - - /** - * You should use `tryEmit` instead of `emit` directly to check - * that all the needed recognizers has failed before emitting. - * @param {Object} input - */ - emit: function(input) { - var self = this; - var state = this.state; - - function emit(withState) { - self.manager.emit(self.options.event + (withState ? stateStr(state) : ''), input); - } - - // 'panstart' and 'panmove' - if (state < STATE_ENDED) { - emit(true); - } - - emit(); // simple 'eventName' events - - // panend and pancancel - if (state >= STATE_ENDED) { - emit(true); - } - }, - - /** - * Check that all the require failure recognizers has failed, - * if true, it emits a gesture event, - * otherwise, setup the state to FAILED. - * @param {Object} input - */ - tryEmit: function(input) { - if (this.canEmit()) { - return this.emit(input); - } - // it's failing anyway - this.state = STATE_FAILED; - }, - - /** - * can we emit? - * @returns {boolean} - */ - canEmit: function() { - var i = 0; - while (i < this.requireFail.length) { - if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { - return false; - } - i++; - } - return true; - }, - - /** - * update the recognizer - * @param {Object} inputData - */ - recognize: function(inputData) { - // make a new copy of the inputData - // so we can change the inputData without messing up the other recognizers - var inputDataClone = extend({}, inputData); - - // is is enabled and allow recognizing? - if (!boolOrFn(this.options.enable, [this, inputDataClone])) { - this.reset(); - this.state = STATE_FAILED; - return; - } - - // reset when we've reached the end - if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { - this.state = STATE_POSSIBLE; - } - - this.state = this.process(inputDataClone); - - // the recognizer has recognized a gesture - // so trigger an event - if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { - this.tryEmit(inputDataClone); - } - }, - - /** - * return the state of the recognizer - * the actual recognizing happens in this method - * @virtual - * @param {Object} inputData - * @returns {Const} STATE - */ - process: function(inputData) { }, // jshint ignore:line - - /** - * return the preferred touch-action - * @virtual - * @returns {Array} - */ - getTouchAction: function() { }, - - /** - * called when the gesture isn't allowed to recognize - * like when another is being recognized or it is disabled - * @virtual - */ - reset: function() { } -}; - -/** - * get a usable string, used as event postfix - * @param {Const} state - * @returns {String} state - */ -function stateStr(state) { - if (state & STATE_CANCELLED) { - return 'cancel'; - } else if (state & STATE_ENDED) { - return 'end'; - } else if (state & STATE_CHANGED) { - return 'move'; - } else if (state & STATE_BEGAN) { - return 'start'; - } - return ''; -} - -/** - * direction cons to string - * @param {Const} direction - * @returns {String} - */ -function directionStr(direction) { - if (direction == DIRECTION_DOWN) { - return 'down'; - } else if (direction == DIRECTION_UP) { - return 'up'; - } else if (direction == DIRECTION_LEFT) { - return 'left'; - } else if (direction == DIRECTION_RIGHT) { - return 'right'; - } - return ''; -} - -/** - * get a recognizer by name if it is bound to a manager - * @param {Recognizer|String} otherRecognizer - * @param {Recognizer} recognizer - * @returns {Recognizer} - */ -function getRecognizerByNameIfManager(otherRecognizer, recognizer) { - var manager = recognizer.manager; - if (manager) { - return manager.get(otherRecognizer); - } - return otherRecognizer; -} - -/** - * This recognizer is just used as a base for the simple attribute recognizers. - * @constructor - * @extends Recognizer - */ -function AttrRecognizer() { - Recognizer.apply(this, arguments); -} - -inherit(AttrRecognizer, Recognizer, { - /** - * @namespace - * @memberof AttrRecognizer - */ - defaults: { - /** - * @type {Number} - * @default 1 - */ - pointers: 1 - }, - - /** - * Used to check if it the recognizer receives valid input, like input.distance > 10. - * @memberof AttrRecognizer - * @param {Object} input - * @returns {Boolean} recognized - */ - attrTest: function(input) { - var optionPointers = this.options.pointers; - return optionPointers === 0 || input.pointers.length === optionPointers; - }, - - /** - * Process the input and return the state for the recognizer - * @memberof AttrRecognizer - * @param {Object} input - * @returns {*} State - */ - process: function(input) { - var state = this.state; - var eventType = input.eventType; - - var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); - var isValid = this.attrTest(input); - - // on cancel input and we've recognized before, return STATE_CANCELLED - if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { - return state | STATE_CANCELLED; - } else if (isRecognized || isValid) { - if (eventType & INPUT_END) { - return state | STATE_ENDED; - } else if (!(state & STATE_BEGAN)) { - return STATE_BEGAN; - } - return state | STATE_CHANGED; - } - return STATE_FAILED; - } -}); - -/** - * Pan - * Recognized when the pointer is down and moved in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function PanRecognizer() { - AttrRecognizer.apply(this, arguments); - - this.pX = null; - this.pY = null; -} - -inherit(PanRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PanRecognizer - */ - defaults: { - event: 'pan', - threshold: 10, - pointers: 1, - direction: DIRECTION_ALL - }, - - getTouchAction: function() { - var direction = this.options.direction; - var actions = []; - if (direction & DIRECTION_HORIZONTAL) { - actions.push(TOUCH_ACTION_PAN_Y); - } - if (direction & DIRECTION_VERTICAL) { - actions.push(TOUCH_ACTION_PAN_X); - } - return actions; - }, - - directionTest: function(input) { - var options = this.options; - var hasMoved = true; - var distance = input.distance; - var direction = input.direction; - var x = input.deltaX; - var y = input.deltaY; - - // lock to axis? - if (!(direction & options.direction)) { - if (options.direction & DIRECTION_HORIZONTAL) { - direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; - hasMoved = x != this.pX; - distance = Math.abs(input.deltaX); - } else { - direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; - hasMoved = y != this.pY; - distance = Math.abs(input.deltaY); - } - } - input.direction = direction; - return hasMoved && distance > options.threshold && direction & options.direction; - }, - - attrTest: function(input) { - return AttrRecognizer.prototype.attrTest.call(this, input) && - (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); - }, - - emit: function(input) { - this.pX = input.deltaX; - this.pY = input.deltaY; - - var direction = directionStr(input.direction); - if (direction) { - this.manager.emit(this.options.event + direction, input); - } - - this._super.emit.call(this, input); - } -}); - -/** - * Pinch - * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). - * @constructor - * @extends AttrRecognizer - */ -function PinchRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(PinchRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'pinch', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); - }, - - emit: function(input) { - this._super.emit.call(this, input); - if (input.scale !== 1) { - var inOut = input.scale < 1 ? 'in' : 'out'; - this.manager.emit(this.options.event + inOut, input); - } - } -}); - -/** - * Press - * Recognized when the pointer is down for x ms without any movement. - * @constructor - * @extends Recognizer - */ -function PressRecognizer() { - Recognizer.apply(this, arguments); - - this._timer = null; - this._input = null; -} - -inherit(PressRecognizer, Recognizer, { - /** - * @namespace - * @memberof PressRecognizer - */ - defaults: { - event: 'press', - pointers: 1, - time: 500, // minimal time of the pointer to be pressed - threshold: 5 // a minimal movement is ok, but keep it low - }, - - getTouchAction: function() { - return [TOUCH_ACTION_AUTO]; - }, - - process: function(input) { - var options = this.options; - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTime = input.deltaTime > options.time; - - this._input = input; - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { - this.reset(); - } else if (input.eventType & INPUT_START) { - this.reset(); - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.time, this); - } else if (input.eventType & INPUT_END) { - return STATE_RECOGNIZED; - } - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function(input) { - if (this.state !== STATE_RECOGNIZED) { - return; - } - - if (input && (input.eventType & INPUT_END)) { - this.manager.emit(this.options.event + 'up', input); - } else { - this._input.timeStamp = now(); - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Rotate - * Recognized when two or more pointer are moving in a circular motion. - * @constructor - * @extends AttrRecognizer - */ -function RotateRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(RotateRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof RotateRecognizer - */ - defaults: { - event: 'rotate', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); - } -}); - -/** - * Swipe - * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function SwipeRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(SwipeRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof SwipeRecognizer - */ - defaults: { - event: 'swipe', - threshold: 10, - velocity: 0.65, - direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, - pointers: 1 - }, - - getTouchAction: function() { - return PanRecognizer.prototype.getTouchAction.call(this); - }, - - attrTest: function(input) { - var direction = this.options.direction; - var velocity; - - if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { - velocity = input.velocity; - } else if (direction & DIRECTION_HORIZONTAL) { - velocity = input.velocityX; - } else if (direction & DIRECTION_VERTICAL) { - velocity = input.velocityY; - } - - return this._super.attrTest.call(this, input) && - direction & input.direction && - input.distance > this.options.threshold && - abs(velocity) > this.options.velocity && input.eventType & INPUT_END; - }, - - emit: function(input) { - var direction = directionStr(input.direction); - if (direction) { - this.manager.emit(this.options.event + direction, input); - } - - this.manager.emit(this.options.event, input); - } -}); - -/** - * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur - * between the given interval and position. The delay option can be used to recognize multi-taps without firing - * a single tap. - * - * The eventData from the emitted event contains the property `tapCount`, which contains the amount of - * multi-taps being recognized. - * @constructor - * @extends Recognizer - */ -function TapRecognizer() { - Recognizer.apply(this, arguments); - - // previous time and center, - // used for tap counting - this.pTime = false; - this.pCenter = false; - - this._timer = null; - this._input = null; - this.count = 0; -} - -inherit(TapRecognizer, Recognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'tap', - pointers: 1, - taps: 1, - interval: 300, // max time between the multi-tap taps - time: 250, // max time of the pointer to be down (like finger on the screen) - threshold: 2, // a minimal movement is ok, but keep it low - posThreshold: 10 // a multi-tap can be a bit off the initial position - }, - - getTouchAction: function() { - return [TOUCH_ACTION_MANIPULATION]; - }, - - process: function(input) { - var options = this.options; - - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTouchTime = input.deltaTime < options.time; - - this.reset(); - - if ((input.eventType & INPUT_START) && (this.count === 0)) { - return this.failTimeout(); - } - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (validMovement && validTouchTime && validPointers) { - if (input.eventType != INPUT_END) { - return this.failTimeout(); - } - - var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; - var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; - - this.pTime = input.timeStamp; - this.pCenter = input.center; - - if (!validMultiTap || !validInterval) { - this.count = 1; - } else { - this.count += 1; - } - - this._input = input; - - // if tap count matches we have recognized it, - // else it has began recognizing... - var tapCount = this.count % options.taps; - if (tapCount === 0) { - // no failing requirements, immediately trigger the tap event - // or wait as long as the multitap interval to trigger - if (!this.hasRequireFailures()) { - return STATE_RECOGNIZED; - } else { - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.interval, this); - return STATE_BEGAN; - } - } - } - return STATE_FAILED; - }, - - failTimeout: function() { - this._timer = setTimeoutContext(function() { - this.state = STATE_FAILED; - }, this.options.interval, this); - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function() { - if (this.state == STATE_RECOGNIZED ) { - this._input.tapCount = this.count; - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Simple way to create an manager with a default set of recognizers. - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Hammer(element, options) { - options = options || {}; - options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); - return new Manager(element, options); -} - -/** - * @const {string} - */ -Hammer.VERSION = '2.0.4'; - -/** - * default settings - * @namespace - */ -Hammer.defaults = { - /** - * set if DOM events are being triggered. - * But this is slower and unused by simple implementations, so disabled by default. - * @type {Boolean} - * @default false - */ - domEvents: false, - - /** - * The value for the touchAction property/fallback. - * When set to `compute` it will magically set the correct value based on the added recognizers. - * @type {String} - * @default compute - */ - touchAction: TOUCH_ACTION_COMPUTE, - - /** - * @type {Boolean} - * @default true - */ - enable: true, - - /** - * EXPERIMENTAL FEATURE -- can be removed/changed - * Change the parent input target element. - * If Null, then it is being set the to main element. - * @type {Null|EventTarget} - * @default null - */ - inputTarget: null, - - /** - * force an input class - * @type {Null|Function} - * @default null - */ - inputClass: null, - - /** - * Default recognizer setup when calling `Hammer()` - * When creating a new Manager these will be skipped. - * @type {Array} - */ - preset: [ - // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] - [RotateRecognizer, { enable: false }], - [PinchRecognizer, { enable: false }, ['rotate']], - [SwipeRecognizer,{ direction: DIRECTION_HORIZONTAL }], - [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], - [TapRecognizer], - [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], - [PressRecognizer] - ], - - /** - * Some CSS properties can be used to improve the working of Hammer. - * Add them to this method and they will be set when creating a new Manager. - * @namespace - */ - cssProps: { - /** - * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userSelect: 'none', - - /** - * Disable the Windows Phone grippers when pressing an element. - * @type {String} - * @default 'none' - */ - touchSelect: 'none', - - /** - * Disables the default callout shown when you touch and hold a touch target. - * On iOS, when you touch and hold a touch target such as a link, Safari displays - * a callout containing information about the link. This property allows you to disable that callout. - * @type {String} - * @default 'none' - */ - touchCallout: 'none', - - /** - * Specifies whether zooming is enabled. Used by IE10> - * @type {String} - * @default 'none' - */ - contentZooming: 'none', - - /** - * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userDrag: 'none', - - /** - * Overrides the highlight color shown when the user taps a link or a JavaScript - * clickable element in iOS. This property obeys the alpha value, if specified. - * @type {String} - * @default 'rgba(0,0,0,0)' - */ - tapHighlightColor: 'rgba(0,0,0,0)' - } -}; - -var STOP = 1; -var FORCED_STOP = 2; - -/** - * Manager - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Manager(element, options) { - options = options || {}; - - this.options = merge(options, Hammer.defaults); - this.options.inputTarget = this.options.inputTarget || element; - - this.handlers = {}; - this.session = {}; - this.recognizers = []; - - this.element = element; - this.input = createInputInstance(this); - this.touchAction = new TouchAction(this, this.options.touchAction); - - toggleCssProps(this, true); - - each(options.recognizers, function(item) { - var recognizer = this.add(new (item[0])(item[1])); - item[2] && recognizer.recognizeWith(item[2]); - item[3] && recognizer.requireFailure(item[3]); - }, this); -} - -Manager.prototype = { - /** - * set options - * @param {Object} options - * @returns {Manager} - */ - set: function(options) { - extend(this.options, options); - - // Options that need a little more setup - if (options.touchAction) { - this.touchAction.update(); - } - if (options.inputTarget) { - // Clean up existing event listeners and reinitialize - this.input.destroy(); - this.input.target = options.inputTarget; - this.input.init(); - } - return this; - }, - - /** - * stop recognizing for this session. - * This session will be discarded, when a new [input]start event is fired. - * When forced, the recognizer cycle is stopped immediately. - * @param {Boolean} [force] - */ - stop: function(force) { - this.session.stopped = force ? FORCED_STOP : STOP; - }, - - /** - * run the recognizers! - * called by the inputHandler function on every movement of the pointers (touches) - * it walks through all the recognizers and tries to detect the gesture that is being made - * @param {Object} inputData - */ - recognize: function(inputData) { - var session = this.session; - if (session.stopped) { - return; - } - - // run the touch-action polyfill - this.touchAction.preventDefaults(inputData); - - var recognizer; - var recognizers = this.recognizers; - - // this holds the recognizer that is being recognized. - // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED - // if no recognizer is detecting a thing, it is set to `null` - var curRecognizer = session.curRecognizer; - - // reset when the last recognizer is recognized - // or when we're in a new session - if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { - curRecognizer = session.curRecognizer = null; - } - - var i = 0; - while (i < recognizers.length) { - recognizer = recognizers[i]; - - // find out if we are allowed try to recognize the input for this one. - // 1. allow if the session is NOT forced stopped (see the .stop() method) - // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one - // that is being recognized. - // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. - // this can be setup with the `recognizeWith()` method on the recognizer. - if (session.stopped !== FORCED_STOP && ( // 1 - !curRecognizer || recognizer == curRecognizer || // 2 - recognizer.canRecognizeWith(curRecognizer))) { // 3 - recognizer.recognize(inputData); - } else { - recognizer.reset(); - } - - // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the - // current active recognizer. but only if we don't already have an active recognizer - if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { - curRecognizer = session.curRecognizer = recognizer; - } - i++; - } - }, - - /** - * get a recognizer by its event name. - * @param {Recognizer|String} recognizer - * @returns {Recognizer|Null} - */ - get: function(recognizer) { - if (recognizer instanceof Recognizer) { - return recognizer; - } - - var recognizers = this.recognizers; - for (var i = 0; i < recognizers.length; i++) { - if (recognizers[i].options.event == recognizer) { - return recognizers[i]; - } - } - return null; - }, - - /** - * add a recognizer to the manager - * existing recognizers with the same event name will be removed - * @param {Recognizer} recognizer - * @returns {Recognizer|Manager} - */ - add: function(recognizer) { - if (invokeArrayArg(recognizer, 'add', this)) { - return this; - } - - // remove existing - var existing = this.get(recognizer.options.event); - if (existing) { - this.remove(existing); - } - - this.recognizers.push(recognizer); - recognizer.manager = this; - - this.touchAction.update(); - return recognizer; - }, - - /** - * remove a recognizer by name or instance - * @param {Recognizer|String} recognizer - * @returns {Manager} - */ - remove: function(recognizer) { - if (invokeArrayArg(recognizer, 'remove', this)) { - return this; - } - - var recognizers = this.recognizers; - recognizer = this.get(recognizer); - recognizers.splice(inArray(recognizers, recognizer), 1); - - this.touchAction.update(); - return this; - }, - - /** - * bind event - * @param {String} events - * @param {Function} handler - * @returns {EventEmitter} this - */ - on: function(events, handler) { - var handlers = this.handlers; - each(splitStr(events), function(event) { - handlers[event] = handlers[event] || []; - handlers[event].push(handler); - }); - return this; - }, - - /** - * unbind event, leave emit blank to remove all handlers - * @param {String} events - * @param {Function} [handler] - * @returns {EventEmitter} this - */ - off: function(events, handler) { - var handlers = this.handlers; - each(splitStr(events), function(event) { - if (!handler) { - delete handlers[event]; - } else { - handlers[event].splice(inArray(handlers[event], handler), 1); - } - }); - return this; - }, - - /** - * emit event to the listeners - * @param {String} event - * @param {Object} data - */ - emit: function(event, data) { - // we also want to trigger dom events - if (this.options.domEvents) { - triggerDomEvent(event, data); - } - - // no handlers, so skip it all - var handlers = this.handlers[event] && this.handlers[event].slice(); - if (!handlers || !handlers.length) { - return; - } - - data.type = event; - data.preventDefault = function() { - data.srcEvent.preventDefault(); - }; - - var i = 0; - while (i < handlers.length) { - handlers[i](data); - i++; - } - }, - - /** - * destroy the manager and unbinds all events - * it doesn't unbind dom events, that is the user own responsibility - */ - destroy: function() { - this.element && toggleCssProps(this, false); - - this.handlers = {}; - this.session = {}; - this.input.destroy(); - this.element = null; - } -}; - -/** - * add/remove the css properties as defined in manager.options.cssProps - * @param {Manager} manager - * @param {Boolean} add - */ -function toggleCssProps(manager, add) { - var element = manager.element; - each(manager.options.cssProps, function(value, name) { - element.style[prefixed(element.style, name)] = add ? value : ''; - }); -} - -/** - * trigger dom event - * @param {String} event - * @param {Object} data - */ -function triggerDomEvent(event, data) { - var gestureEvent = document.createEvent('Event'); - gestureEvent.initEvent(event, true, true); - gestureEvent.gesture = data; - data.target.dispatchEvent(gestureEvent); -} - -extend(Hammer, { - INPUT_START: INPUT_START, - INPUT_MOVE: INPUT_MOVE, - INPUT_END: INPUT_END, - INPUT_CANCEL: INPUT_CANCEL, - - STATE_POSSIBLE: STATE_POSSIBLE, - STATE_BEGAN: STATE_BEGAN, - STATE_CHANGED: STATE_CHANGED, - STATE_ENDED: STATE_ENDED, - STATE_RECOGNIZED: STATE_RECOGNIZED, - STATE_CANCELLED: STATE_CANCELLED, - STATE_FAILED: STATE_FAILED, - - DIRECTION_NONE: DIRECTION_NONE, - DIRECTION_LEFT: DIRECTION_LEFT, - DIRECTION_RIGHT: DIRECTION_RIGHT, - DIRECTION_UP: DIRECTION_UP, - DIRECTION_DOWN: DIRECTION_DOWN, - DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, - DIRECTION_VERTICAL: DIRECTION_VERTICAL, - DIRECTION_ALL: DIRECTION_ALL, - - Manager: Manager, - Input: Input, - TouchAction: TouchAction, - - TouchInput: TouchInput, - MouseInput: MouseInput, - PointerEventInput: PointerEventInput, - TouchMouseInput: TouchMouseInput, - SingleTouchInput: SingleTouchInput, - - Recognizer: Recognizer, - AttrRecognizer: AttrRecognizer, - Tap: TapRecognizer, - Pan: PanRecognizer, - Swipe: SwipeRecognizer, - Pinch: PinchRecognizer, - Rotate: RotateRecognizer, - Press: PressRecognizer, - - on: addEventListeners, - off: removeEventListeners, - each: each, - merge: merge, - extend: extend, - inherit: inherit, - bindFn: bindFn, - prefixed: prefixed -}); - -if (typeof define == TYPE_FUNCTION && define.amd) { - define(function() { - return Hammer; - }); -} else if (typeof module != 'undefined' && module.exports) { - module.exports = Hammer; -} else { - window[exportName] = Hammer; -} - -})(window, document, 'Hammer'); diff --git a/examples/todos/client/lib/jquery.touchwipe.js b/examples/todos/client/lib/jquery.touchwipe.js new file mode 100644 index 0000000000..18264774f7 --- /dev/null +++ b/examples/todos/client/lib/jquery.touchwipe.js @@ -0,0 +1,82 @@ +/** + * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!) + * Common usage: wipe images (left and right to show the previous or next image) + * + * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de) + * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems) + * @version 1.1 (1st September 2010) - support wipe up and wipe down + * @version 1.0 (15th July 2010) + */ +(function($) { + $.fn.touchwipe = function(settings) { + var config = { + min_move_x: 20, + min_move_y: 20, + wipeLeft: function() { }, + wipeRight: function() { }, + wipeUp: function() { }, + wipeDown: function() { }, + preventDefaultEvents: true + }; + + if (settings) $.extend(config, settings); + + this.each(function() { + var startX; + var startY; + var isMoving = false; + + function cancelTouch() { + this.removeEventListener('touchmove', onTouchMove); + startX = null; + isMoving = false; + } + + function onTouchMove(e) { + if(config.preventDefaultEvents) { + e.preventDefault(); + } + if(isMoving) { + var x = e.touches[0].pageX; + var y = e.touches[0].pageY; + var dx = startX - x; + var dy = startY - y; + if(Math.abs(dx) >= config.min_move_x) { + cancelTouch(); + if(dx > 0) { + config.wipeLeft(); + } + else { + config.wipeRight(); + } + } + else if(Math.abs(dy) >= config.min_move_y) { + cancelTouch(); + if(dy > 0) { + config.wipeDown(); + } + else { + config.wipeUp(); + } + } + } + } + + function onTouchStart(e) + { + if (e.touches.length == 1) { + startX = e.touches[0].pageX; + startY = e.touches[0].pageY; + isMoving = true; + this.addEventListener('touchmove', onTouchMove, false); + } + } + if ('ontouchstart' in document.documentElement) { + this.addEventListener('touchstart', onTouchStart, false); + } + }); + + return this; + }; + + })(jQuery); diff --git a/examples/todos/client/templates/app-body.html b/examples/todos/client/templates/app-body.html index 64dfff1fb5..8284fe7748 100644 --- a/examples/todos/client/templates/app-body.html +++ b/examples/todos/client/templates/app-body.html @@ -31,10 +31,10 @@ {{#if userId}} {{/if}} - {{name}} {{#if incompleteCount}} {{incompleteCount}} {{/if}} + {{name}} {{/each}} diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js index 721d5ec49d..dfe9046e14 100644 --- a/examples/todos/client/templates/app-body.js +++ b/examples/todos/client/templates/app-body.js @@ -10,22 +10,15 @@ Session.setDefault(SHOW_CONNECTION_ISSUE_KEY, false); var CONNECTION_ISSUE_TIMEOUT = 1000; Meteor.startup(function () { - if (Meteor.isCordova) { - // set up a swipe left / right handler - var hammer = new Hammer.Manager(document.body); - - hammer.add(new Hammer.Swipe({ - velocity: 0.1 - })); - - hammer.on('swipeleft', function () { + // set up a swipe left / right handler + $(document.body).touchwipe({ + wipeLeft: function () { Session.set(MENU_KEY, false); - }); - - hammer.on('swiperight', function () { + }, + wipeRight: function () { Session.set(MENU_KEY, true); - }); - } + } + }); // Don't show the connection error box unless we haven't connected within // 1 second of app starting @@ -50,12 +43,6 @@ Template.appBody.rendered = function() { }; }; -Template.appBody.destroyed = function() { - if (Meteor.isCordova) { - this.hammer.destroy(); - } -}; - Template.appBody.helpers({ // We use #each on an array of one item so that the "list" template is // removed and a new copy is added when changing lists, which is From a3f07028e2a148414e26ed651484c05086bb7f68 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 9 Oct 2014 16:34:52 -0700 Subject: [PATCH 144/283] Check a selftest Error to 'selftest.fail' --- tools/tests/registration.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tests/registration.js b/tools/tests/registration.js index cc0c95ec12..65d97056f6 100644 --- a/tools/tests/registration.js +++ b/tools/tests/registration.js @@ -256,7 +256,8 @@ selftest.define( registrationEmail.bodyPage ); if (! token || ! token[1]) { - throw new Error('No registration token in email'); + selftest.fail('No registration token in email:\n' + + registrationEmail.bodyPage); } testUtils.registerWithToken(token[1], username, 'testtest', email); From cafb427aa7e5e40e579076edb2ff9a6d93b523da Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Thu, 9 Oct 2014 15:36:52 -0700 Subject: [PATCH 145/283] Bump versions for 0.9.4-rc.2 --- packages/accounts-base/package.js | 2 +- packages/autoupdate/package.js | 2 +- packages/ddp/package.js | 2 +- packages/http/package.js | 2 +- packages/less/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- packages/netroute/package.js | 2 +- packages/templating/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 5a9fc92dfc..19f7ab420f 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.1.2-rc.0" + version: "1.1.2-rc.2" }); Package.on_use(function (api) { diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 6910b17272..31214ca617 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Update the client when new client code is available", - version: '1.1.2-rc.0' + version: '1.1.2-rc.3' }); Cordova.depends({ diff --git a/packages/ddp/package.js b/packages/ddp/package.js index 89a098b44c..c70ba632c1 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data framework", - version: '1.0.10-rc.0' + version: '1.0.10-rc.2' }); // We use Faye's 'websocket-driver' for connections in server-to-server DDP, diff --git a/packages/http/package.js b/packages/http/package.js index 99c2f82163..d042a92c54 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-rc.0' + version: '1.0.7-rc.2' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/less/package.js b/packages/less/package.js index 10c7b4a527..3c247d3b9f 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-rc.0" + version: "1.0.10-rc.2" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index b0e32edbca..4721cf5a10 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.1' + version: '1.0.34-rc.2' }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 551067e958..a833a59a74 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '1.1.2-rc.1' + version: '1.1.2-rc.3' }); Package._transitional_registerBuildPlugin({ diff --git a/packages/netroute/package.js b/packages/netroute/package.js index 35eaeb6cf9..671466b780 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.0" + version: "0.2.5-rc.2" }); Npm.depends({ diff --git a/packages/templating/package.js b/packages/templating/package.js index 12a1220554..77d06b85e7 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allows templates to be defined in .html files", - version: '1.0.8-rc.0' + version: '1.0.8-rc.2' }); // Today, this package is closely intertwined with Handlebars, meaning diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 6e12b035ef..1a766c9143 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.1.3-rc.0' + version: '1.1.3-rc.2' }); Npm.depends({connect: "2.9.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 9df8c67d65..eec373e4f7 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.1", + "version": "0.9.4-rc.2", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From 5dc03c53ec675dcf0b49b04d60839a2f45a936fc Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 16:45:54 -0700 Subject: [PATCH 146/283] Bump package versions --- packages/http/package.js | 2 +- packages/less/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/netroute/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/http/package.js b/packages/http/package.js index d042a92c54..94d7edaae8 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-rc.2' + version: '1.0.7-rc.3' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/less/package.js b/packages/less/package.js index 3c247d3b9f..0f1285e3b2 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-rc.2" + version: "1.0.10-rc.3" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 4721cf5a10..75a82f4ca5 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.2' + version: '1.0.34-rc.3' }); Package.includeTool(); diff --git a/packages/netroute/package.js b/packages/netroute/package.js index 671466b780..751c49bcbe 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.2" + version: "0.2.5-rc.3" }); Npm.depends({ diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index eec373e4f7..d805d904cf 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.2", + "version": "0.9.4-rc.3", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From ac7ed9627fdc96720622e464b30f51b7f8aab19e Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 16:49:18 -0700 Subject: [PATCH 147/283] Bump meteor-tool --- packages/meteor-tool/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 75a82f4ca5..0f6e4958a7 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.3' + version: '1.0.34-rc.4' }); Package.includeTool(); From 18f77ab2ee5a3287caa12f01fe6c49031e22f76e Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 16:52:49 -0700 Subject: [PATCH 148/283] Bump netroute --- packages/netroute/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/netroute/package.js b/packages/netroute/package.js index 751c49bcbe..fe0c8674c7 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.3" + version: "0.2.5-rc.4" }); Npm.depends({ From f77570662c440eabd1756192e860b150e8f63465 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 16:54:12 -0700 Subject: [PATCH 149/283] Bump meteor-tool.. again --- packages/meteor-tool/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 0f6e4958a7..27e012ed2f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.4' + version: '1.0.34-rc.5' }); Package.includeTool(); From 07ee30ffed384d02817bcebdf94374d513d6ee34 Mon Sep 17 00:00:00 2001 From: ekatek Date: Thu, 9 Oct 2014 18:39:35 -0700 Subject: [PATCH 150/283] automatically set readmes when publishing packages as partof a release with a valid gittag --- tools/commands-packages.js | 41 +++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 2da7c720e6..9fe70acbd6 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -767,8 +767,6 @@ main.registerCommand({ path.join(packageSource.sourceRoot, '.build.' + item)); } - Console.info("."); - // Now compile it! Once again, everything should compile, and if // it doesn't we should fail. Hopefully, of course, we have // tested our stuff before deciding to publish it to the package @@ -783,7 +781,6 @@ main.registerCommand({ canBuild = false; return; }; - Console.info("."); // Let's get the server version that this local package is // overwriting. If such a version exists, we will need to make sure @@ -793,7 +790,6 @@ main.registerCommand({ // Include this package in our release. myPackages[item] = packageSource.version; - Console.info("."); // If there is no old version, then we need to publish this package. if (!oldVersion) { @@ -853,6 +849,7 @@ main.registerCommand({ } if (somethingChanged) { + item = item + "@" + compileResult.isopack.version; // The build ID of the old server record is not the same as // the buildID that we have on disk. This means something // has changed -- maybe our source files, or a buildId of @@ -863,9 +860,9 @@ main.registerCommand({ // a more thorough check. buildmessage.error("Something changed in package " + item + ". Please upgrade version number."); - Console.error("NOT OK"); + Console.error(" NOT OK"); } else { - Console.info("ok"); + Console.info(" ok"); } } }); @@ -988,10 +985,36 @@ main.registerCommand({ } else { Console.info("Creating git tag " + gitTag); files.runGitInCheckout('tag', gitTag); - Console.info( - "Pushing git tag (this should fail if you are not from MDG)"); - files.runGitInCheckout('push', 'git@github.com:meteor/meteor.git', + var fail = false; + try { + Console.info( + "Pushing git tag (this should fail if you are not from MDG)"); + files.runGitInCheckout('push', 'git@github.com:meteor/meteor.git', 'refs/tags/' + gitTag); + } catch (err) { + Console.error( + "Failed to push git tag. Please push git tag manually!"); + fail = true; + } + // If we decided that the tag is legal, and we can't push it, it is almost + // certainly because we have outstanding files to commit and we are going + // to push it later. Forcing us to then re-label readmes on our packages + // is not going to lead to a useful workflow. If we set them to something + // terrible, we can always unset them by going to 'packages.meteor.com' + // and calling '_changeReadmeURL' manually. + _.each(toPublish, function (pack, name) { + var url = "https://raw.githubusercontent.com/meteor/meteor/" + gitTag + "/packages/" + + name + "/README.md"; + var version = pack.compileResult.isopack.version; + packageClient.callPackageServer( + conn, '_changeReadmeURL', name, version, url); + Console.info("Setting the readme of", name + "@" + version, "to", url); + }); + if (fail && !_.isEmpty(toPublish)) { + Console.warning("Readmes for packages rely on pushing the correct tag to git!"); + Console.warning("Please push the git tag manually, or call _changeReadmeURL on ", + "the package server directly to unset the readme URLs."); + } } } From 0fc7f60dcc1dcb89b625ab3ac86bf16626df9fd9 Mon Sep 17 00:00:00 2001 From: ekatek Date: Thu, 9 Oct 2014 19:04:30 -0700 Subject: [PATCH 151/283] helper admin method to set the readme on the latest mainline release --- tools/commands-packages.js | 53 ++++++++++++++++++++++++++++++++++++++ tools/help.txt | 8 ++++++ 2 files changed, 61 insertions(+) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 9fe70acbd6..eab3a43c10 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -2768,3 +2768,56 @@ main.registerCommand({ return 0; }); + + +main.registerCommand({ + name: 'admin set-latest-readme', + minArgs: 1, + maxArgs: 1, + options: { + "commit" : {type: String, required: false}, + "tag" : {type: String, required: false} + }, + hidden: true +}, function (options) { + + if (options.commit && options.tag) + throw new main.ShowUsage; + if (!options.commit && !options.tag) + throw new main.ShowUsage; + + // We are going to start with getting the latest version of the package. + var name = options.args[0]; + var version = doOrDie(function () { + return catalog.official.getLatestMainlineVersion(name).version; + }); + + var coords = options.tag || options.commit; + var url = "https://raw.githubusercontent.com/meteor/meteor/" + + coords + "/packages/" + name + "/README.md"; + + try { + var conn = packageClient.loggedInPackagesConnection(); + } catch (err) { + packageClient.handlePackageServerConnectionError(err); + return 1; + } + + try { + Console.info( + "Setting README of " + + name + "@" + version + " to " + url); + packageClient.callPackageServer( + conn, + '_changeReadmeURL', + name, version, url); + Console.info(" done!\n"); + } catch (err) { + packageClient.handlePackageServerConnectionError(err); + return 1; + } + conn.close(); + refreshOfficialCatalogOrDie(); + + return 0; +}); diff --git a/tools/help.txt b/tools/help.txt index 71c269341b..c4e1a831e0 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -743,3 +743,11 @@ Options: --add add a member to the organization --remove remove a member from the organization --list list members of the organization (the default) + +>>> admin set-latest-readme +Set the readme on the latest version of a core meteor package. +Usage: meteor admin set-latest-core-readme name --commit commit + meteor admin set-latest-core-readme name --tag tag + +Set the readme field on the latest published version of a core package to the readme at +a given git commit, or the readme at a given git tag. From b7782ca4550ce3af9318cd81d6f65e9d1d2eeb2f Mon Sep 17 00:00:00 2001 From: ekatek Date: Thu, 9 Oct 2014 19:12:59 -0700 Subject: [PATCH 152/283] now that we have a command to set latest version, we can not set it until it is there --- tools/commands-packages.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index eab3a43c10..420b300b50 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -994,26 +994,25 @@ main.registerCommand({ } catch (err) { Console.error( "Failed to push git tag. Please push git tag manually!"); + Console.error( + "If you are publishing a non-prerelease version, then the readme will show up " + + "in atmosphere. To make sure that happens, after pushing the git tag, please run " + + " the following:"); + _.each(toPublish, function (pack, name) { + Console.info("meteor admin set-latest-readme " + name + " --tag " + gitTag); + }); + Console.error("If you are publishing an experimental version, don't worry about it."); fail = true; } - // If we decided that the tag is legal, and we can't push it, it is almost - // certainly because we have outstanding files to commit and we are going - // to push it later. Forcing us to then re-label readmes on our packages - // is not going to lead to a useful workflow. If we set them to something - // terrible, we can always unset them by going to 'packages.meteor.com' - // and calling '_changeReadmeURL' manually. - _.each(toPublish, function (pack, name) { - var url = "https://raw.githubusercontent.com/meteor/meteor/" + gitTag + "/packages/" + - name + "/README.md"; - var version = pack.compileResult.isopack.version; - packageClient.callPackageServer( - conn, '_changeReadmeURL', name, version, url); - Console.info("Setting the readme of", name + "@" + version, "to", url); - }); - if (fail && !_.isEmpty(toPublish)) { - Console.warning("Readmes for packages rely on pushing the correct tag to git!"); - Console.warning("Please push the git tag manually, or call _changeReadmeURL on ", - "the package server directly to unset the readme URLs."); + if (!fail) { + _.each(toPublish, function (pack, name) { + var url = "https://raw.githubusercontent.com/meteor/meteor/" + gitTag + "/packages/" + + name + "/README.md"; + var version = pack.compileResult.isopack.version; + packageClient.callPackageServer( + conn, '_changeReadmeURL', name, version, url); + Console.info("Setting the readme of", name + "@" + version, "to", url); + }); } } } From f2b65cc0557c43b9ec116ee1d6bf219c8891e2d8 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Thu, 9 Oct 2014 19:45:36 -0700 Subject: [PATCH 153/283] Fix ce98ea08d5c866653ccc4ba1052a394fd4c830a3 on IE8 Array.prototype.indexOf isn't defined on IE8 --- packages/templating/package.js | 2 ++ packages/templating/templating.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/templating/package.js b/packages/templating/package.js index 77d06b85e7..6e9497a7e0 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -25,6 +25,8 @@ Package.on_use(function (api) { api.add_files('templating.js', 'client'); api.export('Template', 'client'); + api.use('underscore'); // only the subset in packages/blaze/microscore.js + // html_scanner.js emits client code that calls Meteor.startup and // Blaze, so anybody using templating (eg apps) need to implicitly use // 'meteor' and 'blaze'. diff --git a/packages/templating/templating.js b/packages/templating/templating.js index ecd4007d5a..7e4efc50e9 100644 --- a/packages/templating/templating.js +++ b/packages/templating/templating.js @@ -16,7 +16,7 @@ Template.__checkName = function (name) { // - Properties Blaze sets on the Template object. // - Properties that some browsers don't let the code to set. // These are specified in RESERVED_TEMPLATE_NAMES. - if (name in Template || RESERVED_TEMPLATE_NAMES.indexOf(name) !== -1) { + if (name in Template || _.contains(RESERVED_TEMPLATE_NAMES, name)) { if ((Template[name] instanceof Template) && name !== "body") throw new Error("There are multiple templates named '" + name + "'. Each template needs a unique name."); throw new Error("This template name is reserved: " + name); From 7236af674cc65faf460a6cc75632b4833ade6ad4 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 13:28:24 -0700 Subject: [PATCH 154/283] Throttle yields, so we don't slow down in case of rapid calls to yield This restores the behavior I lost when I removed Patience --- tools/catalog.js | 7 ++++--- tools/utils.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/tools/catalog.js b/tools/catalog.js index e662224b94..d374c02989 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -321,6 +321,9 @@ _.extend(LayeredCatalog.prototype, { _initializeResolver: function () { var self = this; var uniload = require('./uniload.js'); + + var yielder = new utils.ThrottledYield(); + var constraintSolverPackage = uniload.load({ packages: [ 'constraint-solver'] })['constraint-solver']; @@ -332,9 +335,7 @@ _.extend(LayeredCatalog.prototype, { utils.Patience.nudge(); buildmessage.nudge(); - // XXX: Call this more judiciously - // (I broke this when I removed Patience; need a quick fix for now) - utils.sleepMs(1); + yielder.yield(); } }); }, diff --git a/tools/utils.js b/tools/utils.js index 47fd6008ac..3eeb275875 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -638,6 +638,40 @@ _.extend(exports.Patience.prototype, { } }); + +// This is a stripped down version of Patience, that just regulates the frequency of calling yield. +// It should behave similarly to calling yield on every iteration of a loop, +// except that it won't actually yield if there hasn't been a long enough time interval +// +// options: +// interval: minimum interval of time between yield calls +// (more frequent calls are simply dropped) +// +// XXX: Have Patience use ThrottledYield +exports.ThrottledYield = function (options) { + var self = this; + + options = _.extend({ interval: 150 }, options || {}); + self.interval = options.interval; + var now = +(new Date); + + // The next yield time is interval from now. + self.nextYield = now + self.interval; +}; + +_.extend(exports.ThrottledYield.prototype, { + yield: function () { + var self = this; + var now = +(new Date); + + if (now >= self.nextYield) { + self.nextYield = now + self.interval; + utils.sleepMs(1); + } + } +}); + + // Are we running on device? exports.runOnDevice = function (options) { return !! _.intersection(options.args, From 8ae13018327b1921dfbef3c2ff85f5b54623fd34 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 20:11:53 -0700 Subject: [PATCH 155/283] Bump versions --- packages/meteor-tool/package.js | 2 +- packages/templating/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 27e012ed2f..f2f578d402 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.5' + version: '1.0.34-rc.6' }); Package.includeTool(); diff --git a/packages/templating/package.js b/packages/templating/package.js index 6e9497a7e0..563a267231 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allows templates to be defined in .html files", - version: '1.0.8-rc.2' + version: '1.0.8-rc.3' }); // Today, this package is closely intertwined with Handlebars, meaning diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index d805d904cf..886f42c47c 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.3", + "version": "0.9.4-rc.4", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From 3952dbfda5529307f1322f6178235bb49a960b1c Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 20:26:47 -0700 Subject: [PATCH 156/283] Update todos --- examples/todos/.meteor/release | 2 +- examples/todos/.meteor/versions | 16 ++++++++-------- examples/todos/client/templates/app-body.js | 3 ++- examples/todos/client/templates/lists-show.js | 8 +++----- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 0755219e60..4fb2b712d3 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@0.9.4-pre.11 +METEOR@0.9.4-rc.3 diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index c929f6de6b..68be03a1aa 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -1,7 +1,7 @@ -accounts-base@1.1.2-rc.0 +accounts-base@1.1.2-rc.2 accounts-password@1.0.3-rc.0 application-configuration@1.0.3-rc.0 -autoupdate@1.1.2-rc.0 +autoupdate@1.1.2-rc.3 base64@1.0.1-rc.0 binary-heap@1.0.1-rc.0 blaze-tools@1.0.1-rc.0 @@ -11,7 +11,7 @@ callback-hook@1.0.1-rc.0 check@1.0.2-rc.0 ctl-helper@1.0.4-rc.0 ctl@1.0.2-rc.0 -ddp@1.0.10-rc.0 +ddp@1.0.10-rc.2 deps@1.0.5-rc.0 ejson@1.0.4-rc.0 email@1.0.4-rc.0 @@ -20,7 +20,7 @@ follower-livedata@1.0.2-rc.0 geojson-utils@1.0.1-rc.0 html-tools@1.0.2-rc.0 htmljs@1.0.2-rc.0 -http@1.0.7-rc.0 +http@1.0.7-rc.3 id-map@1.0.1-rc.0 insecure@1.0.1-rc.0 iron:core@0.3.4 @@ -29,12 +29,12 @@ iron:layout@0.4.1 iron:router@0.9.4 jquery@1.0.1-rc.0 json@1.0.1-rc.0 -less@1.0.10-rc.0 +less@1.0.10-rc.3 livedata@1.0.11-rc.0 localstorage@1.0.1-rc.0 logging@1.0.4-rc.0 meteor-platform@1.1.2-rc.0 -meteor@1.1.2-rc.1 +meteor@1.1.2-rc.3 minifiers@1.1.1-rc.0 minimongo@1.0.4-rc.0 mobile-status-bar@1.0.1-rc.0 @@ -55,10 +55,10 @@ spacebars-compiler@1.0.3-rc.0 spacebars@1.0.3-rc.0 srp@1.0.1-rc.0 standard-app-packages@1.0.3-rc.0 -templating@1.0.8-rc.0 +templating@1.0.8-rc.2 tracker@1.0.3-rc.0 ui@1.0.4-rc.0 underscore@1.0.1-rc.0 url@1.0.1-rc.0 webapp-hashing@1.0.1-rc.0 -webapp@1.1.3-rc.0 +webapp@1.1.3-rc.2 diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js index dfe9046e14..2a567bc78c 100644 --- a/examples/todos/client/templates/app-body.js +++ b/examples/todos/client/templates/app-body.js @@ -17,7 +17,8 @@ Meteor.startup(function () { }, wipeRight: function () { Session.set(MENU_KEY, true); - } + }, + preventDefaultEvents: false }); // Don't show the connection error box unless we haven't connected within diff --git a/examples/todos/client/templates/lists-show.js b/examples/todos/client/templates/lists-show.js index b684a914b0..17f7cd2335 100644 --- a/examples/todos/client/templates/lists-show.js +++ b/examples/todos/client/templates/lists-show.js @@ -117,15 +117,13 @@ Template.listsShow.events({ 'change .list-edit': function(event, template) { if ($(event.target).val() === 'edit') { editList(this, template); - } else if ($(event.target).val() === 'delete') { - if (! deleteList(this, template)) { - // reset the select - event.target.selectedIndex = 0; - } + deleteList(this, template); } else { toggleListPrivacy(this, template); } + + event.target.selectedIndex = 0; }, 'click .js-edit-list': function(event, template) { From a0bf883d93ee5410ec5256dbe3bfd51584e6fec4 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Oct 2014 20:33:25 -0700 Subject: [PATCH 157/283] Bump versions --- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index f2f578d402..d06890a0f6 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.6' + version: '1.0.34-rc.7' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 886f42c47c..f270a39023 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.4", + "version": "0.9.4-rc.5", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From 8391d54202b97e9ef5d4a7664ea8b05ea6702337 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 20:35:05 -0700 Subject: [PATCH 158/283] Whitespace --- packages/ddp/livedata_connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ddp/livedata_connection.js b/packages/ddp/livedata_connection.js index 5c6de3643e..010c0822c2 100644 --- a/packages/ddp/livedata_connection.js +++ b/packages/ddp/livedata_connection.js @@ -663,7 +663,7 @@ _.extend(Connection.prototype, { // be confused with server return values; we // may improve this in future. // @param callback {Optional Function} - + /** * @memberOf Meteor * @summary Invoke a method passing an array of arguments. From 7126e17109b1a5f4d3759b23175589f930d0eb5a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 9 Oct 2014 21:06:09 -0700 Subject: [PATCH 159/283] Allow any number of spaces by || in constraints Previously, exactly one was required, but this was not explicitly documented. --- .../package-version-parser-tests.js | 11 ++++++++++- tools/package-version-parser.js | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/package-version-parser/package-version-parser-tests.js b/packages/package-version-parser/package-version-parser-tests.js index 7abf92072c..9124914e14 100644 --- a/packages/package-version-parser/package-version-parser-tests.js +++ b/packages/package-version-parser/package-version-parser-tests.js @@ -107,6 +107,13 @@ Tinytest.add("Smart Package version string parsing - or", function (test) { { version: "3.0.0", type: "compatible-with"}, { version: "4.0.0-rc1", type: "exactly"}] }); + t("foo@1.0.0|| 2.0.0||3.0.0 || =4.0.0-rc1", + { name: "foo", constraints: + [{ version: "1.0.0", type: "compatible-with"}, + { version: "2.0.0", type: "compatible-with"}, + { version: "3.0.0", type: "compatible-with"}, + { version: "4.0.0-rc1", type: "exactly"}] + }); t("foo-bar@=3.2.1 || 1.0.0", { name: "foo-bar", constraints: [{ version: "3.2.1", type: "exactly"}, @@ -124,10 +131,12 @@ Tinytest.add("Smart Package version string parsing - or", function (test) { }); FAIL("foo@1.0.0 1.0.0"); - FAIL("foo@1.0.0||1.0.0"); FAIL("foo@1.0.0 | 1.0.0"); FAIL("foo || bar"); FAIL("foo@1.0.0-rc|1.0.0"); + + // This is the current implementation, but is arguably not great. + FAIL("foo@1.0.0 "); }); Tinytest.add( diff --git a/tools/package-version-parser.js b/tools/package-version-parser.js index 9f21119a45..ebc4b18afb 100644 --- a/tools/package-version-parser.js +++ b/tools/package-version-parser.js @@ -281,7 +281,7 @@ PV.parseConstraint = function (constraintString, options) { } // Let's parse out the versionString. - var versionConstraints = versionString.split(' || '); + var versionConstraints = versionString.split(/ *\|\| */); constraint.constraints = []; __.each(versionConstraints, function (versionCon) { constraint.constraints.push( From 141f3cdf3df5cf85b1ada83ad2cce3eb79538882 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 9 Oct 2014 21:53:05 -0700 Subject: [PATCH 160/283] Switch to single quotes in 'publish-and-search' selftest --- tools/tests/publish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 07a2726eec..0d9e4fc1f1 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -45,7 +45,7 @@ selftest.define("publish-and-search", // set a github URL in the package var packageJsContents = s.read("package.js"); var newPackageJsContents = packageJsContents.replace( - /git: \".*\"/, "git: \"" + githubUrl + "\""); + /git: \'.*\'/, "git: \'" + githubUrl + "\'"); s.write("package.js", newPackageJsContents); run = s.run("publish"); From 99228d7c7b960205ec608c32fbf82e732ae697f8 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 9 Oct 2014 22:21:32 -0700 Subject: [PATCH 161/283] Clean up tarball in old-cli-test. If we don't clean up the tarball, then the following command (`meteor build`) fails ("Couldn't create tarball"), but for some reason still exits with code 0. So we then go on to successfully untar the output of `meteor build`. If we clean up the tarball from `meteor bundle`, we at least catch the failure by trying to untar a nonexistent file. --- tools/tests/old/cli-test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/old/cli-test.sh b/tools/tests/old/cli-test.sh index 37807f70b4..e6a46db736 100755 --- a/tools/tests/old/cli-test.sh +++ b/tools/tests/old/cli-test.sh @@ -97,6 +97,8 @@ echo "... bundle" $METEOR bundle foo.tar.gz tar tvzf foo.tar.gz >>$OUTPUT +rm foo.tar.gz + $METEOR build foo.tar.gz tar tvzf foo.tar.gz >>$OUTPUT From cc3fbff888d219e5041213bbef0be7e4e361a74c Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 9 Oct 2014 22:31:15 -0700 Subject: [PATCH 162/283] Clean up error handling for `meteor build` tarball creation. Write errors to `Console.stderr`, and exit 1 instead of going on to do the mobile builds (if any) and exiting 0. --- tools/commands.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index eeea60d3e8..ed3fc1d4a0 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -737,8 +737,10 @@ var buildCommand = function (options) { var outputTar = path.join(outputPath, appName + '.tar.gz'); files.createTarball(path.join(buildDir, 'bundle'), outputTar); } catch (err) { - console.log(JSON.stringify(err)); - Console.stderr.write("Couldn't create tarball\n"); + Console.stderr.write("Errors during tarball creation:\n"); + Console.stderr.write(err.message); + files.rm_recursive(buildDir); + return 1; } } From 94c79151fa08fd66e2008d0d2d95a8c8c286e152 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 10 Oct 2014 01:13:43 -0700 Subject: [PATCH 163/283] Change URL to install wiki. --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 88fb035490..e154fd8fb3 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2489,7 +2489,7 @@ main.registerCommand({ host = "Linux"; } if (host) { - var wikiPage = "Cordova-Installation:-" + capitalize(platform) + "-on-" + host; + var wikiPage = "Mobile-Dev-Install:-" + capitalize(platform) + "-on-" + host; var anchor = installed.missing.length ? installed.missing[0] : null; var url = "https://github.com/meteor/meteor/wiki/" + wikiPage; // URL escape? if (anchor) { From b2dea881d7f10bdad9e4a6236c016d96521ee6df Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 02:54:47 -0700 Subject: [PATCH 164/283] Add install-sdk into cordova self-test --- tools/tests/cordova-platforms.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 60c146ffa7..7e9d5baf85 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -16,6 +16,14 @@ selftest.define("add cordova platforms", function () { run.match("meteor add-platform android"); run.expectExit(1); + run = s.run("add-platform", "android"); + run.matchErr("Platform is not installed"); + run.expectExit(2); + + run = s.run("install-sdk", "android"); + run.extraTime = 90; // Big downloads + run.expectExit(0); + run = s.run("add-platform", "android"); run.match("Do you agree"); run.write("Y\n"); From 4c082bb87a38014b05d4d4af53419de8bf487ac2 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 02:54:47 -0700 Subject: [PATCH 165/283] Add install-sdk into cordova self-test --- tools/tests/cordova-platforms.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 60c146ffa7..7e9d5baf85 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -16,6 +16,14 @@ selftest.define("add cordova platforms", function () { run.match("meteor add-platform android"); run.expectExit(1); + run = s.run("add-platform", "android"); + run.matchErr("Platform is not installed"); + run.expectExit(2); + + run = s.run("install-sdk", "android"); + run.extraTime = 90; // Big downloads + run.expectExit(0); + run = s.run("add-platform", "android"); run.match("Do you agree"); run.write("Y\n"); From 828debbeb4c93b0221f7600ce53b00c65886c692 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 02:58:49 -0700 Subject: [PATCH 166/283] Add a sleep to the CSS HCP test --- tools/tests/hot-code-push.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tests/hot-code-push.js b/tools/tests/hot-code-push.js index efb78e3e43..9299cbb69a 100644 --- a/tools/tests/hot-code-push.js +++ b/tools/tests/hot-code-push.js @@ -74,6 +74,11 @@ selftest.define("css hot code push", function (options) { run.match("numCssChanges: 1"); run.match(/background-color: (red|rgb\(255, 0, 0\))/); + // XXX: Remove me. This shouldn't be needed, but sometimes + // if we run too quickly on fast (or Linux?) machines, it looks + // like there's a race and we see a weird state + utils.sleepMs(10000); + s.write(".meteor/packages", "standard-app-packages"); run.match("removed my-package"); run.match("numCssChanges: 0"); From c1cedff917ead7fc0a87c154634b7b6dc6b11423 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 02:58:49 -0700 Subject: [PATCH 167/283] Add a sleep to the CSS HCP test --- tools/tests/hot-code-push.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tests/hot-code-push.js b/tools/tests/hot-code-push.js index efb78e3e43..9299cbb69a 100644 --- a/tools/tests/hot-code-push.js +++ b/tools/tests/hot-code-push.js @@ -74,6 +74,11 @@ selftest.define("css hot code push", function (options) { run.match("numCssChanges: 1"); run.match(/background-color: (red|rgb\(255, 0, 0\))/); + // XXX: Remove me. This shouldn't be needed, but sometimes + // if we run too quickly on fast (or Linux?) machines, it looks + // like there's a race and we see a weird state + utils.sleepMs(10000); + s.write(".meteor/packages", "standard-app-packages"); run.match("removed my-package"); run.match("numCssChanges: 0"); From 6c5f0b0252cbec837da4d0eb4cf04af0764b3f58 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 05:32:41 -0700 Subject: [PATCH 168/283] Wrap 'PRAGMA journal_mode=WAL' in a retry loop --- tools/catalog-remote.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index a2d4f8b47c..cd043aa56b 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -144,11 +144,36 @@ var Db = function (dbFile, options) { self._transactionMutex = new Mutex(); // WAL mode copes much better with (multi-process) concurrency - self._execute('PRAGMA journal_mode=WAL'); + self._retry(function () { + self._execute('PRAGMA journal_mode=WAL'); + }); }; _.extend(Db.prototype, { + // TODO: Move to utils? + _retry: function (f, options) { + options = options || {}; + var maxAttempts = options.maxAttempts || 3; + var delay = options.delay || 500; + + for (var attempt = 1; attempt <= maxAttempts; attempt++) { + try { + return f(); + } catch (err) { + if (attempt < maxAttempts) { + Console.warn("Retrying after error", err); + } else { + throw err; + } + } + + if (delay) { + utils.sleepMs(delay); + } + } + }, + // Runs functions serially, in a mutex _serialize: function (f) { var self = this; From c721d6d89eb1c91bdcc95f6c6bd2aed3639fd24a Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 06:59:12 -0700 Subject: [PATCH 169/283] Refactor _retry to allow zero-values --- tools/catalog-remote.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index cd043aa56b..e2fa269f28 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -153,23 +153,21 @@ _.extend(Db.prototype, { // TODO: Move to utils? _retry: function (f, options) { - options = options || {}; - var maxAttempts = options.maxAttempts || 3; - var delay = options.delay || 500; + options = _.extend({ maxAttempts: 3, delay: 500}, options || {}); - for (var attempt = 1; attempt <= maxAttempts; attempt++) { + for (var attempt = 1; attempt <= options.maxAttempts; attempt++) { try { return f(); } catch (err) { - if (attempt < maxAttempts) { + if (attempt < options.maxAttempts) { Console.warn("Retrying after error", err); } else { throw err; } } - if (delay) { - utils.sleepMs(delay); + if (options.delay) { + utils.sleepMs(options.delay); } } }, From 9118a448a513ddd8c196917e7121655b2dedf376 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 08:26:15 -0700 Subject: [PATCH 170/283] Add install-sdk to "cordova builds with server options" test --- tools/tests/cordova-builds.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 7a3b3612ca..da3fcd2bad 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -28,6 +28,11 @@ selftest.define("cordova builds with server options", ["slow"], function () { s.createApp("myapp", "standard-app"); s.cd("myapp"); + + run = s.run("install-sdk", "android"); + run.extraTime = 90; // Huge download + run.expectExit(0); + run = s.run("add-platform", "android"); run.match("Do you agree"); run.write("Y\n"); From 50338758a425d5082f665591ed7ad53ee59b30cc Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Fri, 10 Oct 2014 13:55:28 -0700 Subject: [PATCH 171/283] Bring backwards-compatibility to `meteor bundle` This commit introduces some conviluted logic to keep the old behavior of the meteor bundle command. Hopefully we will drop it soon so we will simplify the logic. --- tools/commands.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index ed3fc1d4a0..4e6d084472 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -607,12 +607,15 @@ main.registerCommand(_.extend({ name: 'build' }, buildCommands), return buildCommand(options); }); -// Deprecated -- identical functionality to 'build' +// Deprecated -- identical functionality to 'build' with one exception: it +// doesn't output a directory with all builds but rather only one tarball with +// server/client programs. +// XXX COMPAT WITH 0.9.1.1 main.registerCommand(_.extend({ name: 'bundle', hidden: true }, buildCommands), function (options) { Console.stdout.write("WARNING: 'bundle' has been deprecated. " + "Use 'build' instead.\n"); - return buildCommand(options); + return buildCommand(_.extend(options, { _serverOnly: true })); }); var buildCommand = function (options) { @@ -645,8 +648,7 @@ var buildCommand = function (options) { var mobilePlatforms = project.getCordovaPlatforms(); var appName = path.basename(options.appDir); - if (! _.isEmpty(mobilePlatforms)) { - + if (! _.isEmpty(mobilePlatforms) && ! options._serverOnly) { // XXX COMPAT WITH 0.9.2.2 -- the --mobile-port option is deprecated var mobileServer = options.server || options["mobile-port"]; @@ -684,8 +686,10 @@ var buildCommand = function (options) { var buildDir = path.join(localPath, 'build_tar'); var outputPath = path.resolve(options.args[0]); // get absolute path + var bundlePath = options['directory'] ? - path.join(outputPath, 'bundle') : path.join(buildDir, 'bundle'); + (options._serverOnly ? outputPath : path.join(outputPath, 'bundle')) : + path.join(buildDir, 'bundle'); // Creating the package loader with which to bundle our app here, probably // calculating the dependencies. @@ -731,10 +735,14 @@ var buildCommand = function (options) { return 1; } - files.mkdir_p(outputPath); - if (!options['directory']) { + if (! options._serverOnly) + files.mkdir_p(outputPath); + + if (! options['directory']) { try { - var outputTar = path.join(outputPath, appName + '.tar.gz'); + var outputTar = options._serverOnly ? outputPath : + path.join(outputPath, appName + '.tar.gz'); + files.createTarball(path.join(buildDir, 'bundle'), outputTar); } catch (err) { Console.stderr.write("Errors during tarball creation:\n"); @@ -746,7 +754,7 @@ var buildCommand = function (options) { // Copy over the Cordova builds AFTER we bundle so that they are not included // in the main bundle. - _.each(mobilePlatforms, function (platformName) { + !options._serverOnly && _.each(mobilePlatforms, function (platformName) { var buildPath = path.join(localPath, 'cordova-build', 'platforms', platformName); var platformPath = path.join(outputPath, platformName); From 4d41c4c7cd04be3136bbf876eb23bb1cac9c02b3 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Fri, 10 Oct 2014 14:36:43 -0700 Subject: [PATCH 172/283] Fix failing meteor build self-test --- tools/tests/old/cli-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/old/cli-test.sh b/tools/tests/old/cli-test.sh index e6a46db736..3f68473cf7 100755 --- a/tools/tests/old/cli-test.sh +++ b/tools/tests/old/cli-test.sh @@ -99,8 +99,8 @@ tar tvzf foo.tar.gz >>$OUTPUT rm foo.tar.gz -$METEOR build foo.tar.gz -tar tvzf foo.tar.gz >>$OUTPUT +$METEOR build . +tar tvzf "$DIR.tar.gz" >>$OUTPUT cd .. # we're now back to $DIR echo "... run" From ac0014d852db311698273752dc662a8e17c8f04a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 10 Oct 2014 13:44:22 -0700 Subject: [PATCH 173/283] factor out creation of socket --- packages/ddp/stream_client_nodejs.js | 48 +++++++++++++++++----------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/packages/ddp/stream_client_nodejs.js b/packages/ddp/stream_client_nodejs.js index 09df55c540..7792edaddb 100644 --- a/packages/ddp/stream_client_nodejs.js +++ b/packages/ddp/stream_client_nodejs.js @@ -128,24 +128,6 @@ _.extend(LivedataTest.ClientStream.prototype, { var wsUrl = toWebsocketUrl(self.endpoint); var client = self.client = websocketDriver.client(wsUrl); - var parsedUrl = Npm.require('url').parse(wsUrl); - var stream; - var onConnect = function () { - client.start(); - }; - if (parsedUrl.protocol === 'wss:') { - stream = Npm.require('tls').connect( - parsedUrl.port || 443, parsedUrl.hostname, onConnect); - } else { - stream = Npm.require('net').createConnection( - parsedUrl.port || 80, parsedUrl.hostname); - stream.on('connect', onConnect); - } - - _.each(self.headers, function (header, name) { - client.setHeader(name, header); - }); - self._clearConnectionTimer(); self.connectionTimer = Meteor.setTimeout( function () { @@ -154,6 +136,22 @@ _.extend(LivedataTest.ClientStream.prototype, { }, self.CONNECT_TIMEOUT); + var onConnect = function () { + client.start(); + }; + var stream = self._createSocket(wsUrl, onConnect); + + if (!self.client) { + // We hit a connection timeout or other issue while yielding in + // _createSocket. Drop the connection. + stream.end(); + return; + } + + _.each(self.headers, function (header, name) { + client.setHeader(name, header); + }); + self.client.on('open', Meteor.bindEnvironment(function () { return self._onConnect(client); }, "stream connect callback")); @@ -209,5 +207,19 @@ _.extend(LivedataTest.ClientStream.prototype, { stream.pipe(self.client.io); self.client.io.pipe(stream); + }, + + _createSocket: function (wsUrl, onConnect) { + var parsedUrl = Npm.require('url').parse(wsUrl); + + if (parsedUrl.protocol === 'wss:') { + return Npm.require('tls').connect( + parsedUrl.port || 443, parsedUrl.hostname, onConnect); + } else { + var stream = Npm.require('net').createConnection( + parsedUrl.port || 80, parsedUrl.hostname); + stream.on('connect', onConnect); + return stream; + } } }); From fb7921ade284e43c0697378da9c2df566032041c Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 10 Oct 2014 14:06:15 -0700 Subject: [PATCH 174/283] Support $HTTPS_PROXY in Node DDP client. This should mean that you can access the package server from behind a corporate firewall. I tested this by setting up a Linux machine that doesn't have access to packages.meteor.com: $ sudo iptables -A OUTPUT -d 54.225.216.115 -j DROP $ sudo iptables -A OUTPUT -d 184.72.252.20 -j DROP $ sudo iptables -A OUTPUT -d 23.23.114.56 -j DROP I confirmed that these commands both fail: $ curl https://packages.meteor.com/ $ ./meteor search asdf # when it needs to sync first I bought a proxy server from Proxy Bonanza and confirmed that setting the environment variable HTTPS_PROXY to https://PROXYUSERNAME:PROXYPASSWORD@PROXYIP:PROXYPORT/ made both of the commands above succeed. Fixes #2515. --- packages/ddp/.npm/package/npm-shrinkwrap.json | 3 + packages/ddp/package.js | 3 +- packages/ddp/stream_client_nodejs.js | 72 +++++++++++++++++-- tools/commands-packages.js | 7 +- tools/http-helpers.js | 3 +- 5 files changed, 80 insertions(+), 8 deletions(-) diff --git a/packages/ddp/.npm/package/npm-shrinkwrap.json b/packages/ddp/.npm/package/npm-shrinkwrap.json index 650acac22d..c4651eb370 100644 --- a/packages/ddp/.npm/package/npm-shrinkwrap.json +++ b/packages/ddp/.npm/package/npm-shrinkwrap.json @@ -11,6 +11,9 @@ } } }, + "tunnel-agent": { + "version": "0.4.0" + }, "websocket-driver": { "version": "0.3.6" } diff --git a/packages/ddp/package.js b/packages/ddp/package.js index c70ba632c1..7ab40954df 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -13,7 +13,8 @@ Package.describe({ // sockjs.) Npm.depends({ "websocket-driver": "0.3.6", - sockjs: "0.3.9" + sockjs: "0.3.9", + "tunnel-agent": "0.4.0" }); Package.on_use(function (api) { diff --git a/packages/ddp/stream_client_nodejs.js b/packages/ddp/stream_client_nodejs.js index 7792edaddb..ef663a619d 100644 --- a/packages/ddp/stream_client_nodejs.js +++ b/packages/ddp/stream_client_nodejs.js @@ -210,16 +210,80 @@ _.extend(LivedataTest.ClientStream.prototype, { }, _createSocket: function (wsUrl, onConnect) { - var parsedUrl = Npm.require('url').parse(wsUrl); + var self = this; + var urlModule = Npm.require('url'); + var parsedTargetUrl = urlModule.parse(wsUrl); + var targetUrlPort = +parsedTargetUrl.port; + if (!targetUrlPort) { + targetUrlPort = parsedTargetUrl.protocol === 'wss:' ? 443 : 80; + } - if (parsedUrl.protocol === 'wss:') { + // Corporate proxy tunneling support. + var proxyUrl = self._getProxyUrl(parsedTargetUrl.protocol); + if (proxyUrl) { + var targetProtocol = + (parsedTargetUrl.protocol === 'wss:' ? 'https' : 'http'); + var parsedProxyUrl = urlModule.parse(proxyUrl); + var proxyProtocol = + (parsedProxyUrl.protocol === 'https:' ? 'Https' : 'Http'); + var proxyUrlPort = +parsedProxyUrl.port; + if (!proxyUrlPort) { + proxyUrlPort = parsedProxyUrl.protocol === 'https:' ? 443 : 80; + } + var tunnelFnName = targetProtocol + 'Over' + proxyProtocol; + var tunnelAgent = Npm.require('tunnel-agent'); + var proxyOptions = { + host: parsedProxyUrl.hostname, + port: proxyUrlPort, + headers: { + host: parsedTargetUrl.host + ':' + targetUrlPort + } + }; + if (parsedProxyUrl.auth) { + proxyOptions.proxyAuth = Npm.require('querystring').unescape( + parsedProxyUrl.auth); + } + var tunneler = tunnelAgent[tunnelFnName]({proxy: proxyOptions}); + var events = Npm.require('events'); + var fakeRequest = new events.EventEmitter(); + var Future = Npm.require('fibers/future'); + var fut = new Future; + fakeRequest.on('error', function (e) { + fut.isResolved() || fut.throw(e); + }); + tunneler.createSocket({ + host: parsedTargetUrl.host, + port: targetUrlPort, + request: fakeRequest + }, function (socket) { + socket.on('close', function () { + tunneler.removeSocket(socket); + }); + process.nextTick(onConnect); + fut.return(socket); + }); + return fut.wait(); + } + + if (parsedTargetUrl.protocol === 'wss:') { return Npm.require('tls').connect( - parsedUrl.port || 443, parsedUrl.hostname, onConnect); + targetUrlPort, parsedTargetUrl.hostname, onConnect); } else { var stream = Npm.require('net').createConnection( - parsedUrl.port || 80, parsedUrl.hostname); + targetUrlPort, parsedTargetUrl.hostname); stream.on('connect', onConnect); return stream; } + }, + + _getProxyUrl: function (protocol) { + var self = this; + // Similar to code in tools/http-helpers.js. + var proxy = process.env.HTTP_PROXY || process.env.http_proxy || null; + // if we're going to a secure url, try the https_proxy env variable first. + if (protocol === 'wss:') { + proxy = process.env.HTTPS_PROXY || process.env.https_proxy || proxy; + } + return proxy; } }); diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 420b300b50..99b2b48dee 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1219,8 +1219,11 @@ main.registerCommand({ // refreshing" from "can't connect to catalog" refreshOfficialCatalogOrDie({ maxAge: DEFAULT_MAX_AGE }); - var allPackages = catalog.official.getAllPackageNames(); - var allReleases = catalog.official.getAllReleaseTracks(); + var allPackages, allReleases; + doOrDie(function () { + allPackages = catalog.official.getAllPackageNames(); + allReleases = catalog.official.getAllReleaseTracks(); + }); var matchingPackages = []; var matchingReleases = []; diff --git a/tools/http-helpers.js b/tools/http-helpers.js index 15e32354bb..60529e5b96 100644 --- a/tools/http-helpers.js +++ b/tools/http-helpers.js @@ -202,7 +202,8 @@ _.extend(exports, { }; } - // try to get proxy from environment + // try to get proxy from environment. + // similar code is in packages/ddp/stream_client_nodejs.js var proxy = process.env.HTTP_PROXY || process.env.http_proxy || null; // if we're going to an https url, try the https_proxy env variable first. if (/^https/i.test(options.url)) { From 05d2c5edd77a9c23b665bc35a3f0bd66a70a0546 Mon Sep 17 00:00:00 2001 From: ekatek Date: Fri, 10 Oct 2014 14:26:34 -0700 Subject: [PATCH 175/283] Don't automatically put ?close at the end of Meteor Developer Accounts URLs MDA stuff configured with the new tool does not use ?close, and the one configured with the old tool, does. We are not going to automatically try contacting the ?close anymore, since that doesn't work in the future; for backwards compatibility, we went through package server & stat server and added the close-less urls for the new tool to use. --- tools/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/auth.js b/tools/auth.js index fe37dd241e..94f20c0418 100644 --- a/tools/auth.js +++ b/tools/auth.js @@ -1109,7 +1109,7 @@ exports.loginWithTokenOrOAuth = function (conn, accountsConfiguration, // Either we didn't have an existing token, or it didn't work. Do an // OAuth flow to log in. - var redirectUri = url + '/_oauth/meteor-developer?close'; + var redirectUri = url + '/_oauth/meteor-developer'; loginResult = oauthFlow(conn, { clientId: clientId, redirectUri: redirectUri, From 395438b2164d54197d264e4878c5c97012661afc Mon Sep 17 00:00:00 2001 From: ekatek Date: Fri, 10 Oct 2014 17:29:00 -0700 Subject: [PATCH 176/283] do not call semver.compare on package version This is a regression caused by the SQL merge. Sorry for not catching it earlier! We should not be calling semver on meteor package versions outside of the package version parser package. --- tools/catalog-local.js | 7 +++++-- tools/catalog-remote.js | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/catalog-local.js b/tools/catalog-local.js index b8392fde76..1718ca89e2 100644 --- a/tools/catalog-local.js +++ b/tools/catalog-local.js @@ -1,6 +1,5 @@ var fs = require('fs'); var path = require('path'); -var semver = require('semver'); var _ = require('underscore'); var packageClient = require('./package-client.js'); var watch = require('./watch.js'); @@ -14,6 +13,7 @@ var utils = require('./utils.js'); var catalog = require('./catalog.js'); var packageCache = require('./package-cache.js'); var PackageSource = require('./package-source.js'); +var VersionParser = require('./package-version-parser.js'); // LocalCatalog represents the packages located into an application folder // A default instance of this catalog is created in catalog.js @@ -137,6 +137,9 @@ _.extend(LocalCatalog.prototype, { // (according to the version string, not according to their // publication date). Returns the empty array if the package doesn't // exist or doesn't have any versions. + // + // (XXX: If local catalog is just the local overrides, wouldn't this always + // just return one record?) getSortedVersions: function (name) { var self = this; self._requireInitialized(); @@ -144,7 +147,7 @@ _.extend(LocalCatalog.prototype, { return []; } var ret = _.keys(self.versions[name]); - ret.sort(semver.compare); + ret.sort(VersionParser.compare); return ret; }, diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index dc95fce815..b59752d182 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -13,12 +13,13 @@ var compiler = require('./compiler.js'); var uniload = require('./uniload.js'); var tropohouse = require('./tropohouse.js'); var config = require('./config.js'); -var semver = require('semver'); var packageClient = require('./package-client.js'); +var VersionParser = require('./package-version-parser.js'); var sqlite3 = require('sqlite3'); var archinfo = require('./archinfo.js'); var Console = require('./console.js').Console; + // XXX: Rationalize these flags. Maybe use the logger? DEBUG_SQL = !!process.env.METEOR_DEBUG_SQL; @@ -517,7 +518,7 @@ _.extend(RemoteCatalog.prototype, { var match = this._getPackageVersions(name); if (match === null) return []; - return _.pluck(match, 'version').sort(semver.compare); + return _.pluck(match, 'version').sort(VersionParser.compare); }, getLatestMainlineVersion: function (name) { From 8e919e41b56f7a7212fdaf124df7ead1e20aca67 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 9 Oct 2014 20:35:05 -0700 Subject: [PATCH 177/283] Whitespace --- packages/ddp/livedata_connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ddp/livedata_connection.js b/packages/ddp/livedata_connection.js index 5c6de3643e..010c0822c2 100644 --- a/packages/ddp/livedata_connection.js +++ b/packages/ddp/livedata_connection.js @@ -663,7 +663,7 @@ _.extend(Connection.prototype, { // be confused with server return values; we // may improve this in future. // @param callback {Optional Function} - + /** * @memberOf Meteor * @summary Invoke a method passing an array of arguments. From 6bff6020bed9604bc4d10418c462c8aa38dbbcd3 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 10 Oct 2014 08:26:15 -0700 Subject: [PATCH 178/283] Add install-sdk to "cordova builds with server options" test --- tools/tests/cordova-builds.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 7a3b3612ca..da3fcd2bad 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -28,6 +28,11 @@ selftest.define("cordova builds with server options", ["slow"], function () { s.createApp("myapp", "standard-app"); s.cd("myapp"); + + run = s.run("install-sdk", "android"); + run.extraTime = 90; // Huge download + run.expectExit(0); + run = s.run("add-platform", "android"); run.match("Do you agree"); run.write("Y\n"); From 5b17ef1a303c2fe68d146619537dc986ec43fc9d Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 10 Oct 2014 20:37:54 -0700 Subject: [PATCH 179/283] Version bump for rc.6 --- packages/ddp/package.js | 2 +- packages/http/package.js | 2 +- packages/less/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/netroute/package.js | 2 +- packages/package-version-parser/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/ddp/package.js b/packages/ddp/package.js index 7ab40954df..22ecc6b5c3 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data framework", - version: '1.0.10-rc.2' + version: '1.0.10-rc.3' }); // We use Faye's 'websocket-driver' for connections in server-to-server DDP, diff --git a/packages/http/package.js b/packages/http/package.js index 94d7edaae8..b18811040e 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-rc.3' + version: '1.0.7-rc.4' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/less/package.js b/packages/less/package.js index 0f1285e3b2..886ea5ea68 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-rc.3" + version: "1.0.10-rc.4" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index d06890a0f6..79343e813f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.7' + version: '1.0.34-rc.8' }); Package.includeTool(); diff --git a/packages/netroute/package.js b/packages/netroute/package.js index fe0c8674c7..c43555de84 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.4" + version: "0.2.5-rc.5" }); Npm.depends({ diff --git a/packages/package-version-parser/package.js b/packages/package-version-parser/package.js index 69f19c6bcf..f50bb6feac 100644 --- a/packages/package-version-parser/package.js +++ b/packages/package-version-parser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Parses Meteor Smart Package version string", - version: "2.0.2-rc.0" + version: "2.0.2-rc.1" }); Npm.depends({ diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index f270a39023..c7e3e74b1b 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.5", + "version": "0.9.4-rc.6", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From f102432892fadf8818c303b3736c08eba4974a6d Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Fri, 10 Oct 2014 23:39:31 -0700 Subject: [PATCH 180/283] Add some selftest.markStack's and selftest.fail's --- tools/tests/deploy-settings.js | 4 ++-- tools/tests/package-tests.js | 20 ++++++++++---------- tools/tests/registration.js | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/tests/deploy-settings.js b/tools/tests/deploy-settings.js index e445b6b659..1d6626b83d 100644 --- a/tools/tests/deploy-settings.js +++ b/tools/tests/deploy-settings.js @@ -7,7 +7,7 @@ var httpHelpers = require('../http-helpers.js'); // Poll the given app looking for the correct settings. Throws an error // if the settings aren't found after a timeout. -var checkForSettings = function (appName, settings, timeoutSecs) { +var checkForSettings = selftest.markStack(function (appName, settings, timeoutSecs) { var timer = setTimeout(function () { selftest.fail('Expected settings not found on app ' + appName); }, timeoutSecs * 1000); @@ -29,7 +29,7 @@ var checkForSettings = function (appName, settings, timeoutSecs) { } } } -}; +}); selftest.define('deploy - with settings', ['net', 'slow'], function () { var s = new Sandbox; diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 377b08e985..006802aa9d 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -25,7 +25,7 @@ var password = "testtest"; // awesome-pack@1.0.0 (ie: name@version) to match that name at that // version explicitly. This is for packages that we included at a specific // version. -var checkPackages = function(sand, packages) { +var checkPackages = selftest.markStack(function(sand, packages) { var lines = sand.read(".meteor/packages").split("\n"); var i = 0; _.each(lines, function(line) { @@ -41,7 +41,7 @@ var checkPackages = function(sand, packages) { i++; }); selftest.expectEqual(packages.length, i); -}; +}); // Given a sandbox, that has the app as its currend cwd, read the versions file // and check that it contains the packages that we are looking for. We don't @@ -60,7 +60,7 @@ var checkPackages = function(sand, packages) { // version explicitly. This is for packages that only exist for the purpose // of this test (for example, packages local to this app), so we know exactly // what version we expect. -var checkVersions = function(sand, packages) { +var checkVersions = selftest.markStack(function(sand, packages) { var lines = sand.read(".meteor/versions").split("\n"); var depend = {}; _.each(lines, function(line) { @@ -83,7 +83,7 @@ var checkVersions = function(sand, packages) { i++; }); selftest.expectEqual(packages.length, i); -}; +}); // Takes in a remote catalog. Returns an object that can sort of immitate the // catalog. We don't bother to copy all of the information for memory/efficiency @@ -422,7 +422,7 @@ var cleanLocalCache = function () { } }; -var publishMostBasicPackage = function (s, fullPackageName) { +var publishMostBasicPackage = selftest.markStack(function (s, fullPackageName) { var run = s.run("create", "--package", fullPackageName); run.waitSecs(15); run.expectExit(0); @@ -434,9 +434,9 @@ var publishMostBasicPackage = function (s, fullPackageName) { run.expectExit(0); run.match("Done"); }); -}; +}); -var publishReleaseInNewTrack = function (s, releaseTrack, tool, packages) { +var publishReleaseInNewTrack = selftest.markStack(function (s, releaseTrack, tool, packages) { var relConf = { track: releaseTrack, version: "0.9", @@ -450,7 +450,7 @@ var publishReleaseInNewTrack = function (s, releaseTrack, tool, packages) { run.waitSecs(15); run.match("Done"); run.expectExit(0); -}; +}); // Add packages through the command line, and make sure that the correct set of // changes is reflected in .meteor/packages, .meteor/versions and list @@ -549,7 +549,7 @@ selftest.define("sync local catalog", ["slow", "net", "test-package-server"], f // `packageName` should be a full package name (i.e. :), and the sandbox should be logged in as that username. -var createAndPublishPackage = function (s, packageName) { +var createAndPublishPackage = selftest.markStack(function (s, packageName) { var run = s.run("create", "--package", packageName); run.waitSecs(20); run.expectExit(0); @@ -558,7 +558,7 @@ var createAndPublishPackage = function (s, packageName) { run.waitSecs(25); run.expectExit(0); }); -}; +}); selftest.define("release track defaults to METEOR", ["net", "test-package-server", "checkout"], function () { diff --git a/tools/tests/registration.js b/tools/tests/registration.js index 65d97056f6..d928994e7b 100644 --- a/tools/tests/registration.js +++ b/tools/tests/registration.js @@ -6,7 +6,7 @@ var Sandbox = selftest.Sandbox; var httpHelpers = require('../http-helpers.js'); var config = require('../config.js'); -var expectInvalidToken = function (token) { +var expectInvalidToken = selftest.markStack(function (token) { // Same XXX as testUtils.registerWithToken: should be hardcoded to // https://www.meteor.com? var accountsConn = testUtils.ddpConnect(config.getAuthDDPUrl()); @@ -15,10 +15,10 @@ var expectInvalidToken = function (token) { // We should not be able to get a registration code for an invalid // token. if (registrationTokenInfo.valid || registrationTokenInfo.code) { - throw new Error('Expected invalid token is valid!'); + selftest.fail('Expected invalid token is valid!'); } accountsConn.close(); -}; +}); // Polls a guerrillamail.com inbox every 3 seconds looking for an email // that matches the given subject and body regexes. This could fail if @@ -115,7 +115,7 @@ selftest.define('deferred registration - email registration token', ['net', 'slo // registration. var token = testUtils.registrationUrlRegexp.exec(registrationEmail.bodyPage); if (! token || ! token[1]) { - throw new Error("No registration token in email"); + selftest.fail("No registration token in email"); } token = token[1]; @@ -213,7 +213,7 @@ selftest.define( registrationEmail.bodyPage ); if (! emailToken || ! emailToken[1]) { - throw new Error('No registration token in email'); + selftest.fail('No registration token in email'); } expectInvalidToken(emailToken[1]); From 99568e5d9bb25bdfe5a38685c2c2f3a094848757 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Sat, 11 Oct 2014 00:04:27 -0700 Subject: [PATCH 181/283] Add another 'selftest.markStack' --- tools/tests/deploy-settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/deploy-settings.js b/tools/tests/deploy-settings.js index 1d6626b83d..0cfe8a8dc2 100644 --- a/tools/tests/deploy-settings.js +++ b/tools/tests/deploy-settings.js @@ -8,9 +8,9 @@ var httpHelpers = require('../http-helpers.js'); // Poll the given app looking for the correct settings. Throws an error // if the settings aren't found after a timeout. var checkForSettings = selftest.markStack(function (appName, settings, timeoutSecs) { - var timer = setTimeout(function () { + var timer = setTimeout(selftest.markStack(function () { selftest.fail('Expected settings not found on app ' + appName); - }, timeoutSecs * 1000); + }), timeoutSecs * 1000); while (true) { var result = httpHelpers.request('http://' + appName); From 91c6d70454ccfa00ce48cb6e7a2754b9620ca128 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Sat, 11 Oct 2014 00:17:22 -0700 Subject: [PATCH 182/283] Revert "Don't automatically put ?close at the end of Meteor Developer Accounts URLs" This reverts commit 05d2c5edd77a9c23b665bc35a3f0bd66a70a0546. We haven't worked out all the backwards-compatiblity issues of non-?close and ?close OAuth servers and clients yet, so let's leave this as is now, and ensure that all the services that the tool talks to accept ?close URLs. --- tools/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/auth.js b/tools/auth.js index 94f20c0418..fe37dd241e 100644 --- a/tools/auth.js +++ b/tools/auth.js @@ -1109,7 +1109,7 @@ exports.loginWithTokenOrOAuth = function (conn, accountsConfiguration, // Either we didn't have an existing token, or it didn't work. Do an // OAuth flow to log in. - var redirectUri = url + '/_oauth/meteor-developer'; + var redirectUri = url + '/_oauth/meteor-developer?close'; loginResult = oauthFlow(conn, { clientId: clientId, redirectUri: redirectUri, From 39a40e688a3ccb623c69961214773be9c2691b75 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Sat, 11 Oct 2014 02:52:11 -0700 Subject: [PATCH 183/283] Wrap db open call in retry --- tools/catalog-remote.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index 64a7738ccd..19c4bfa5d1 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -140,10 +140,12 @@ var Db = function (dbFile, options) { self._autoPrepare = true; self._prepared = {}; - self._db = self.open(dbFile); - self._transactionMutex = new Mutex(); + self._db = self._retry(function () { + return self.open(dbFile); + }); + // WAL mode copes much better with (multi-process) concurrency self._retry(function () { self._execute('PRAGMA journal_mode=WAL'); @@ -259,6 +261,8 @@ _.extend(Db.prototype, { var self = this; if ( !fs.existsSync(path.dirname(dbFile)) ) { + Console.debug("Creating database directory", dbFile); + var folder = path.dirname(dbFile); if ( !files.mkdir_p(folder) ) throw new Error("Could not create folder at " + folder); From 7132c94e28cd84b35aef67700c25bb4e55df6205 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Sat, 11 Oct 2014 02:52:37 -0700 Subject: [PATCH 184/283] Run self-test in debug mode --- tools/selftest.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/selftest.js b/tools/selftest.js index 7e2ad61f80..b949522e90 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -611,6 +611,8 @@ _.extend(Sandbox.prototype, { var env = _.clone(self.env); env.METEOR_SESSION_FILE = path.join(self.root, '.meteorsession'); + env.METEOR_LOG = 'debug'; + if (self.warehouse) { // Tell it where the warehouse lives. env.METEOR_WAREHOUSE_DIR = self.warehouse; From fd31b828df7b3858b5f143f79a3cbf8126fc31aa Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sat, 11 Oct 2014 00:16:06 -0700 Subject: [PATCH 185/283] For Cordova boilerplate referenced js urls are always absolute Should fix a bug that was kinda hard to reproduce but was noticed before: - open the app that wasn't HCP'd - change the current url path with HTML5 pushState - call window.location.reload() - observe the packages code not being loaded properly --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index e154fd8fb3..7867ee5035 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -336,7 +336,7 @@ var generateCordovaBoilerplate = function (clientDir, options) { runtimeConfig.PUBLIC_SETTINGS = publicSettings; var boilerplate = new Boilerplate(webArchName, manifest, { - urlMapper: function (url) { return url ? url.substr(1) : ''; }, + urlMapper: _.identity, pathMapper: function (p) { return path.join(clientDir, p); }, baseDataExtension: { meteorRuntimeConfig: JSON.stringify(runtimeConfig) From a39f6bb35e45345482e4d7d0aa879deb8fd1aa90 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sat, 11 Oct 2014 01:36:04 -0700 Subject: [PATCH 186/283] Extract the launch screen logic to a separate package That can be configured in apps to postpone the launch screen until a certain moment with some sane default behavior. --- packages/meteor/startup_client.js | 5 --- packages/mobile-launch-screen/.gitignore | 1 + .../mobile-launch-screen.js | 40 +++++++++++++++++++ packages/mobile-launch-screen/package.js | 16 ++++++++ tools/commands-cordova.js | 8 +++- 5 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 packages/mobile-launch-screen/.gitignore create mode 100644 packages/mobile-launch-screen/mobile-launch-screen.js create mode 100644 packages/mobile-launch-screen/package.js diff --git a/packages/meteor/startup_client.js b/packages/meteor/startup_client.js index 6e50a27533..7c88ee434e 100644 --- a/packages/meteor/startup_client.js +++ b/packages/meteor/startup_client.js @@ -8,11 +8,6 @@ var ready = function() { if (awaitingEventsCount > 0) return; - // XXX hide the splash screen if such exists, only on mobile - if (Meteor.isCordova) { - navigator.splashscreen && navigator.splashscreen.hide(); - } - loaded = true; while (queue.length) (queue.shift())(); diff --git a/packages/mobile-launch-screen/.gitignore b/packages/mobile-launch-screen/.gitignore new file mode 100644 index 0000000000..677a6fc263 --- /dev/null +++ b/packages/mobile-launch-screen/.gitignore @@ -0,0 +1 @@ +.build* diff --git a/packages/mobile-launch-screen/mobile-launch-screen.js b/packages/mobile-launch-screen/mobile-launch-screen.js new file mode 100644 index 0000000000..fc06fa0106 --- /dev/null +++ b/packages/mobile-launch-screen/mobile-launch-screen.js @@ -0,0 +1,40 @@ +var Template = Package.templating && Package.templating.Template; + +LaunchScreen = { + hide: function () { + if (navigator.splashscreen) + navigator.splashscreen.hide(); + }, + show: function () { + if (navigator.splashscreen) + navigator.splashscreen.show(); + }, + startingTemplate: 'body', + controlManually: false +}; + +var hideLoadScreenOnTemplateRendered = function (name) { + if (! Template) return; + + // in case some other package registered a rendered callback + var oldRendered = Template.body.rendered; + + // XXX will break if some other package or the user-code overrides w/o + // calling this callback later; + Template[name].rendered = function () { + // Hide the load screen after the body template is fully rendered. + LaunchScreen.hide(); + oldRendered && oldRendered(); + }; +}; + +// on startup it should be clear what templates are there +Meteor.startup(function () { + if (! Template) return; + if (Template['__IronDefaultLayout__']) + LaunchScreen.startingTemplate = '__IronDefaultLayout__'; + + if (! LaunchScreen.controlManually) + hideLoadScreenOnTemplateRendered(LaunchScreen.startingTemplate); +}); + diff --git a/packages/mobile-launch-screen/package.js b/packages/mobile-launch-screen/package.js new file mode 100644 index 0000000000..fb93af76b4 --- /dev/null +++ b/packages/mobile-launch-screen/package.js @@ -0,0 +1,16 @@ +Package.describe({ + name: 'mobile-launch-screen', + summary: 'More control over launch screen on mobile.', + version: '1.0.0' +}); + +Cordova.depends({ + 'org.apache.cordova.splashscreen': '0.3.3' +}); + +Package.onUse(function(api) { + api.addFiles('mobile-launch-screen.js', 'web.cordova'); + api.use(['blaze', 'templating'], 'web.cordova', { weak: true }); + api.export('LaunchScreen'); +}); + diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 7867ee5035..5e4b648c30 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1252,9 +1252,13 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { // set some defaults different from the Phonegap/Cordova defaults var additionalConfiguration = { 'webviewbounce': false, - 'DisallowOverscroll': true, - 'AutoHideSplashScreen': false + 'DisallowOverscroll': true }; + + if (project.dependencies['mobile-launch-screen']) { + additionalConfiguration.AutoHideSplashScreen = false; + } + var imagePaths = { icon: {}, splash: {} From 21411b4114af9bdce954dcfabfda9cb42daceb3a Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sat, 11 Oct 2014 03:32:04 -0700 Subject: [PATCH 187/283] Use the mobile-launch-screen package in todos The example doesn't "flash" with the white page on mobile when launched. --- examples/todos/client/launchScreenConf.js | 4 ++++ examples/todos/lib/router.js | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 examples/todos/client/launchScreenConf.js diff --git a/examples/todos/client/launchScreenConf.js b/examples/todos/client/launchScreenConf.js new file mode 100644 index 0000000000..d5d86ba396 --- /dev/null +++ b/examples/todos/client/launchScreenConf.js @@ -0,0 +1,4 @@ +if (Meteor.isCordova) { + LaunchScreen.controlManually = true; +} + diff --git a/examples/todos/lib/router.js b/examples/todos/lib/router.js index 37cc7da856..512b09da35 100644 --- a/examples/todos/lib/router.js +++ b/examples/todos/lib/router.js @@ -31,6 +31,11 @@ Router.map(function() { }, data: function() { return Lists.findOne(this.params._id); + }, + action: function () { + this.render(); + if (Meteor.isCordova) + LaunchScreen.hide(); } }); @@ -45,4 +50,4 @@ Router.map(function() { if (Meteor.isClient) { Router.onBeforeAction('loading', {except: ['join', 'signin']}); Router.onBeforeAction('dataNotFound', {except: ['join', 'signin']}); -} \ No newline at end of file +} From ad6521ddc814a38483bdd29f9f9d7988d156ad6b Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sat, 11 Oct 2014 03:43:40 -0700 Subject: [PATCH 188/283] Readme file for launch screen --- packages/mobile-launch-screen/README.md | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 packages/mobile-launch-screen/README.md diff --git a/packages/mobile-launch-screen/README.md b/packages/mobile-launch-screen/README.md new file mode 100644 index 0000000000..aef57bc7e0 --- /dev/null +++ b/packages/mobile-launch-screen/README.md @@ -0,0 +1,47 @@ +Launch Screen package +=== + +A mobile-only package that provides an API for controlling the launch screen +users see when the app is booting app. + +It is used only to avoid showing the user a white page slowly building up the UI +elements. Not to hide the whole process of retrieving data. For the best user +experience don't hold the launch screen for too long. + +###Simple usage + +``` +// just add the package, no special configuration required +``` + +When this package is added, the app will hold the launch screen until the +`body` template or `__IronDefaultLayout__` template (in case you use IronRouter) +is fully loaded on the screen. + +You can also control it manually if you want to wait on other UI elements to be +loaded before releasing the launch screen and showing the user the actual app. + + +###Manually specifying the template + +```javascript +// release the launch screen the first time appMainSection is rendered +LaunchScreen.startingTemplate = 'appMainSection'; +``` + +###Manually release the launch screen + +```javascript +LaunchScreen.controlManually = true; + +// ... later ... +LaunchScreen.hide(); +``` + +###Show launch screen back + +```javascript +LaunchScreen.show(); +``` + + From 11d43de2565ab4307264ce5bf61c40bd0d6ea918 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sat, 11 Oct 2014 20:44:02 -0700 Subject: [PATCH 189/283] disable test that breaks other tests --- tools/tests/package-tests.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 006802aa9d..00ba146f99 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -455,6 +455,10 @@ var publishReleaseInNewTrack = selftest.markStack(function (s, releaseTrack, too // Add packages through the command line, and make sure that the correct set of // changes is reflected in .meteor/packages, .meteor/versions and list selftest.define("sync local catalog", ["slow", "net", "test-package-server"], function () { + selftest.fail("this test is broken and breaks other tests by deleting their catalog."); + return; + + var s = new Sandbox(); var run; From 4b1e713252beb7097e719ac61a266867af59a51a Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sat, 11 Oct 2014 20:44:35 -0700 Subject: [PATCH 190/283] Revert "Run self-test in debug mode" This reverts commit 7132c94e28cd84b35aef67700c25bb4e55df6205. --- tools/selftest.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index b949522e90..7e2ad61f80 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -611,8 +611,6 @@ _.extend(Sandbox.prototype, { var env = _.clone(self.env); env.METEOR_SESSION_FILE = path.join(self.root, '.meteorsession'); - env.METEOR_LOG = 'debug'; - if (self.warehouse) { // Tell it where the warehouse lives. env.METEOR_WAREHOUSE_DIR = self.warehouse; From 9a1f9621228738de46fd2b8715eeeff1480ffaf6 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sat, 11 Oct 2014 23:47:39 -0700 Subject: [PATCH 191/283] Update contributors for 0.9.4 --- .mailmap | 33 ++++++++++++++++++++++----------- History.md | 5 +++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.mailmap b/.mailmap index 550b1158e2..0e5ecf2901 100644 --- a/.mailmap +++ b/.mailmap @@ -10,35 +10,35 @@ GITHUB: aldeed GITHUB: AlexeyMK -GITHUB: apendua -GITHUB: Cangit -GITHUB: DenisGorbachev -GITHUB: EOT -GITHUB: FooBarWidget -GITHUB: Maxhodges -GITHUB: OyoKooN -GITHUB: RobertLowe GITHUB: ansman +GITHUB: apendua GITHUB: awwx GITHUB: babenzele +GITHUB: Cangit GITHUB: cmather GITHUB: codeinthehole +GITHUB: cryptoquick GITHUB: dandv GITHUB: davegonzalez +GITHUB: DenisGorbachev GITHUB: ducdigital GITHUB: duckspeaker GITHUB: emgee3 +GITHUB: EOT GITHUB: felixrabe +GITHUB: FooBarWidget GITHUB: FredericoC +GITHUB: Gaelan GITHUB: icellan GITHUB: ImtiazMajeed GITHUB: jacott -GITHUB: jfhamlin GITHUB: jbruni -GITHUB: justinsb +GITHUB: jfhamlin +GITHUB: jperl GITHUB: kentonv GITHUB: marcandre GITHUB: mart-jansink +GITHUB: Maxhodges GITHUB: MaximDubrovin GITHUB: meawoppl GITHUB: meonkeys @@ -49,14 +49,22 @@ GITHUB: mizzao GITHUB: mquandalle GITHUB: nathan-muir GITHUB: Neftedollar +GITHUB: OyoKooN GITHUB: paulswartz GITHUB: Pent GITHUB: prapicault +GITHUB: prapicault +GITHUB: pscanf GITHUB: queso GITHUB: rcy -GITHUB: RichardLitt GITHUB: rdickert GITHUB: rgould +GITHUB: RichardLitt +GITHUB: richguan +GITHUB: rick-golden-healthagen +GITHUB: rissem +GITHUB: RobertLowe +GITHUB: rosh93 GITHUB: ryw GITHUB: rzymek GITHUB: sdarnell @@ -64,6 +72,7 @@ GITHUB: subhog GITHUB: tbjers GITHUB: thatneat GITHUB: timhaines +GITHUB: timoabend GITHUB: tmeasday GITHUB: twhy GITHUB: waitingkuo @@ -83,9 +92,11 @@ METEOR: estark37 METEOR: glasser METEOR: glasser METEOR: gschmidt +METEOR: justinsb METEOR: karayu METEOR: mariapacana METEOR: n1mmy METEOR: sixolet METEOR: Slava +METEOR: Slava METEOR: stubailo diff --git a/History.md b/History.md index 7bb7e29d76..e43e025cbb 100644 --- a/History.md +++ b/History.md @@ -84,6 +84,10 @@ package authors to build packages specifically for testing and debugging without increasing the size of the resulting app bundle or causing apps to ship with debug functionality built in. + +Patches by Github users cryptoquick, Gaelan, jperl, meonkeys, mitar, mquandalle, prapicault, pscanf, richguan, rick-golden-healthagen, rissem, rosh93, rzymek, and timoabend + + ## v0.9.3.1 * Don't crash when failing to contact the package server. #2713 @@ -93,6 +97,7 @@ debug functionality built in. * Fix `meteor update` on an app built from a checkout version of Meteor. + ## v0.9.3 ### More Package Version Number Flexibility From 270217b5660bc5c2ef6aa96ac7a9a5dc00591830 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sun, 12 Oct 2014 00:00:56 -0700 Subject: [PATCH 192/283] Fix Accounts.ui.config docs: forceApprovalPrompt is an Object that maps services to booleans --- docs/client/data.js | 2 +- packages/accounts-ui-unstyled/accounts_ui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/data.js b/docs/client/data.js index 46cbfd2501..f4ab7343d5 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Object"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/packages/accounts-ui-unstyled/accounts_ui.js b/packages/accounts-ui-unstyled/accounts_ui.js index 17c697b946..c99eb87b6c 100644 --- a/packages/accounts-ui-unstyled/accounts_ui.js +++ b/packages/accounts-ui-unstyled/accounts_ui.js @@ -19,7 +19,7 @@ Accounts.ui._options = { * @param {Object} options * @param {Object} options.requestPermissions Which [permissions](#requestpermissions) to request from the user for each external service. * @param {Object} options.requestOfflineToken To ask the user for permission to act on their behalf when offline, map the relevant external service to `true`. Currently only supported with Google. See [Meteor.loginWithExternalService](#meteor_loginwithexternalservice) for more details. - * @param {Boolean} options.forceApprovalPrompt If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google. + * @param {Object} options.forceApprovalPrompt If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google. * @param {String} options.passwordSignupFields Which fields to display in the user creation form. One of '`USERNAME_AND_EMAIL`', '`USERNAME_AND_OPTIONAL_EMAIL`', '`USERNAME_ONLY`', or '`EMAIL_ONLY`' (default). */ Accounts.ui.config = function(options) { From 52f640fa6206f4b0275cc173283eebe7097f12a5 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 00:25:54 -0700 Subject: [PATCH 193/283] Update license file. --- LICENSE.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/LICENSE.txt b/LICENSE.txt index 710525efa1..bed271a30b 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -884,6 +884,7 @@ Modifications made by the following entities are licensed as above: accepts: https://github.com/jshttp/accepts merge-descriptors: https://github.com/component/merge-descriptors type-is: https://github.com/jshttp/type-is +mime-types: https://github.com/jshttp/mime-types ---------- Copyright (c) 2013 Jonathan Ong me@jongleberry.com @@ -947,6 +948,35 @@ utils-merge: https://github.com/jaredhanson/utils-merge Copyright (c) 2013 Jared Hanson +---------- +bl: https://github.com/rvagg/bl +---------- + +Copyright (c) 2014 bl contributors +bl contributors listed at https://github.com/rvagg/bl#contributors + + +---------- +lodash-node: https://github.com/lodash/lodash-node +---------- + +Copyright 2012-2014 The Dojo Foundation +Based on Underscore.js 1.6.0, copyright 2009-2014 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + + +---------- +netroute: https://github.com/indutny/node-netroute +---------- + +Copyright Fedor Indutny, 2012. + + +---------- +stringstream: https://github.com/mhart/StringStream +---------- + +Copyright 2012 Michael Hart (michael.hart.au@gmail.com) ============== @@ -1229,6 +1259,99 @@ Copyright (C) 2013 David Nolen and contributors BSD Licenses ============ +---------- +tar-pack: https://github.com/ForbesLindesay/tar-pack +---------- + +Copyright (c) 2014, Forbes Lindesay +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------- +sqlite3: https://github.com/mapbox/node-sqlite3 +---------- + +Copyright (c) MapBox +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. +- Neither the name "MapBox" nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------- +node-pre-gyp: https://github.com/mapbox/node-pre-gyp +---------- + +Copyright (c), Mapbox + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of node-pre-gyp nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------- uglify-js: https://github.com/mishoo/UglifyJS2 ---------- From 4d2023e9b0c51db89c4e4642293ffece10242be9 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 13:15:54 -0700 Subject: [PATCH 194/283] Allow `null` in appId check. This can happen when a client passes `undefined` for appId and it gets translated to `null` by DDP. --- packages/autoupdate/autoupdate_server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index 8a62571534..8b99ba00ad 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -137,7 +137,10 @@ var updateVersions = function (shouldReloadClientProgram) { Meteor.publish( "meteor_autoupdate_clientVersions", function (appId) { - check(appId, Match.Optional(String)); + // `null` happens when a client doesn't have an appId and passes + // `undefined` to `Meteor.subscribe`. `undefined` is translated to + // `null` as JSON doesn't have `undefined. + check(appId, Match.OneOf(String, undefined, null)); // Don't notify clients using wrong appId such as mobile apps built with a // different server but pointing at the same local url From fbb15e7e3bd733c9647b5e3f1b2a9c3e02b254f6 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 13:15:54 -0700 Subject: [PATCH 195/283] Allow `null` in appId check. This can happen when a client passes `undefined` for appId and it gets translated to `null` by DDP. --- packages/autoupdate/autoupdate_server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index 8a62571534..8b99ba00ad 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -137,7 +137,10 @@ var updateVersions = function (shouldReloadClientProgram) { Meteor.publish( "meteor_autoupdate_clientVersions", function (appId) { - check(appId, Match.Optional(String)); + // `null` happens when a client doesn't have an appId and passes + // `undefined` to `Meteor.subscribe`. `undefined` is translated to + // `null` as JSON doesn't have `undefined. + check(appId, Match.OneOf(String, undefined, null)); // Don't notify clients using wrong appId such as mobile apps built with a // different server but pointing at the same local url From 9fbf759c43ca9f490c2867a416e91b1c81909440 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 13:27:24 -0700 Subject: [PATCH 196/283] Hide spurious message that pops up sometimes. Users don't need to see this "everything is OK" message. (Especially since sometime we sync right after printing it!) --- tools/catalog-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index 19c4bfa5d1..10bce57e20 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -696,7 +696,7 @@ _.extend(RemoteCatalog.prototype, { Console.debug("lastSync = ", lastSync); if (lastSync && lastSync.timestamp) { if ((Date.now() - lastSync.timestamp) < options.maxAge) { - Console.info("Catalog is sufficiently up-to-date; not refreshing\n"); + Console.debug("Catalog is sufficiently up-to-date; not refreshing\n"); return; } } From bb72d62ca8202c460b214d0b1d3effa740bafbe4 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 13:27:24 -0700 Subject: [PATCH 197/283] Hide spurious message that pops up sometimes. Users don't need to see this "everything is OK" message. (Especially since sometime we sync right after printing it!) --- tools/catalog-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index b59752d182..2a7ece21e5 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -669,7 +669,7 @@ _.extend(RemoteCatalog.prototype, { Console.debug("lastSync = ", lastSync); if (lastSync && lastSync.timestamp) { if ((Date.now() - lastSync.timestamp) < options.maxAge) { - Console.info("Catalog is sufficiently up-to-date; not refreshing\n"); + Console.debug("Catalog is sufficiently up-to-date; not refreshing\n"); return; } } From 03b8e2b2ad8760f3d74201d298aed625a8917ed7 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 13:53:01 -0700 Subject: [PATCH 198/283] Bump versions for -rc.7 --- packages/autoupdate/package.js | 2 +- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 31214ca617..94a2e26eed 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Update the client when new client code is available", - version: '1.1.2-rc.3' + version: '1.1.2-rc.4' }); Cordova.depends({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 79343e813f..ab478cd14a 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.8' + version: '1.0.34-rc.9' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index c7e3e74b1b..e160361a7b 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.6", + "version": "0.9.4-rc.7", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From aeb5291953412f04e1942dfbf6106a1bfb09c820 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 15:08:42 -0700 Subject: [PATCH 199/283] Re-order and linewrap History entries. No content changes. --- History.md | 158 +++++++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 72 deletions(-) diff --git a/History.md b/History.md index e43e025cbb..18e9def294 100644 --- a/History.md +++ b/History.md @@ -1,88 +1,102 @@ ## v.NEXT +### New Features + +* There is a new `meteor debug` command and `--debug-port` command line + option for `meteor run` that allows you to easily use node-inspector + to debug your server-side code. Add a `debugger` statement to your + code to create a breakpoint. + +* Meteor can now run [Velocity](https://github.com/meteor-velocity/velocity) + tests with `meteor run --test`. + +* New callbacks that make it easier to build custom user interfaces on + top of the accounts system: `Accounts.onResetPasswordLink`, + `Accounts.onEnrollmentLink`, and + `Accounts.onEmailVerificationLink`. These callbacks should be + registered before `Meteor.startup` fires, and will be called if the + URL matches a link in an email sent by `Accounts.resetPassword`, etc. + +* A new special file, `/mobile-config.js`, allows you to set app + metadata, icons, splash screens, preferences, and PhoneGap/Cordova + plugin settings without needing a `cordova_build_override` directory. + + +### API Changes + * Rename `{{> UI.dynamic}}` to `{{> Template.dynamic}}`, and likewise - with `UI.contentBlock` and `UI.elseBlock`. The UI namespace is no longer - used anywhere except for backwards compatibility. - -* Deprecate the `amplify`, `backbone`, `bootstrap`, and `d3` integration - packages in favor of community alternatives. These packages will no - longer be maintained by MDG. - -* Rename the `showdown` package to `markdown`. + with `UI.contentBlock` and `UI.elseBlock`. The UI namespace is no + longer used anywhere except for backwards compatibility. * Deprecate the `Template.someTemplate.myHelper = ...` syntax in favor of `Template.someTemplate.helpers(...)`. Using the older syntax still works, but it prints a deprecation warning to the console. +* Package.registerBuildPlugin its associated functions have been added + to the public API, cleaned up, and documented. The new function is + identical to the earlier _transitional_registerBuildPlugin except for + one or two backwards- compatible API changes. + +* Rename the `showdown` package to `markdown`. + +* Deprecate the `amplify`, `backbone`, `bootstrap`, and `d3` integration + packages in favor of community alternatives. These packages will no + longer be maintained by MDG. + + +### Tool Changes + +* Improved output from `meteor build` to make it easier to publish + mobile apps to the App Store and Play Store, and added documentation + about all of the steps from building the app to publishing it. + +* Packages can now be marked as `debugOnly` by adding `debugOnly: true` + to `Package.describe`. Debug-only packages are not bundled for + production, allowing package authors to build packages specifically + for testing and debugging without increasing the size of the resulting + app bundle or causing apps to ship with debug functionality built in. + +* The `.meteor/cordova-platforms` file has been renamed to + `.meteor/platforms` to reflect the possibility of adding non-Cordova + platforms in the future. This file now automatically includes the + platforms `server` and `browser`, which can't currently be + removed. The old file will be automatically migrated to the new one + when the app is run with Meteor 0.9.4 or above. + +* The `unipackage.json` file inside downloaded packages has been renamed + to `isopack.json` and has an improved forwards-compatible format. To + maintain backwards compatibility with previous releases, packages will + have both files included. + +* --port now requires a port (e.g. `meteor run --port example.com` is + not valid). XXX --mobile-port deprecated in favor of --mobile-server + option for 'meteor run' and '--server' for 'meteor build'. --server is + required for meteor build. describe defaults for --mobile-server. + +* The local package catalog now uses SQLite, which is much faster than + the previous implementation. + +* The constraint solver used by the client to find compatible versions + of packages is now much faster. + +* Operations that take longer than a few seconds, such as downloading + packages, installing the Android SDK, and some others, now show a + progress bar. + +* The process and documentation for installing SDKs for Android and iOS + has been significantly improved, and is more intelligent about + detecting existing SDK installs. + + +### Bug Fixes + * Fix behavior of ROOT_URL with path ending in `/`. * Fix source maps when using a ROOT_URL with a path. #2627 -* --port now requires a port (e.g. `meteor run --port example.com` is - not valid). XXX --mobile-port deprecated in favor of --mobile-server - option for 'meteor run' and '--server' for 'meteor build'. --server - is required for meteor build. describe defaults for --mobile-server. - -* The local package catalog now uses SQLite, which is much faster than the -previous implementation. - -* Operations that take longer than a few seconds, such as downloading packages, -installing the Android SDK, and some others, now show a progress bar. - -* Package.registerBuildPlugin its associated functions have been added to the -public API, cleaned up, and documented. The new function is identical to the -earlier _transitional_registerBuildPlugin except for one or two backwards- -compatible API changes. - -* The `unipackage.json` file inside downloaded packages has been renamed to -`isopack.json` and has an improved forwards-compatible format. To maintain -backwards compatibility with previous releases, packages will have both -files included. - -* New callbacks that make it easier to build custom user interfaces on top of -the accounts system: `Accounts.onResetPasswordLink`, -`Accounts.onEnrollmentLink`, and `Accounts.onEmailVerificationLink`. These -callbacks should be registered before `Meteor.startup` fires, and will be called -if the URL matches a link in an email sent by `Accounts.resetPassword`, etc. - -* The `.meteor/cordova-platforms` file has been renamed to `.meteor/platforms` -to reflect the possibility of adding non-Cordova platforms in the future. This -file now automatically includes the platforms `server` and `browser`, which -can't currently be removed. The old file will be automatically migrated to -the new one when the app is run with Meteor 0.9.4 or above. - -* Meteor can now run [Velocity](https://github.com/meteor-velocity/velocity) - tests with `meteor run --test`. - -* There is a new `meteor debug` command and `--debug-port` command line option -for `meteor run` that allows you to easily use node-inspector to debug your -server-side code. Add a `debugger` statement to your code to create a -breakpoint. - -* A new special file, `/mobile-config.js`, allows you to set app metadata, -icons, splash screens, preferences, and PhoneGap/Cordova plugin settings without -needing a `cordova_build_override` directory. - * Change the mechanism that the Meteor tool uses to clean up app server -processes. The new mechanism is more resilient to slow app bundles and -other CPU-intensive tasks. #2536, #2588. - -* The constraint solver used by the client to find compatible versions of -packages is now much faster. - -* The process and documentation for installing SDKs for Android and iOS has -been significantly improved, and is more intelligent about detecting existing -SDK installs. - -* Improved output from `meteor build` to make it easier to publish mobile -apps to the App Store and Play Store, and added documentation about all of the -steps from building the app to publishing it. - -* Packages can now be marked as `debugOnly` by adding `debugOnly: true` to -`Package.describe`. Debug-only packages are not bundled for production, allowing -package authors to build packages specifically for testing and debugging without -increasing the size of the resulting app bundle or causing apps to ship with -debug functionality built in. + processes. The new mechanism is more resilient to slow app bundles and + other CPU-intensive tasks. #2536, #2588. Patches by Github users cryptoquick, Gaelan, jperl, meonkeys, mitar, mquandalle, prapicault, pscanf, richguan, rick-golden-healthagen, rissem, rosh93, rzymek, and timoabend From 9d3b73c655aa746504c91263960060b123e315a6 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sun, 12 Oct 2014 18:36:54 -0700 Subject: [PATCH 200/283] Rewording pass over History.md --- History.md | 107 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 45 deletions(-) diff --git a/History.md b/History.md index 18e9def294..1e36ca3bb9 100644 --- a/History.md +++ b/History.md @@ -2,24 +2,28 @@ ### New Features -* There is a new `meteor debug` command and `--debug-port` command line - option for `meteor run` that allows you to easily use node-inspector - to debug your server-side code. Add a `debugger` statement to your - code to create a breakpoint. +* The new `meteor debug` command and `--debug-port` command line option + to `meteor run` allow you to easily use node-inspector to debug your + server-side code. Add a `debugger` statement to your code to create a + breakpoint. -* Meteor can now run [Velocity](https://github.com/meteor-velocity/velocity) - tests with `meteor run --test`. +* Add new a `meteor run --test` command that runs + [Velocity](https://github.com/meteor-velocity/velocity) tests in your + app . -* New callbacks that make it easier to build custom user interfaces on - top of the accounts system: `Accounts.onResetPasswordLink`, - `Accounts.onEnrollmentLink`, and - `Accounts.onEmailVerificationLink`. These callbacks should be - registered before `Meteor.startup` fires, and will be called if the - URL matches a link in an email sent by `Accounts.resetPassword`, etc. +* Add new callbacks `Accounts.onResetPasswordLink`, + `Accounts.onEnrollmentLink`, and `Accounts.onEmailVerificationLink` + that make it easier to build custom user interfaces on top of the + accounts system. These callbacks should be registered before + `Meteor.startup` fires, and will be called if the URL matches a link + in an email sent by `Accounts.resetPassword`, etc. See + https://docs.meteor.com/#Accounts-onResetPasswordLink. -* A new special file, `/mobile-config.js`, allows you to set app - metadata, icons, splash screens, preferences, and PhoneGap/Cordova - plugin settings without needing a `cordova_build_override` directory. +* A new configuration file for mobile apps, + `/mobile-config.js`. This allows you to set app metadata, icons, + splash screens, preferences, and PhoneGap/Cordova plugin settings + without needing a `cordova_build_override` directory. See + https://docs.meteor.com/#mobileconfigjs. ### API Changes @@ -30,12 +34,13 @@ * Deprecate the `Template.someTemplate.myHelper = ...` syntax in favor of `Template.someTemplate.helpers(...)`. Using the older syntax still - works, but it prints a deprecation warning to the console. + works, but prints a deprecation warning to the console. -* Package.registerBuildPlugin its associated functions have been added +* `Package.registerBuildPlugin` its associated functions have been added to the public API, cleaned up, and documented. The new function is identical to the earlier _transitional_registerBuildPlugin except for - one or two backwards- compatible API changes. + minor backwards- compatible API changes. See + https://docs.meteor.com/#Package-registerBuildPlugin * Rename the `showdown` package to `markdown`. @@ -47,45 +52,55 @@ ### Tool Changes * Improved output from `meteor build` to make it easier to publish - mobile apps to the App Store and Play Store, and added documentation - about all of the steps from building the app to publishing it. + mobile apps to the App Store and Play Store. See the wiki pages for + instructions on how to publish your + [iOS](https://github.com/meteor/meteor/wiki/How-to-submit-your-iOS-app-to-App-Store) + and + [Android](https://github.com/meteor/meteor/wiki/How-to-submit-your-Android-app-to-Play-Store) + apps. -* Packages can now be marked as `debugOnly` by adding `debugOnly: true` - to `Package.describe`. Debug-only packages are not bundled for - production, allowing package authors to build packages specifically - for testing and debugging without increasing the size of the resulting - app bundle or causing apps to ship with debug functionality built in. +* Packages can now be marked as debug-mode only by adding `debugOnly: + true` to `Package.describe`. Debug-only packages are not included in + the app when it is bundled for production (`meteor build` or `meteor + run --production`). This allows package authors to build packages + specifically for testing and debugging without increasing the size of + the resulting app bundle or causing apps to ship with debug + functionality built in. + +* Rework the process for installing mobile development SDKs. There is + now a `meteor install-sdk` command that automatically install what + software it can and points to documentation for the parts that + require manual installation. * The `.meteor/cordova-platforms` file has been renamed to - `.meteor/platforms` to reflect the possibility of adding non-Cordova - platforms in the future. This file now automatically includes the - platforms `server` and `browser`, which can't currently be - removed. The old file will be automatically migrated to the new one - when the app is run with Meteor 0.9.4 or above. + `.meteor/platforms` and now includes the default `server` and + `browser` platforms. The default platforms can't currently be removed + from a project, though this will be possible in the future. The old + file will be automatically migrated to the new one when the app is run + with Meteor 0.9.4 or above. * The `unipackage.json` file inside downloaded packages has been renamed to `isopack.json` and has an improved forwards-compatible format. To maintain backwards compatibility with previous releases, packages will - have both files included. + be built with both files. -* --port now requires a port (e.g. `meteor run --port example.com` is - not valid). XXX --mobile-port deprecated in favor of --mobile-server - option for 'meteor run' and '--server' for 'meteor build'. --server is - required for meteor build. describe defaults for --mobile-server. - -* The local package catalog now uses SQLite, which is much faster than - the previous implementation. +* The local package metadata cache now uses SQLite, which is much faster + than the previous implementation. This improves `meteor` command line + tool startup time. * The constraint solver used by the client to find compatible versions of packages is now much faster. -* Operations that take longer than a few seconds, such as downloading - packages, installing the Android SDK, and some others, now show a - progress bar. +* The `--port` option to `meteor run` now requires a numeric port + (e.g. `meteor run --port example.com` is no longer valid). -* The process and documentation for installing SDKs for Android and iOS - has been significantly improved, and is more intelligent about - detecting existing SDK installs. +* The `--mobile-port` option `meteor run` has been reworked. The option + is now `--mobile-server` in `meteor run` and `--server` in `meteor + build`. `--server` is required for `meteor build` in apps with mobile + platforms installed. XXX describe defaults for --mobile-server. + +* Operations that take longer than a few seconds (e.g. downloading + packages, installing the Android SDK, etc) now show a progress bar. ### Bug Fixes @@ -99,7 +114,9 @@ other CPU-intensive tasks. #2536, #2588. -Patches by Github users cryptoquick, Gaelan, jperl, meonkeys, mitar, mquandalle, prapicault, pscanf, richguan, rick-golden-healthagen, rissem, rosh93, rzymek, and timoabend +Patches by Github users cryptoquick, Gaelan, jperl, meonkeys, mitar, +mquandalle, prapicault, pscanf, richguan, rick-golden-healthagen, +rissem, rosh93, rzymek, and timoabend ## v0.9.3.1 From dbc41759e0ee09b43311e3c1439da007371b69ec Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sun, 12 Oct 2014 20:03:21 -0700 Subject: [PATCH 201/283] Fix Ben's GitHub name --- .mailmap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 550b1158e2..00fbeb6935 100644 --- a/.mailmap +++ b/.mailmap @@ -73,8 +73,8 @@ GITHUB: zol METEOR: arbesfeld METEOR: avital -METEOR: ben -METEOR: ben +METEOR: benjamn +METEOR: benjamn METEOR: debergalis METEOR: dgreensp METEOR: ekatek From 89b394d9744a6b6399b469c2801dee73264f4626 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Sun, 12 Oct 2014 22:50:07 -0700 Subject: [PATCH 202/283] Work towards fixing the "do-not-update-to-rcs" self-test. The test was failing because it was written to run against the real local warehouse, instead of a stubbed one. When initializing the Sandbox with an explicit warehouse, the test failed because of incorrect logic piping the right path to the packages database (in this case "test-packages.data.db" instead of "packages.data.db"). Unfortunately, the test still fails -- this time potentially due to a bug: After publishing the package for the first time with `--create`, the next step tries to update but gets the following error: There is no package named test:i1iyhj. If you are creating a new package, use the --create flag. --- tools/config.js | 4 ++-- tools/tests/publish.js | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/config.js b/tools/config.js index c1ac0d7db3..943e28fd66 100644 --- a/tools/config.js +++ b/tools/config.js @@ -193,7 +193,7 @@ _.extend(exports, { getPackagesDirectoryName: function (serverUrl) { var self = this; - var prefix = config.getPackageServerFilePrefix(); + var prefix = config.getPackageServerFilePrefix(serverUrl); if (prefix !== 'packages') { prefix = path.join('packages-from-server', prefix); } @@ -203,7 +203,7 @@ _.extend(exports, { getLocalPackageCacheFilename: function (serverUrl) { var self = this; - var prefix = self.getPackageServerFilePrefix(); + var prefix = self.getPackageServerFilePrefix(serverUrl); // Should look like 'packages.data.db' in the default case // (packages.data.json before 0.9.4). diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 0d9e4fc1f1..9eb3a0866e 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -273,7 +273,14 @@ selftest.define("list-with-a-new-version", selftest.define("do-not-update-to-rcs", ["slow", "net", "test-package-server", "checkout"], function () { - var s = new Sandbox; + + var s = new Sandbox({warehouse: { + "v1": {recommended: true} + }}); + + // This makes packages not depend on meteor (specifically, makes our empty + // control program not depend on meteor). + s.set("NO_METEOR_PACKAGE", "t"); var username = "test"; var password = "testtest"; @@ -288,7 +295,7 @@ selftest.define("do-not-update-to-rcs", // Publish the first version. s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(30); + run.waitSecs(120); run.expectExit(0); run.match("Done"); }); From 9a6532c640421529b88720b75cef907dfcd6e3af Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Sun, 12 Oct 2014 22:50:07 -0700 Subject: [PATCH 203/283] Work towards fixing the "do-not-update-to-rcs" self-test. The test was failing because it was written to run against the real local warehouse, instead of a stubbed one. When initializing the Sandbox with an explicit warehouse, the test failed because of incorrect logic piping the right path to the packages database (in this case "test-packages.data.db" instead of "packages.data.db"). Unfortunately, the test still fails -- this time potentially due to a bug: After publishing the package for the first time with `--create`, the next step tries to update but gets the following error: There is no package named test:i1iyhj. If you are creating a new package, use the --create flag. --- tools/config.js | 4 ++-- tools/tests/publish.js | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/config.js b/tools/config.js index c1ac0d7db3..943e28fd66 100644 --- a/tools/config.js +++ b/tools/config.js @@ -193,7 +193,7 @@ _.extend(exports, { getPackagesDirectoryName: function (serverUrl) { var self = this; - var prefix = config.getPackageServerFilePrefix(); + var prefix = config.getPackageServerFilePrefix(serverUrl); if (prefix !== 'packages') { prefix = path.join('packages-from-server', prefix); } @@ -203,7 +203,7 @@ _.extend(exports, { getLocalPackageCacheFilename: function (serverUrl) { var self = this; - var prefix = self.getPackageServerFilePrefix(); + var prefix = self.getPackageServerFilePrefix(serverUrl); // Should look like 'packages.data.db' in the default case // (packages.data.json before 0.9.4). diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 0d9e4fc1f1..9eb3a0866e 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -273,7 +273,14 @@ selftest.define("list-with-a-new-version", selftest.define("do-not-update-to-rcs", ["slow", "net", "test-package-server", "checkout"], function () { - var s = new Sandbox; + + var s = new Sandbox({warehouse: { + "v1": {recommended: true} + }}); + + // This makes packages not depend on meteor (specifically, makes our empty + // control program not depend on meteor). + s.set("NO_METEOR_PACKAGE", "t"); var username = "test"; var password = "testtest"; @@ -288,7 +295,7 @@ selftest.define("do-not-update-to-rcs", // Publish the first version. s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(30); + run.waitSecs(120); run.expectExit(0); run.match("Done"); }); From b16715989a486a4219954233a45345119692ae52 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Sun, 12 Oct 2014 23:08:41 -0700 Subject: [PATCH 204/283] Revert "Work towards fixing the "do-not-update-to-rcs" self-test." This reverts commit 89b394d9744a6b6399b469c2801dee73264f4626. I cherry-picked the change onto devel, since this change isn't even supposed to change the behavior of the tool. Why risk it just before the release? Thanks @nim for the suggestion. --- tools/config.js | 4 ++-- tools/tests/publish.js | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tools/config.js b/tools/config.js index 943e28fd66..c1ac0d7db3 100644 --- a/tools/config.js +++ b/tools/config.js @@ -193,7 +193,7 @@ _.extend(exports, { getPackagesDirectoryName: function (serverUrl) { var self = this; - var prefix = config.getPackageServerFilePrefix(serverUrl); + var prefix = config.getPackageServerFilePrefix(); if (prefix !== 'packages') { prefix = path.join('packages-from-server', prefix); } @@ -203,7 +203,7 @@ _.extend(exports, { getLocalPackageCacheFilename: function (serverUrl) { var self = this; - var prefix = self.getPackageServerFilePrefix(serverUrl); + var prefix = self.getPackageServerFilePrefix(); // Should look like 'packages.data.db' in the default case // (packages.data.json before 0.9.4). diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 9eb3a0866e..0d9e4fc1f1 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -273,14 +273,7 @@ selftest.define("list-with-a-new-version", selftest.define("do-not-update-to-rcs", ["slow", "net", "test-package-server", "checkout"], function () { - - var s = new Sandbox({warehouse: { - "v1": {recommended: true} - }}); - - // This makes packages not depend on meteor (specifically, makes our empty - // control program not depend on meteor). - s.set("NO_METEOR_PACKAGE", "t"); + var s = new Sandbox; var username = "test"; var password = "testtest"; @@ -295,7 +288,7 @@ selftest.define("do-not-update-to-rcs", // Publish the first version. s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(120); + run.waitSecs(30); run.expectExit(0); run.match("Done"); }); From 73ff027fec69d8f09982aa06969dc95c7eb39f45 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Mon, 13 Oct 2014 09:49:30 -0700 Subject: [PATCH 205/283] Avoid EULA prompt that is breaking self-test We need to rework the EULA prompt to be once-per-machine anyway. --- tools/tests/cordova-platforms.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 7e9d5baf85..9299b1c5a8 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -16,9 +16,13 @@ selftest.define("add cordova platforms", function () { run.match("meteor add-platform android"); run.expectExit(1); + // XXX: This prints the Android EULA. + // We should move this to a once-per-machine agreement. + /* run = s.run("add-platform", "android"); run.matchErr("Platform is not installed"); run.expectExit(2); + */ run = s.run("install-sdk", "android"); run.extraTime = 90; // Big downloads From cb97ed238bb8c14a13edc6057f78f4dc8bbbe064 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Mon, 13 Oct 2014 09:55:16 -0700 Subject: [PATCH 206/283] Add clarifying comment to failing pre-release versions self-test --- tools/tests/publish.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/tests/publish.js b/tools/tests/publish.js index 9eb3a0866e..52e71de460 100644 --- a/tools/tests/publish.js +++ b/tools/tests/publish.js @@ -270,10 +270,19 @@ selftest.define("list-with-a-new-version", }); +// Test that we only try to upgrade to pre-release versions of +// packages (eg 0.0.1-rc, 0.0.2-pre, ...) if there is at least one +// package already on a pre-release verison. That is -- adding a +// single pre-release version of a package is opting into "try to find +// use pre-release versions of any package if necessary" selftest.define("do-not-update-to-rcs", ["slow", "net", "test-package-server", "checkout"], function () { + // This test needs to run with a stub warehouse, since otherwise we + // might find outselves running while a Meteor release is being + // prepared, in which case we already have some packages in + // pre-release version. var s = new Sandbox({warehouse: { "v1": {recommended: true} }}); From f2645c1ac95f86a1deaa61c5a484cec93bedf5de Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 11:17:12 -0700 Subject: [PATCH 207/283] Update todos --- examples/todos/client/templates/app-body.html | 2 +- examples/todos/client/templates/app-body.js | 5 +++-- examples/todos/client/templates/lists-show.js | 7 +++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/todos/client/templates/app-body.html b/examples/todos/client/templates/app-body.html index 8284fe7748..5a4f8dbb8d 100644 --- a/examples/todos/client/templates/app-body.html +++ b/examples/todos/client/templates/app-body.html @@ -10,7 +10,7 @@ {{else}} {{/if}} - {{email}} + {{emailLocalPart}} {{#if userMenuOpen}} Logout diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js index 2a567bc78c..ef5df616ae 100644 --- a/examples/todos/client/templates/app-body.js +++ b/examples/todos/client/templates/app-body.js @@ -58,8 +58,9 @@ Template.appBody.helpers({ cordova: function() { return Meteor.isCordova && 'cordova'; }, - email: function() { - return Meteor.user().emails[0].address; + emailLocalPart: function() { + var email = Meteor.user().emails[0].address; + return email.substring(0, email.indexOf('@')); }, userMenuOpen: function() { return Session.get(USER_MENU_KEY); diff --git a/examples/todos/client/templates/lists-show.js b/examples/todos/client/templates/lists-show.js index 17f7cd2335..483709d350 100644 --- a/examples/todos/client/templates/lists-show.js +++ b/examples/todos/client/templates/lists-show.js @@ -34,10 +34,9 @@ Template.listsShow.helpers({ var editList = function(list, template) { Session.set(EDITING_KEY, true); - // wait for the template to redraw based on the reactive change - Tracker.afterFlush(function() { - template.$('.js-edit-form input[type=text]').focus(); - }); + // force the template to redraw based on the reactive change + Tracker.flush(); + template.$('.js-edit-form input[type=text]').focus(); }; var saveList = function(list, template) { From fc7c44dc1a325ad331d5e7077a97488e3ed8a5d6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 13 Oct 2014 13:02:51 -0400 Subject: [PATCH 208/283] Print instructions for `meteor run ios-device`. Summary: Task: https://app.asana.com/0/15750483766338/16682276437409 Test Plan: Run `meteor run ios-device` with and without Xcode already open, with and without a device connected. Reviewers: sashko, avital, nim, slava Reviewed By: sashko Differential Revision: https://phabricator.meteor.com/D855 --- tools/commands-cordova.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 5e4b648c30..eadbb411e1 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -3,6 +3,7 @@ var path = require('path'); var _ = require('underscore'); var fs = require('fs'); var util = require('util'); +var chalk = require('chalk'); var files = require('./files.js'); var buildmessage = require('./buildmessage.js'); var project = require('./project.js').project; @@ -951,11 +952,25 @@ var execCordovaOnPlatform = function (localPath, platformName, options) { // XXX assert we have a valid Cordova project if (platform === 'ios' && isDevice) { verboseLog('It is ios-device, just opening the Xcode project with `open` command'); - // ios-deploy is super buggy, so we just open xcode and let the user - // start the app themselves. XXX print a message about this? + execFileSyncOrThrow('sh', ['-c', 'open ' + path.join(localPath, 'cordova-build', 'platforms', 'ios', '*.xcodeproj')]); + + // ios-deploy is super buggy, so we just open xcode and let the user + // start the app themselves. + Console.stdout.write([ + "", + chalk.green([ + "Your project has been opened in Xcode so that you can run your app on ", + "an iOS device. For further instructions, visit this wiki page:", + ].join("\n")), + chalk.cyan( + "https://github.com/meteor/meteor/wiki/How-to-run-your-app-on-an-iOS-device" + ), + "" + ].join("\n")); + } else { verboseLog('Running emulator:', localCordova, args); var emulatorOptions = { verbose: options.verbose, cwd: cordovaPath }; From 368cd01843f2a06db89b9d7c165dd89d6ba9676c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 13 Oct 2014 14:12:44 -0400 Subject: [PATCH 209/283] Print instructions for `meteor run android-device`. Summary: Task: https://app.asana.com/0/15750483766338/16682276437409 Test Plan: Run `meteor run android-device` with and without an Android device connected. Reviewers: sashko, avital, nim, slava Differential Revision: https://phabricator.meteor.com/D856 --- tools/commands-cordova.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index eadbb411e1..c3af98ead1 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -980,9 +980,22 @@ var execCordovaOnPlatform = function (localPath, platformName, options) { // This is odd; the IP address is on the host, not inside the emulator emulatorOptions.env['http_proxy'] = '127.0.0.1:' + options.httpProxyPort; } + execFileAsyncOrThrow( - localCordova, args, - emulatorOptions); + localCordova, args, emulatorOptions, + function(err, code) { + if (err && platform === "android" && isDevice) { + Console.stderr.write([ + "", + chalk.green("Instructions for running your app on an Android device:"), + chalk.cyan("https://github.com/meteor/meteor/wiki/How-to-run-your-app-on-an-Android-device"), + "" + ].join("\n")); + + throw err; + } + } + ); } var Log = getLoadedPackages().logging.Log; From f286bef233628392f117b5f050d2779c240def71 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 12:29:21 -0700 Subject: [PATCH 210/283] Update banner.json --- examples/todos/.meteor/release | 2 +- examples/todos/.meteor/versions | 8 ++++---- scripts/admin/banners.json | 13 +++---------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 4fb2b712d3..92555bf2eb 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@0.9.4-rc.3 +METEOR@0.9.4-rc.6 diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index 68be03a1aa..d07c65cf17 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -11,7 +11,7 @@ callback-hook@1.0.1-rc.0 check@1.0.2-rc.0 ctl-helper@1.0.4-rc.0 ctl@1.0.2-rc.0 -ddp@1.0.10-rc.2 +ddp@1.0.10-rc.3 deps@1.0.5-rc.0 ejson@1.0.4-rc.0 email@1.0.4-rc.0 @@ -20,7 +20,7 @@ follower-livedata@1.0.2-rc.0 geojson-utils@1.0.1-rc.0 html-tools@1.0.2-rc.0 htmljs@1.0.2-rc.0 -http@1.0.7-rc.3 +http@1.0.7-rc.4 id-map@1.0.1-rc.0 insecure@1.0.1-rc.0 iron:core@0.3.4 @@ -29,7 +29,7 @@ iron:layout@0.4.1 iron:router@0.9.4 jquery@1.0.1-rc.0 json@1.0.1-rc.0 -less@1.0.10-rc.3 +less@1.0.10-rc.4 livedata@1.0.11-rc.0 localstorage@1.0.1-rc.0 logging@1.0.4-rc.0 @@ -55,7 +55,7 @@ spacebars-compiler@1.0.3-rc.0 spacebars@1.0.3-rc.0 srp@1.0.1-rc.0 standard-app-packages@1.0.3-rc.0 -templating@1.0.8-rc.2 +templating@1.0.8-rc.3 tracker@1.0.3-rc.0 ui@1.0.4-rc.0 underscore@1.0.1-rc.0 diff --git a/scripts/admin/banners.json b/scripts/admin/banners.json index b184d27c29..3252b957c1 100644 --- a/scripts/admin/banners.json +++ b/scripts/admin/banners.json @@ -1,19 +1,12 @@ { "track": "METEOR", "banners": [ { - "versions": ["0.9.0", "0.9.0.1", "0.9.1", "0.9.1.1", "0.9.2", "0.9.2.1", "0.9.2.2"], + "versions": ["0.9.0", "0.9.0.1", "0.9.1", "0.9.1.1", "0.9.2", + "0.9.2.1", "0.9.2.2", "0.9.3", "0.9.3.1"], "banner": { "text": -"=> Meteor 0.9.3.1 is out with improvements for working with packages,\n including: speedups, more information about conflicting packages on\n update, and additional features for package authors.\n\n Meteor 0.9.3.1 is being downloaded in the background. You can update to\n it by running 'meteor update'." - } - }, - { - "versions": ["0.9.3"], - "banner": { - "text": - -"=> Meteor 0.9.3.1 is out, fixing a few bugs in 0.9.3. You can update to \n it by running 'meteor update'." +"=> Meteor 0.9.4 is out with improved PhoneGap/Cordova support, speedups for the\n packaging system, several backwards-compatible API changes, and some new\n features: a new meteor debug command, an option for running Velocity tests with\n the command line tool, and a new configuration file for specifying mobile app\n metadata, icons, and splash screens.\n\n Meteor 0.9.4 is being downloaded in the background. You can update to\n it by running 'meteor update'." } } ] From f5bf536de5ff620368d406b7d421be75386bbbf9 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 13:22:49 -0700 Subject: [PATCH 211/283] Add 0.9.4 heading to History --- History.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.md b/History.md index 1e36ca3bb9..297fe6adce 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,7 @@ ## v.NEXT +## v0.9.4 + ### New Features * The new `meteor debug` command and `--debug-port` command line option From 44b15960c808f2026d898b8269d788668aedc7c9 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 13:28:37 -0700 Subject: [PATCH 212/283] Specify defaults for --mobile-server --- History.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 297fe6adce..931cdb71eb 100644 --- a/History.md +++ b/History.md @@ -99,7 +99,8 @@ * The `--mobile-port` option `meteor run` has been reworked. The option is now `--mobile-server` in `meteor run` and `--server` in `meteor build`. `--server` is required for `meteor build` in apps with mobile - platforms installed. XXX describe defaults for --mobile-server. + platforms installed. `--mobile-server` defaults to an automatically + detected IP address on port 3000, and `--server` requires a hostname but defaults to port 80 if a port is not specified. * Operations that take longer than a few seconds (e.g. downloading packages, installing the Android SDK, etc) now show a progress bar. From 4a657a1bd0047f19f3d189c26f75042af7ff925b Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 13:31:59 -0700 Subject: [PATCH 213/283] Bump rc version --- scripts/admin/meteor-release-experimental.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index e160361a7b..ac96ed7ead 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "0.9.4-rc.7", + "version": "0.9.4-rc.8", "recommended": false, "official": false, "description": "An RC of Meteor 0.9.4." From 667f3b8a9196e12723c045124f93b3e63a9ada56 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 13:35:03 -0700 Subject: [PATCH 214/283] Bump package versions for rc.8 --- packages/http/package.js | 2 +- packages/less/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/netroute/package.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/http/package.js b/packages/http/package.js index b18811040e..b599f6bd72 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-rc.4' + version: '1.0.7-rc.5' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/less/package.js b/packages/less/package.js index 886ea5ea68..39d061c6e3 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-rc.4" + version: "1.0.10-rc.5" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index ab478cd14a..ae6c163856 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.9' + version: '1.0.34-rc.10' }); Package.includeTool(); diff --git a/packages/netroute/package.js b/packages/netroute/package.js index c43555de84..b03c8a4d2c 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.5" + version: "0.2.5-rc.6" }); Npm.depends({ From aac410cbb26d9afa2d476fad6231a0d31de96716 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 Oct 2014 12:17:32 -0700 Subject: [PATCH 215/283] fix make-bootstrap-tarballs for sqlite world --- tools/catalog-remote.js | 42 +++++++++++++++++++++++++++++++++----- tools/commands-packages.js | 29 ++++++++++++++------------ 2 files changed, 53 insertions(+), 18 deletions(-) diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index 2a7ece21e5..3df8f23dd5 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -162,6 +162,18 @@ _.extend(Db.prototype, { } }, + // Do not call any other methods on this object after calling this one. + // This yields. + closePermanently: function () { + var self = this; + self._closePreparedStatements(); + var db = self._db; + self._db = null; + var future = new Future; + db.close(future.resolver()); + future.wait(); + }, + // Runs the function inside a transaction block runInTransaction: function (action) { var self = this; @@ -475,7 +487,7 @@ _.extend(Table.prototype, { // under the variable "official" from the catalog.js // // The remote catalog is backed by a db to make things easier on the memory and for faster queries -var RemoteCatalog = function (options) { +var RemoteCatalog = function () { var self = this; // Set this to true if we are not going to connect to the remote package @@ -483,8 +495,6 @@ var RemoteCatalog = function (options) { // This means that the catalog might be out of date on the latest developments. self.offline = null; - self.options = options || {}; - self.db = null; self._currentRefreshIsLoud = false; }; @@ -492,7 +502,17 @@ var RemoteCatalog = function (options) { _.extend(RemoteCatalog.prototype, { toString: function () { var self = this; - return "RemoteCatalog [options=" + JSON.stringify(self.options) + "]"; + return "RemoteCatalog"; + }, + + // Used for special cases that want to ensure that all connections to the DB + // are closed (eg to ensure that all writes have been flushed from the '-wal' + // file to the main DB file). Most methods on this class will stop working + // after you call this method. Note that this yields. + closePermanently: function () { + var self = this; + self.db.closePermanently(); + self.db = null; }, getVersion: function (name, version) { @@ -599,6 +619,19 @@ _.extend(RemoteCatalog.prototype, { return result[0]; }, + // Used by make-bootstrap-tarballs. Only should be used on catalogs that are + // specially constructed for bootstrap tarballs. + forceRecommendRelease: function (track, version) { + var self = this; + var releaseVersionData = self.getReleaseVersion(track, version); + if (!releaseVersionData) { + throw Error("Can't force-recommend unknown release " + track + "@" + + version); + } + releaseVersionData.recommended = true; + self._insertReleaseVersions([releaseVersionData]); + }, + getAllReleaseTracks: function () { return _.pluck(this._queryWithRetry("SELECT name FROM releaseTracks"), 'name'); }, @@ -783,7 +816,6 @@ _.extend(RemoteCatalog.prototype, { }); }, - // XXX: Remove this; it is only here for the tests, and that is a hack _insertReleaseVersions: function(releaseVersions) { var self = this; return self.db.runInTransaction(function (txn) { diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 99b2b48dee..0b189be916 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -20,6 +20,7 @@ var tropohouse = require('./tropohouse.js'); var PackageSource = require('./package-source.js'); var compiler = require('./compiler.js'); var catalog = require('./catalog.js'); +var catalogRemote = require('./catalog-remote.js'); var stats = require('./stats.js'); var isopack = require('./isopack.js'); var cordova = require('./commands-cordova.js'); @@ -2426,9 +2427,12 @@ main.registerCommand({ // Get a copy of the data.json. var dataTmpdir = files.mkdtemp(); - var tmpDataJson = path.join(dataTmpdir, 'data.db'); + var tmpDataFile = path.join(dataTmpdir, 'packages.data.db'); - var tmpCatalog = new catalog.Remote({packageStorage : tmpDataJson}); + var tmpCatalog = new catalogRemote.RemoteCatalog(); + tmpCatalog.initialize({ + packageStorage: tmpDataFile + }); var savedData = packageClient.updateServerPackageData(tmpCatalog, null); if (!savedData) { // will have already printed an error @@ -2439,16 +2443,12 @@ main.registerCommand({ // so we should ensure that once it is downloaded, it knows it is recommended // rather than having a little identity crisis and thinking that a past // release is the latest recommended until it manages to sync. - var dataFromDisk = JSON.parse(fs.readFileSync(tmpDataJson)); - var releaseInData = _.findWhere(dataFromDisk.collections.releaseVersions, { - track: parsed.package, version: parsed.constraint - }); - if (!releaseInData) { - Console.error("Can't find release in data!"); - return 3; + tmpCatalog.forceRecommendRelease(parsed.package, parsed.constraint); + tmpCatalog.closePermanently(); + if (fs.existsSync(tmpDataFile + '-wal')) { + throw Error("Write-ahead log still exists for " + tmpDataFile + + " so the data file will be incomplete!"); } - releaseInData.recommended = true; - files.writeFileAtomically(tmpDataJson, JSON.stringify(dataFromDisk, null, 2)); _.each(osArches, function (osArch) { var tmpdir = files.mkdtemp(); @@ -2486,8 +2486,11 @@ main.registerCommand({ return 1; } - // Install the data.json file we synced earlier. - files.copyFile(tmpDataJson, config.getPackageStorage(tmpTropo)); + // Install the sqlite DB file we synced earlier. We have previously + // confirmed that the "-wal" file (which could contain extra log entries + // that haven't been flushed to the main file yet) doesn't exist, so we + // don't have to copy it. + files.copyFile(tmpDataFile, config.getPackageStorage(tmpTropo)); // Create the top-level 'meteor' symlink, which links to the latest tool's // meteor shell script. From d00d4748377c91ebe07e5abf2ab504f77fdba8f2 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:04:27 -0700 Subject: [PATCH 216/283] Fix banner indentation --- scripts/admin/banners.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/admin/banners.json b/scripts/admin/banners.json index 3252b957c1..fa3d402a17 100644 --- a/scripts/admin/banners.json +++ b/scripts/admin/banners.json @@ -6,7 +6,7 @@ "banner": { "text": -"=> Meteor 0.9.4 is out with improved PhoneGap/Cordova support, speedups for the\n packaging system, several backwards-compatible API changes, and some new\n features: a new meteor debug command, an option for running Velocity tests with\n the command line tool, and a new configuration file for specifying mobile app\n metadata, icons, and splash screens.\n\n Meteor 0.9.4 is being downloaded in the background. You can update to\n it by running 'meteor update'." +"=> Meteor 0.9.4 is out with improved PhoneGap/Cordova support, speedups for the\n packaging system, several backwards-compatible API changes, and some new\n features: a new meteor debug command, an option for running Velocity tests with\n the command line tool, and a new configuration file for specifying mobile app\n metadata, icons, and splash screens.\n\n Meteor 0.9.4 is being downloaded in the background. You can update to\n it by running 'meteor update'." } } ] From 36da5aecb492fe479e56bfb87505bcaa1014ec82 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:09:37 -0700 Subject: [PATCH 217/283] Make all version numbers not have rc --- packages/accounts-base/package.js | 2 +- packages/accounts-facebook/package.js | 2 +- packages/accounts-github/package.js | 2 +- packages/accounts-google/package.js | 2 +- packages/accounts-meetup/package.js | 2 +- packages/accounts-meteor-developer/package.js | 2 +- packages/accounts-oauth/package.js | 2 +- packages/accounts-password/package.js | 2 +- packages/accounts-twitter/package.js | 2 +- packages/accounts-ui-unstyled/package.js | 2 +- packages/accounts-ui/package.js | 2 +- packages/accounts-weibo/package.js | 2 +- packages/appcache/package.js | 2 +- packages/application-configuration/package.js | 2 +- packages/audit-argument-checks/package.js | 2 +- packages/autopublish/package.js | 2 +- packages/autoupdate/package.js | 2 +- packages/base64/package.js | 2 +- packages/binary-heap/package.js | 2 +- packages/blaze-tools/package.js | 2 +- packages/blaze/package.js | 2 +- packages/boilerplate-generator/package.js | 2 +- packages/browser-policy-common/package.js | 2 +- packages/browser-policy-content/package.js | 2 +- packages/browser-policy-framing/package.js | 2 +- packages/browser-policy/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/check/package.js | 2 +- packages/code-prettify/package.js | 2 +- packages/coffeescript-test-helper/package.js | 2 +- packages/coffeescript/package.js | 2 +- packages/constraint-solver/package.js | 2 +- packages/ctl-helper/package.js | 2 +- packages/ctl/package.js | 2 +- packages/ddp/package.js | 2 +- packages/deps/package.js | 2 +- packages/dev-bundle-fetcher/package.js | 2 +- packages/disable-oplog/package.js | 2 +- packages/ejson/package.js | 2 +- packages/email/package.js | 2 +- packages/facebook/package.js | 2 +- packages/facts/package.js | 2 +- packages/fastclick/package.js | 2 +- packages/follower-livedata/package.js | 2 +- packages/force-ssl/package.js | 2 +- packages/geojson-utils/package.js | 2 +- packages/github/package.js | 2 +- packages/google/package.js | 2 +- packages/handlebars/package.js | 2 +- packages/html-tools/package.js | 2 +- packages/htmljs/package.js | 2 +- packages/http/package.js | 2 +- packages/id-map/package.js | 2 +- packages/insecure/package.js | 2 +- packages/jquery-history/package.js | 2 +- packages/jquery-layout/package.js | 2 +- packages/jquery-waypoints/package.js | 2 +- packages/jquery/package.js | 2 +- packages/js-analyze-tests/package.js | 2 +- packages/js-analyze/package.js | 2 +- packages/json/package.js | 2 +- packages/jsparse/package.js | 2 +- packages/less/package.js | 2 +- packages/livedata/package.js | 2 +- packages/localstorage/package.js | 2 +- packages/logging/package.js | 2 +- packages/markdown/package.js | 2 +- packages/meetup/package.js | 2 +- packages/meteor-developer/package.js | 2 +- packages/meteor-platform/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- packages/meyerweb-reset/package.js | 2 +- packages/minifiers/package.js | 2 +- packages/minimongo/package.js | 2 +- packages/mobile-status-bar/package.js | 2 +- packages/mongo-livedata/package.js | 2 +- packages/mongo/package.js | 2 +- packages/netroute/package.js | 2 +- packages/oauth-encryption/package.js | 2 +- packages/oauth/package.js | 2 +- packages/oauth1/package.js | 2 +- packages/oauth2/package.js | 2 +- packages/observe-sequence/package.js | 2 +- packages/ordered-dict/package.js | 2 +- packages/package-stats-opt-out/package.js | 2 +- packages/package-version-parser/package.js | 2 +- packages/preserve-inputs/package.js | 2 +- packages/random/package.js | 2 +- packages/reactive-dict/package.js | 2 +- packages/reactive-var/package.js | 2 +- packages/reload-safetybelt/package.js | 2 +- packages/reload/package.js | 2 +- packages/retry/package.js | 2 +- packages/routepolicy/package.js | 2 +- packages/service-configuration/package.js | 2 +- packages/session/package.js | 2 +- packages/sha/package.js | 2 +- packages/showdown/package.js | 2 +- packages/spacebars-compiler/package.js | 2 +- packages/spacebars-tests/package.js | 2 +- packages/spacebars/package.js | 2 +- packages/spiderable/package.js | 2 +- packages/srp/package.js | 2 +- packages/standard-app-packages/package.js | 2 +- packages/star-translate/package.js | 2 +- packages/startup/package.js | 2 +- packages/stylus/package.js | 2 +- packages/templating/package.js | 2 +- packages/test-helpers/package.js | 2 +- packages/test-in-browser/package.js | 2 +- packages/test-in-console/package.js | 2 +- packages/test-server-tests-in-console-once/package.js | 2 +- packages/tinytest/package.js | 2 +- packages/tracker/package.js | 2 +- packages/twitter/package.js | 2 +- packages/ui/package.js | 2 +- packages/underscore-tests/package.js | 2 +- packages/underscore/package.js | 2 +- packages/url/package.js | 2 +- packages/webapp-hashing/package.js | 2 +- packages/webapp/package.js | 2 +- packages/weibo/package.js | 2 +- packages/xmlbuilder/package.js | 2 +- scripts/admin/bump-all-version-numbers.js | 4 ++-- 125 files changed, 126 insertions(+), 126 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 19f7ab420f..a370823a77 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.1.2-rc.2" + version: "1.1.2" }); Package.on_use(function (api) { diff --git a/packages/accounts-facebook/package.js b/packages/accounts-facebook/package.js index 5b0c730269..36b7f64329 100644 --- a/packages/accounts-facebook/package.js +++ b/packages/accounts-facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Facebook accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/accounts-github/package.js b/packages/accounts-github/package.js index c0bfa2f9dc..9e30f5d8fc 100644 --- a/packages/accounts-github/package.js +++ b/packages/accounts-github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Github accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/accounts-google/package.js b/packages/accounts-google/package.js index d22308a617..8515ef8034 100644 --- a/packages/accounts-google/package.js +++ b/packages/accounts-google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Google accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/accounts-meetup/package.js b/packages/accounts-meetup/package.js index 90addab0ab..aa42b462cd 100644 --- a/packages/accounts-meetup/package.js +++ b/packages/accounts-meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meetup accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/accounts-meteor-developer/package.js b/packages/accounts-meteor-developer/package.js index f5107fbb78..2d16f72e6d 100644 --- a/packages/accounts-meteor-developer/package.js +++ b/packages/accounts-meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meteor developer accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/accounts-oauth/package.js b/packages/accounts-oauth/package.js index 434ca5d32b..7e98bbfc27 100644 --- a/packages/accounts-oauth/package.js +++ b/packages/accounts-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based login services", - version: "1.1.2-rc.0" + version: "1.1.2" }); Package.on_use(function (api) { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index ad718b4aaf..25c2bb9117 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Password support for accounts", - version: "1.0.3-rc.0" + version: "1.0.3" }); Package.on_use(function(api) { diff --git a/packages/accounts-twitter/package.js b/packages/accounts-twitter/package.js index 63760393fe..e065f789c6 100644 --- a/packages/accounts-twitter/package.js +++ b/packages/accounts-twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Twitter accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/accounts-ui-unstyled/package.js b/packages/accounts-ui-unstyled/package.js index 7f435926ad..aef2611535 100644 --- a/packages/accounts-ui-unstyled/package.js +++ b/packages/accounts-ui-unstyled/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Unstyled version of login widgets", - version: "1.1.3-rc.0" + version: "1.1.3" }); Package.on_use(function (api) { diff --git a/packages/accounts-ui/package.js b/packages/accounts-ui/package.js index 024251e1c6..9fd88c1e08 100644 --- a/packages/accounts-ui/package.js +++ b/packages/accounts-ui/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Simple templates to add login widgets to an app", - version: "1.1.2-rc.0" + version: "1.1.2" }); Package.on_use(function (api) { diff --git a/packages/accounts-weibo/package.js b/packages/accounts-weibo/package.js index cf0357cc71..fa3bd324f9 100644 --- a/packages/accounts-weibo/package.js +++ b/packages/accounts-weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Sina Weibo accounts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 0cefc1becf..a5ee05a9b9 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Enable the application cache in the browser", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.onUse(function (api) { diff --git a/packages/application-configuration/package.js b/packages/application-configuration/package.js index bc4962ca76..4e19ec152d 100644 --- a/packages/application-configuration/package.js +++ b/packages/application-configuration/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Interaction with the configuration sources for your apps", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/audit-argument-checks/package.js b/packages/audit-argument-checks/package.js index 5191a2a194..336f8f9c00 100644 --- a/packages/audit-argument-checks/package.js +++ b/packages/audit-argument-checks/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Try to detect inadequate input sanitization", - version: '1.0.1-rc.0' + version: '1.0.1' }); // This package is empty; its presence is detected by livedata. diff --git a/packages/autopublish/package.js b/packages/autopublish/package.js index f9d9296526..bece2d51d5 100644 --- a/packages/autopublish/package.js +++ b/packages/autopublish/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Publish the entire database to all clients", - version: '1.0.1-rc.0' + version: '1.0.1' }); // This package is empty; its presence is detected by livedata and diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 94a2e26eed..994b07f9e4 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Update the client when new client code is available", - version: '1.1.2-rc.4' + version: '1.1.2' }); Cordova.depends({ diff --git a/packages/base64/package.js b/packages/base64/package.js index dd5b539205..a585469205 100644 --- a/packages/base64/package.js +++ b/packages/base64/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Base64 encoding and decoding", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/binary-heap/package.js b/packages/binary-heap/package.js index 57fe29ad38..ddd41ef19a 100644 --- a/packages/binary-heap/package.js +++ b/packages/binary-heap/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Binary Heap datastructure implementation", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/blaze-tools/package.js b/packages/blaze-tools/package.js index 3facd0fd6d..615df9e8ae 100644 --- a/packages/blaze-tools/package.js +++ b/packages/blaze-tools/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Compile-time tools for Blaze", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/blaze/package.js b/packages/blaze/package.js index dc41835bdd..e39698c2e0 100644 --- a/packages/blaze/package.js +++ b/packages/blaze/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor Reactive Templating library", - version: '2.0.2-rc.0' + version: '2.0.2' }); Package.on_use(function (api) { diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index e0bc30dc41..b0d75bc70d 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/browser-policy-common/package.js b/packages/browser-policy-common/package.js index 226e7fe56e..88d2bbc0d9 100644 --- a/packages/browser-policy-common/package.js +++ b/packages/browser-policy-common/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for browser-policy packages", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/browser-policy-content/package.js b/packages/browser-policy-content/package.js index 132b27744b..f4cf825775 100644 --- a/packages/browser-policy-content/package.js +++ b/packages/browser-policy-content/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Configure content security policies", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/browser-policy-framing/package.js b/packages/browser-policy-framing/package.js index 993f27e393..ed66d69e33 100644 --- a/packages/browser-policy-framing/package.js +++ b/packages/browser-policy-framing/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Restrict which websites can frame your app", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/browser-policy/package.js b/packages/browser-policy/package.js index 6a0691dbc1..5b95bc26d1 100644 --- a/packages/browser-policy/package.js +++ b/packages/browser-policy/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Configure security policies enforced by the browser", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index d756315933..7fd3a8080e 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/check/package.js b/packages/check/package.js index 6d5b3bbfcf..6e180e920f 100644 --- a/packages/check/package.js +++ b/packages/check/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Check whether a value matches a pattern", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/code-prettify/package.js b/packages/code-prettify/package.js index 4808404a10..08757282a7 100644 --- a/packages/code-prettify/package.js +++ b/packages/code-prettify/package.js @@ -8,7 +8,7 @@ var path = Npm.require('path'); Package.describe({ summary: "Syntax highlighting of code, from Google", - version: "1.0.1-rc.0" + version: "1.0.1" }); // XXX this code dumps symbols into the global namespace (directly diff --git a/packages/coffeescript-test-helper/package.js b/packages/coffeescript-test-helper/package.js index 56c9aa3687..d0e7bfe103 100644 --- a/packages/coffeescript-test-helper/package.js +++ b/packages/coffeescript-test-helper/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Used by the coffeescript package's tests", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/coffeescript/package.js b/packages/coffeescript/package.js index 37d5ffd3ce..4d02d63eac 100644 --- a/packages/coffeescript/package.js +++ b/packages/coffeescript/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Javascript dialect with fewer braces and semicolons", - version: "1.0.4-rc.0" + version: "1.0.4" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/constraint-solver/package.js b/packages/constraint-solver/package.js index 103e39367f..e8f5f1c9e0 100644 --- a/packages/constraint-solver/package.js +++ b/packages/constraint-solver/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Given the set of the constraints, picks a satisfying configuration", - version: "1.0.15-rc.0" + version: "1.0.15" }); Npm.depends({ diff --git a/packages/ctl-helper/package.js b/packages/ctl-helper/package.js index 36db6cd3dc..da5d835070 100644 --- a/packages/ctl-helper/package.js +++ b/packages/ctl-helper/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Helpers for control programs", - version: "1.0.4-rc.0" + version: "1.0.4" }); Npm.depends({optimist: '0.6.0'}); diff --git a/packages/ctl/package.js b/packages/ctl/package.js index 5e1ad4eaab..2dee0a0a63 100644 --- a/packages/ctl/package.js +++ b/packages/ctl/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Default control program for an application", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/ddp/package.js b/packages/ddp/package.js index 22ecc6b5c3..e2b1ed0ffd 100644 --- a/packages/ddp/package.js +++ b/packages/ddp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data framework", - version: '1.0.10-rc.3' + version: '1.0.10' }); // We use Faye's 'websocket-driver' for connections in server-to-server DDP, diff --git a/packages/deps/package.js b/packages/deps/package.js index 49002733b3..020c84be36 100644 --- a/packages/deps/package.js +++ b/packages/deps/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Deprecated: Use the 'tracker' package instead.", - version: '1.0.5-rc.0' + version: '1.0.5' }); Package.on_use(function (api) { diff --git a/packages/dev-bundle-fetcher/package.js b/packages/dev-bundle-fetcher/package.js index c891b9bffa..167ad7c14b 100644 --- a/packages/dev-bundle-fetcher/package.js +++ b/packages/dev-bundle-fetcher/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A shell script for downloading the Meteor dev bundle", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/disable-oplog/package.js b/packages/disable-oplog/package.js index 30d5e0ec64..2acdce9489 100644 --- a/packages/disable-oplog/package.js +++ b/packages/disable-oplog/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Disables oplog tailing", - version: '1.0.1-rc.0' + version: '1.0.1' }); // This package is empty; its presence is detected by mongo-livedata. diff --git a/packages/ejson/package.js b/packages/ejson/package.js index 5f92fe35e5..c60db85abf 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Extended and Extensible JSON library", - version: '1.0.4-rc.0' + version: '1.0.4' }); Package.on_use(function (api) { diff --git a/packages/email/package.js b/packages/email/package.js index 52b874072f..94ad0b9e13 100644 --- a/packages/email/package.js +++ b/packages/email/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Send email messages", - version: "1.0.4-rc.0" + version: "1.0.4" }); Npm.depends({ diff --git a/packages/facebook/package.js b/packages/facebook/package.js index 3ac745194d..6b935fb5b9 100644 --- a/packages/facebook/package.js +++ b/packages/facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function(api) { diff --git a/packages/facts/package.js b/packages/facts/package.js index a15426a6b5..d17bf77a25 100644 --- a/packages/facts/package.js +++ b/packages/facts/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Publish internal app statistics", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/fastclick/package.js b/packages/fastclick/package.js index bb80d1efbd..84cd3e4681 100644 --- a/packages/fastclick/package.js +++ b/packages/fastclick/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Faster touch events on mobile", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/follower-livedata/package.js b/packages/follower-livedata/package.js index 939187fbe3..db808a5ecf 100644 --- a/packages/follower-livedata/package.js +++ b/packages/follower-livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Maintain a connection to the leader of an election set", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/force-ssl/package.js b/packages/force-ssl/package.js index a4a57a46d9..4e870d0b2f 100644 --- a/packages/force-ssl/package.js +++ b/packages/force-ssl/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Require this application to use HTTPS", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/geojson-utils/package.js b/packages/geojson-utils/package.js index 802b76dfe1..bd48c3d68d 100644 --- a/packages/geojson-utils/package.js +++ b/packages/geojson-utils/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'GeoJSON utility functions (from https://github.com/maxogden/geojson-js-utils)', - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/github/package.js b/packages/github/package.js index 8da6bc5343..9ca8199aac 100644 --- a/packages/github/package.js +++ b/packages/github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Github OAuth flow", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function(api) { diff --git a/packages/google/package.js b/packages/google/package.js index 2ef945ff80..a6c5ce86a3 100644 --- a/packages/google/package.js +++ b/packages/google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Google OAuth flow", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function(api) { diff --git a/packages/handlebars/package.js b/packages/handlebars/package.js index 12641de2b2..2ceb35b8fd 100644 --- a/packages/handlebars/package.js +++ b/packages/handlebars/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/html-tools/package.js b/packages/html-tools/package.js index 9f6270e087..f33bf12efe 100644 --- a/packages/html-tools/package.js +++ b/packages/html-tools/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Standards-compliant HTML tools", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/htmljs/package.js b/packages/htmljs/package.js index eefe93c7e3..1ce7a3db8e 100644 --- a/packages/htmljs/package.js +++ b/packages/htmljs/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Small library for expressing HTML trees", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/http/package.js b/packages/http/package.js index b599f6bd72..b1b222cbfe 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.0.7-rc.5' + version: '1.0.7' }); Npm.depends({request: "2.33.0"}); diff --git a/packages/id-map/package.js b/packages/id-map/package.js index 81b6207880..b5b32ce375 100644 --- a/packages/id-map/package.js +++ b/packages/id-map/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dictionary data structure allowing non-string keys", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/insecure/package.js b/packages/insecure/package.js index 8928e84325..a90aff8dda 100644 --- a/packages/insecure/package.js +++ b/packages/insecure/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allow all database writes by default", - version: '1.0.1-rc.0' + version: '1.0.1' }); // This package is empty; its presence is detected by mongo-livedata. diff --git a/packages/jquery-history/package.js b/packages/jquery-history/package.js index 3d45b17b23..8df0e9a4b7 100644 --- a/packages/jquery-history/package.js +++ b/packages/jquery-history/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "pushState module from the jQuery project", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/jquery-layout/package.js b/packages/jquery-layout/package.js index 51a57e6f03..2738d9c691 100644 --- a/packages/jquery-layout/package.js +++ b/packages/jquery-layout/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Easily create arbitrary multicolumn layouts", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/jquery-waypoints/package.js b/packages/jquery-waypoints/package.js index ae978e1255..b439f8feeb 100644 --- a/packages/jquery-waypoints/package.js +++ b/packages/jquery-waypoints/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run a function when the user scrolls past an element", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/jquery/package.js b/packages/jquery/package.js index fe32de067a..6dd4a4c92a 100644 --- a/packages/jquery/package.js +++ b/packages/jquery/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Manipulate the DOM using CSS selectors", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/js-analyze-tests/package.js b/packages/js-analyze-tests/package.js index 040138c53c..b1bfea8833 100644 --- a/packages/js-analyze-tests/package.js +++ b/packages/js-analyze-tests/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Tests for JavaScript code analysis for Meteor", - version: "1.0.1-rc.0" + version: "1.0.1" }); // The tests are in a separate package so that it is possible to compile diff --git a/packages/js-analyze/package.js b/packages/js-analyze/package.js index dde0f35ce8..a4593be2db 100644 --- a/packages/js-analyze/package.js +++ b/packages/js-analyze/package.js @@ -4,7 +4,7 @@ Package.describe({ summary: "JavaScript code analysis for Meteor", - version: '1.0.3-rc.0' + version: '1.0.3' }); // Use some packages from the Esprima project. If it turns out we need these on diff --git a/packages/json/package.js b/packages/json/package.js index 54b20e41dc..396a069872 100644 --- a/packages/json/package.js +++ b/packages/json/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Provides JSON.stringify and JSON.parse for older browsers", - version: '1.0.1-rc.0' + version: '1.0.1' }); // We need to figure out how to serve this file only to browsers that don't have diff --git a/packages/jsparse/package.js b/packages/jsparse/package.js index 34304d48a9..266421fe76 100644 --- a/packages/jsparse/package.js +++ b/packages/jsparse/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Full-featured JavaScript parser", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/less/package.js b/packages/less/package.js index 39d061c6e3..0bcb82bb13 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The dynamic stylesheet language", - version: "1.0.10-rc.5" + version: "1.0.10" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/livedata/package.js b/packages/livedata/package.js index 1a7bf071ac..504e27268f 100644 --- a/packages/livedata/package.js +++ b/packages/livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'ddp' package", - version: '1.0.11-rc.0' + version: '1.0.11' }); Package.on_use(function (api) { diff --git a/packages/localstorage/package.js b/packages/localstorage/package.js index 0e4e64ecca..e91c1d888e 100644 --- a/packages/localstorage/package.js +++ b/packages/localstorage/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/logging/package.js b/packages/logging/package.js index bf6b8e4576..84dad0776b 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Logging facility.", - version: '1.0.4-rc.0' + version: '1.0.4' }); Npm.depends({ diff --git a/packages/markdown/package.js b/packages/markdown/package.js index 53fcb1a8b5..80c4d1c155 100644 --- a/packages/markdown/package.js +++ b/packages/markdown/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Markdown-to-HTML processor", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function (api) { diff --git a/packages/meetup/package.js b/packages/meetup/package.js index 56b5b51188..aae30a6f0c 100644 --- a/packages/meetup/package.js +++ b/packages/meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meetup OAuth flow", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function(api) { diff --git a/packages/meteor-developer/package.js b/packages/meteor-developer/package.js index e378d10df8..a7d664ebf0 100644 --- a/packages/meteor-developer/package.js +++ b/packages/meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor developer accounts OAuth flow", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function (api) { diff --git a/packages/meteor-platform/package.js b/packages/meteor-platform/package.js index b1c39ebda0..501aa46738 100644 --- a/packages/meteor-platform/package.js +++ b/packages/meteor-platform/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Include a standard set of Meteor packages in your app", - version: '1.1.2-rc.0' + version: '1.1.2' }); Package.on_use(function(api) { diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index ae6c163856..969b6b87ee 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.0.34-rc.10' + version: '1.0.34' }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index a833a59a74..53330601f2 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '1.1.2-rc.3' + version: '1.1.2' }); Package._transitional_registerBuildPlugin({ diff --git a/packages/meyerweb-reset/package.js b/packages/meyerweb-reset/package.js index bfd5b09665..1dec854786 100644 --- a/packages/meyerweb-reset/package.js +++ b/packages/meyerweb-reset/package.js @@ -3,7 +3,7 @@ // encourage this pattern. Maybe another solution would be better. Package.describe({ summary: "reset.css v2.0 from http://meyerweb.com/eric/tools/css/reset/", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/minifiers/package.js b/packages/minifiers/package.js index 5235a74c6c..8d8bbe99ae 100644 --- a/packages/minifiers/package.js +++ b/packages/minifiers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript and CSS minifiers", - version: "1.1.1-rc.0" + version: "1.1.1" }); Npm.depends({ diff --git a/packages/minimongo/package.js b/packages/minimongo/package.js index 3e34ffbdba..a04eaa8aad 100644 --- a/packages/minimongo/package.js +++ b/packages/minimongo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's client-side datastore: a port of MongoDB to Javascript", - version: '1.0.4-rc.0' + version: '1.0.4' }); Package.on_use(function (api) { diff --git a/packages/mobile-status-bar/package.js b/packages/mobile-status-bar/package.js index 96195864b7..9eb1568bfd 100644 --- a/packages/mobile-status-bar/package.js +++ b/packages/mobile-status-bar/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Good defaults for the mobile status bar", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.onUse(function(api) { diff --git a/packages/mongo-livedata/package.js b/packages/mongo-livedata/package.js index e4acdf8dfa..d96d5433f2 100644 --- a/packages/mongo-livedata/package.js +++ b/packages/mongo-livedata/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'mongo' package", - version: '1.0.6-rc.0' + version: '1.0.6' }); Package.on_use(function (api) { diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 54d62e2162..ae128e5a12 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.0.7-rc.0' + version: '1.0.7' }); Npm.depends({ diff --git a/packages/netroute/package.js b/packages/netroute/package.js index b03c8a4d2c..33108ad690 100644 --- a/packages/netroute/package.js +++ b/packages/netroute/package.js @@ -2,7 +2,7 @@ // needs to be uniloaded from tool. Package.describe({ summary: "Wrapper for npm netroute module", - version: "0.2.5-rc.6" + version: "0.2.5" }); Npm.depends({ diff --git a/packages/oauth-encryption/package.js b/packages/oauth-encryption/package.js index 02bdb0c7e3..7d62d90831 100644 --- a/packages/oauth-encryption/package.js +++ b/packages/oauth-encryption/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Encrypt account secrets stored in the database", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/oauth/package.js b/packages/oauth/package.js index 34658b18aa..851c18e1b0 100644 --- a/packages/oauth/package.js +++ b/packages/oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based services", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function (api) { diff --git a/packages/oauth1/package.js b/packages/oauth1/package.js index 73073708ec..03bfcb094a 100644 --- a/packages/oauth1/package.js +++ b/packages/oauth1/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth1-based login services", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function (api) { diff --git a/packages/oauth2/package.js b/packages/oauth2/package.js index fab6f54e9b..a9a2b6350f 100644 --- a/packages/oauth2/package.js +++ b/packages/oauth2/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth2-based login services", - version: "1.1.1-rc.0" + version: "1.1.1" }); Package.on_use(function (api) { diff --git a/packages/observe-sequence/package.js b/packages/observe-sequence/package.js index 880fef0f3c..4e6630f874 100644 --- a/packages/observe-sequence/package.js +++ b/packages/observe-sequence/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Observe changes to various sequence types such as arrays, cursors and objects", - version: "1.0.3-rc.0" + version: "1.0.3" }); Package.on_use(function (api) { diff --git a/packages/ordered-dict/package.js b/packages/ordered-dict/package.js index f8964ebefb..595cf87dca 100644 --- a/packages/ordered-dict/package.js +++ b/packages/ordered-dict/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Ordered traversable dictionary with a mutable ordering", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/package-stats-opt-out/package.js b/packages/package-stats-opt-out/package.js index 89188268d3..1216b65cdd 100644 --- a/packages/package-stats-opt-out/package.js +++ b/packages/package-stats-opt-out/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Opt out of sending package stats", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/package-version-parser/package.js b/packages/package-version-parser/package.js index f50bb6feac..f456aeb8cc 100644 --- a/packages/package-version-parser/package.js +++ b/packages/package-version-parser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Parses Meteor Smart Package version string", - version: "2.0.2-rc.1" + version: "2.0.2" }); Npm.depends({ diff --git a/packages/preserve-inputs/package.js b/packages/preserve-inputs/package.js index dc72ee70af..08bbe106b5 100644 --- a/packages/preserve-inputs/package.js +++ b/packages/preserve-inputs/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated package (now empty)", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/random/package.js b/packages/random/package.js index 4682a971ca..5ca8c9eada 100644 --- a/packages/random/package.js +++ b/packages/random/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Random number generator and utilities", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/reactive-dict/package.js b/packages/reactive-dict/package.js index faae52161b..518eb40297 100644 --- a/packages/reactive-dict/package.js +++ b/packages/reactive-dict/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reactive dictionary", - version: '1.0.4-rc.0' + version: '1.0.4' }); Package.on_use(function (api) { diff --git a/packages/reactive-var/package.js b/packages/reactive-var/package.js index c05e03930b..f406993dad 100644 --- a/packages/reactive-var/package.js +++ b/packages/reactive-var/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reactive variable", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/reload-safetybelt/package.js b/packages/reload-safetybelt/package.js index eb6ed4d976..41303d8779 100644 --- a/packages/reload-safetybelt/package.js +++ b/packages/reload-safetybelt/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload safety belt for multi-server deployments", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/reload/package.js b/packages/reload/package.js index 10af3db434..a62f335a78 100644 --- a/packages/reload/package.js +++ b/packages/reload/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload the page while preserving application state.", - version: '1.1.1-rc.0' + version: '1.1.1' }); Package.on_use(function (api) { diff --git a/packages/retry/package.js b/packages/retry/package.js index d70a7e87af..0da503dab8 100644 --- a/packages/retry/package.js +++ b/packages/retry/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Retry logic with exponential backoff", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/routepolicy/package.js b/packages/routepolicy/package.js index 3c8f29fa1d..5b9678b3a3 100644 --- a/packages/routepolicy/package.js +++ b/packages/routepolicy/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "route policy declarations", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/service-configuration/package.js b/packages/service-configuration/package.js index 849c295bed..cdcb0bc1a6 100644 --- a/packages/service-configuration/package.js +++ b/packages/service-configuration/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Manage the configuration for third-party services", - version: "1.0.2-rc.0" + version: "1.0.2" }); Package.on_use(function(api) { diff --git a/packages/session/package.js b/packages/session/package.js index 6a05b1e853..652c33a606 100644 --- a/packages/session/package.js +++ b/packages/session/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Session variable", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/sha/package.js b/packages/sha/package.js index c8837f42b8..6869048ad5 100644 --- a/packages/sha/package.js +++ b/packages/sha/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "SHA256 implementation", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/showdown/package.js b/packages/showdown/package.js index 3a04d79176..5e58fa3038 100644 --- a/packages/showdown/package.js +++ b/packages/showdown/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to the 'markdown' package", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/spacebars-compiler/package.js b/packages/spacebars-compiler/package.js index 8571200d4b..5e4853b7da 100644 --- a/packages/spacebars-compiler/package.js +++ b/packages/spacebars-compiler/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Compiler for Spacebars template language", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/spacebars-tests/package.js b/packages/spacebars-tests/package.js index cce84e0897..f455afa5b4 100644 --- a/packages/spacebars-tests/package.js +++ b/packages/spacebars-tests/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Additional tests for Spacebars", - version: '1.0.1-rc.0' + version: '1.0.1' }); // These tests are in a separate package to avoid a circular dependency diff --git a/packages/spacebars/package.js b/packages/spacebars/package.js index 6d1b576d2b..f15b183e8e 100644 --- a/packages/spacebars/package.js +++ b/packages/spacebars/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Handlebars-like template language for Meteor", - version: '1.0.3-rc.0' + version: '1.0.3' }); // For more, see package `spacebars-compiler`, which is used by diff --git a/packages/spiderable/package.js b/packages/spiderable/package.js index 922d5cf18f..b1c237d35a 100644 --- a/packages/spiderable/package.js +++ b/packages/spiderable/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Makes the application crawlable to web spiders", - version: "1.0.4-rc.0" + version: "1.0.4" }); Package.on_use(function (api) { diff --git a/packages/srp/package.js b/packages/srp/package.js index b4aa054541..bc9072fe82 100644 --- a/packages/srp/package.js +++ b/packages/srp/package.js @@ -5,7 +5,7 @@ Package.describe({ summary: "Library for Secure Remote Password (SRP) exchanges", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.on_use(function (api) { diff --git a/packages/standard-app-packages/package.js b/packages/standard-app-packages/package.js index d395925b68..4bc94b9ebc 100644 --- a/packages/standard-app-packages/package.js +++ b/packages/standard-app-packages/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Moved to meteor-platform", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/star-translate/package.js b/packages/star-translate/package.js index d44cc9cb14..3e25f41b32 100644 --- a/packages/star-translate/package.js +++ b/packages/star-translate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A package for translating old bundles into stars", - version: "1.0.4-rc.0" + version: "1.0.4" }); Package.on_use(function (api) { diff --git a/packages/startup/package.js b/packages/startup/package.js index 1658ba96be..027094d7d2 100644 --- a/packages/startup/package.js +++ b/packages/startup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated package (now empty)", - version: "1.0.1-rc.0", + version: "1.0.1", }); Package.on_use(function (api) { diff --git a/packages/stylus/package.js b/packages/stylus/package.js index 5b70a79824..c026f48c37 100644 --- a/packages/stylus/package.js +++ b/packages/stylus/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Expressive, dynamic, robust CSS', - version: "1.0.5-rc.0" + version: "1.0.5" }); Package._transitional_registerBuildPlugin({ diff --git a/packages/templating/package.js b/packages/templating/package.js index 563a267231..909b046b96 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Allows templates to be defined in .html files", - version: '1.0.8-rc.3' + version: '1.0.8' }); // Today, this package is closely intertwined with Handlebars, meaning diff --git a/packages/test-helpers/package.js b/packages/test-helpers/package.js index 4d62f7dd1a..8a921a2819 100644 --- a/packages/test-helpers/package.js +++ b/packages/test-helpers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility functions for tests", - version: '1.0.2-rc.0' + version: '1.0.2' }); Package.on_use(function (api) { diff --git a/packages/test-in-browser/package.js b/packages/test-in-browser/package.js index 8f23a682da..2451527576 100644 --- a/packages/test-in-browser/package.js +++ b/packages/test-in-browser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run tests interactively in the browser", - version: '1.0.5-rc.0' + version: '1.0.5' }); Package.on_use(function (api) { diff --git a/packages/test-in-console/package.js b/packages/test-in-console/package.js index 0b397fe3e9..0f4eadde25 100644 --- a/packages/test-in-console/package.js +++ b/packages/test-in-console/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run tests noninteractively, with results going to the console.", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/test-server-tests-in-console-once/package.js b/packages/test-server-tests-in-console-once/package.js index 586d9668b8..8c456b6c43 100644 --- a/packages/test-server-tests-in-console-once/package.js +++ b/packages/test-server-tests-in-console-once/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run server tests noninteractively, with results going to the console.", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/tinytest/package.js b/packages/tinytest/package.js index 6b2bed9512..2a884c0dd4 100644 --- a/packages/tinytest/package.js +++ b/packages/tinytest/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Tiny testing framework", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/tracker/package.js b/packages/tracker/package.js index f81856a5e9..39f767ab0c 100644 --- a/packages/tracker/package.js +++ b/packages/tracker/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dependency tracker to allow reactive callbacks", - version: '1.0.3-rc.0' + version: '1.0.3' }); Package.on_use(function (api) { diff --git a/packages/twitter/package.js b/packages/twitter/package.js index cba9ebf796..f90fa1360c 100644 --- a/packages/twitter/package.js +++ b/packages/twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Twitter OAuth flow", - version: '1.1.1-rc.0' + version: '1.1.1' }); Package.on_use(function(api) { diff --git a/packages/ui/package.js b/packages/ui/package.js index 4b1ef8f307..1dcabeeda2 100644 --- a/packages/ui/package.js +++ b/packages/ui/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated: Use the 'blaze' package", - version: '1.0.4-rc.0' + version: '1.0.4' }); Package.on_use(function (api) { diff --git a/packages/underscore-tests/package.js b/packages/underscore-tests/package.js index 2aec2406ca..8411be0fc1 100644 --- a/packages/underscore-tests/package.js +++ b/packages/underscore-tests/package.js @@ -2,7 +2,7 @@ Package.describe({ // These tests can't be directly in the underscore packages since // Tinytest depends on underscore summary: "Tests for the underscore package", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_test(function (api) { diff --git a/packages/underscore/package.js b/packages/underscore/package.js index 0d3915c8e8..addd633302 100644 --- a/packages/underscore/package.js +++ b/packages/underscore/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Collection of small helpers: _.map, _.each, ...", - version: '1.0.1-rc.0' + version: '1.0.1' }); Package.on_use(function (api) { diff --git a/packages/url/package.js b/packages/url/package.js index 2ae138fada..2f015cf221 100644 --- a/packages/url/package.js +++ b/packages/url/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility code for constructing URLs", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.onUse(function(api) { diff --git a/packages/webapp-hashing/package.js b/packages/webapp-hashing/package.js index b855ada3b3..b154552a59 100644 --- a/packages/webapp-hashing/package.js +++ b/packages/webapp-hashing/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Used internally by WebApp. Knows how to hash programs from manifests.", - version: "1.0.1-rc.0" + version: "1.0.1" }); Package.onUse(function(api) { diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 1a766c9143..bf150bb5f1 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.1.3-rc.2' + version: '1.1.3' }); Npm.depends({connect: "2.9.0", diff --git a/packages/weibo/package.js b/packages/weibo/package.js index b4e952efa1..d846ef1167 100644 --- a/packages/weibo/package.js +++ b/packages/weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Weibo OAuth flow", - version: '1.1.1-rc.0' + version: '1.1.1' }); Package.on_use(function(api) { diff --git a/packages/xmlbuilder/package.js b/packages/xmlbuilder/package.js index 11f73c2469..6ff1209c8e 100644 --- a/packages/xmlbuilder/package.js +++ b/packages/xmlbuilder/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "An XML builder for node.js similar to java-xmlbuilder.", - version: '2.4.4-rc.0' + version: '2.4.4' }); Npm.depends({ diff --git a/scripts/admin/bump-all-version-numbers.js b/scripts/admin/bump-all-version-numbers.js index 617e19cce7..37e6a06313 100644 --- a/scripts/admin/bump-all-version-numbers.js +++ b/scripts/admin/bump-all-version-numbers.js @@ -10,11 +10,11 @@ _.each(packageNames, function (name) { var content = fs.readFileSync(name, {encoding: "utf-8"}); - match = content.match(/\d+\.\d+\.\d+-pre\.\d+/); + match = content.match(/\d+\.\d+\.\d+-rc\.\d+/); if (match) { var versionNumber = match[0]; var s = versionNumber.split("."); - s[2] = s[2].split("-")[0] + "-rc.0"; + s[2] = s[2].split("-")[0]; s = s.slice(0, 3); var incremented = s.join("."); From 924cced1cbb1b21b62e859c9eb22c7a987e9f425 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:11:11 -0700 Subject: [PATCH 218/283] Bump version in official release json --- scripts/admin/meteor-release-official.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index 3e7f1ee234..b6a0eb4649 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,8 +1,7 @@ { "track": "METEOR", - "version": "0.9.3.1", + "version": "0.9.4", "recommended": false, "official": true, - "description": "The official Meteor Distribution", - "patchFrom": ["0.9.3"] + "description": "The Official Meteor Distribution" } From e65c1e02d7ecf97b76b677f1fce44326d8c5db1e Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:47:07 -0700 Subject: [PATCH 219/283] Bump docs --- docs/.meteor/.finished-upgraders | 1 + docs/.meteor/release | 2 +- docs/.meteor/versions | 117 ++++++++++++++++--------------- docs/client/docs.js | 2 +- 4 files changed, 62 insertions(+), 60 deletions(-) diff --git a/docs/.meteor/.finished-upgraders b/docs/.meteor/.finished-upgraders index ee0ed5a316..68df3d8d0d 100644 --- a/docs/.meteor/.finished-upgraders +++ b/docs/.meteor/.finished-upgraders @@ -4,3 +4,4 @@ notices-for-0.9.0 notices-for-0.9.1 +0.9.4-platform-file diff --git a/docs/.meteor/release b/docs/.meteor/release index 01887b6a68..7057f80807 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -METEOR@0.9.3.1 +METEOR@0.9.4 diff --git a/docs/.meteor/versions b/docs/.meteor/versions index ce3da053a0..0b2f13c618 100644 --- a/docs/.meteor/versions +++ b/docs/.meteor/versions @@ -1,58 +1,59 @@ -appcache@1.0.1 -application-configuration@1.0.2 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 -callback-hook@1.0.0 -check@1.0.1 -code-prettify@1.0.0 -coffeescript@1.0.3 -ctl-helper@1.0.3 -ctl@1.0.1 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -jquery-waypoints@1.0.0 -jquery@1.0.0 -json@1.0.0 -less@1.0.9 -livedata@1.0.10 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload-safetybelt@1.0.0 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -session@1.0.2 -showdown@1.0.1 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -spiderable@1.0.3 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +appcache@1.0.2 +application-configuration@1.0.3 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +code-prettify@1.0.1 +coffeescript@1.0.4 +ctl-helper@1.0.4 +ctl@1.0.2 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +jquery-waypoints@1.0.1 +jquery@1.0.1 +json@1.0.1 +less@1.0.10 +livedata@1.0.11 +logging@1.0.4 +markdown@1.0.2 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload-safetybelt@1.0.1 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +session@1.0.3 +showdown@1.0.2 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +spiderable@1.0.4 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 diff --git a/docs/client/docs.js b/docs/client/docs.js index 65fd4488df..f366555b8f 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -1,4 +1,4 @@ -var release = Meteor.release ? "0.9.4-pre.11" : "(checkout)"; +var release = Meteor.release ? "0.9.4" : "(checkout)"; Template.headline.helpers({ release: function () { From d10491c0b16e7ead82fb0b5e6e4a3b09db0ec71a Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:48:19 -0700 Subject: [PATCH 220/283] Add platforms file for docs --- docs/.meteor/platforms | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/.meteor/platforms diff --git a/docs/.meteor/platforms b/docs/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/docs/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser From 6b060010f63d6e814de799d5ad108f9fb6488024 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 13 Oct 2014 14:50:08 -0700 Subject: [PATCH 221/283] Bump releases for all examples --- examples/clock/.meteor/.finished-upgraders | 1 + examples/clock/.meteor/platforms | 2 + examples/clock/.meteor/release | 2 +- examples/clock/.meteor/versions | 104 ++++++------- .../leaderboard/.meteor/.finished-upgraders | 1 + .../leaderboard/.meteor/cordova-platforms | 0 examples/leaderboard/.meteor/platforms | 2 + examples/leaderboard/.meteor/release | 2 +- examples/leaderboard/.meteor/versions | 104 ++++++------- examples/parties/.meteor/.finished-upgraders | 1 + examples/parties/.meteor/platforms | 2 + examples/parties/.meteor/release | 2 +- examples/parties/.meteor/versions | 138 +++++++++--------- examples/todos/.meteor/release | 2 +- examples/todos/.meteor/versions | 118 +++++++-------- examples/wordplay/.meteor/.finished-upgraders | 1 + examples/wordplay/.meteor/platforms | 2 + examples/wordplay/.meteor/release | 2 +- examples/wordplay/.meteor/versions | 102 ++++++------- 19 files changed, 300 insertions(+), 288 deletions(-) create mode 100644 examples/clock/.meteor/platforms delete mode 100644 examples/leaderboard/.meteor/cordova-platforms create mode 100644 examples/leaderboard/.meteor/platforms create mode 100644 examples/parties/.meteor/platforms create mode 100644 examples/wordplay/.meteor/platforms diff --git a/examples/clock/.meteor/.finished-upgraders b/examples/clock/.meteor/.finished-upgraders index ee0ed5a316..68df3d8d0d 100644 --- a/examples/clock/.meteor/.finished-upgraders +++ b/examples/clock/.meteor/.finished-upgraders @@ -4,3 +4,4 @@ notices-for-0.9.0 notices-for-0.9.1 +0.9.4-platform-file diff --git a/examples/clock/.meteor/platforms b/examples/clock/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/examples/clock/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/examples/clock/.meteor/release b/examples/clock/.meteor/release index 7b32bf7a26..7057f80807 100644 --- a/examples/clock/.meteor/release +++ b/examples/clock/.meteor/release @@ -1 +1 @@ -METEOR@0.9.3 +METEOR@0.9.4 diff --git a/examples/clock/.meteor/versions b/examples/clock/.meteor/versions index c243175ecf..d2447bbfec 100644 --- a/examples/clock/.meteor/versions +++ b/examples/clock/.meteor/versions @@ -1,52 +1,52 @@ -application-configuration@1.0.2 -autopublish@1.0.0 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 -callback-hook@1.0.0 -check@1.0.1 -ctl-helper@1.0.3 -ctl@1.0.1 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -insecure@1.0.0 -jquery@1.0.0 -json@1.0.0 -livedata@1.0.10 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -session@1.0.2 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +application-configuration@1.0.3 +autopublish@1.0.1 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +ctl-helper@1.0.4 +ctl@1.0.2 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +insecure@1.0.1 +jquery@1.0.1 +json@1.0.1 +livedata@1.0.11 +logging@1.0.4 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +session@1.0.3 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 diff --git a/examples/leaderboard/.meteor/.finished-upgraders b/examples/leaderboard/.meteor/.finished-upgraders index ee0ed5a316..68df3d8d0d 100644 --- a/examples/leaderboard/.meteor/.finished-upgraders +++ b/examples/leaderboard/.meteor/.finished-upgraders @@ -4,3 +4,4 @@ notices-for-0.9.0 notices-for-0.9.1 +0.9.4-platform-file diff --git a/examples/leaderboard/.meteor/cordova-platforms b/examples/leaderboard/.meteor/cordova-platforms deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/leaderboard/.meteor/platforms b/examples/leaderboard/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/examples/leaderboard/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/examples/leaderboard/.meteor/release b/examples/leaderboard/.meteor/release index 7b32bf7a26..7057f80807 100644 --- a/examples/leaderboard/.meteor/release +++ b/examples/leaderboard/.meteor/release @@ -1 +1 @@ -METEOR@0.9.3 +METEOR@0.9.4 diff --git a/examples/leaderboard/.meteor/versions b/examples/leaderboard/.meteor/versions index c243175ecf..d2447bbfec 100644 --- a/examples/leaderboard/.meteor/versions +++ b/examples/leaderboard/.meteor/versions @@ -1,52 +1,52 @@ -application-configuration@1.0.2 -autopublish@1.0.0 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 -callback-hook@1.0.0 -check@1.0.1 -ctl-helper@1.0.3 -ctl@1.0.1 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -insecure@1.0.0 -jquery@1.0.0 -json@1.0.0 -livedata@1.0.10 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -session@1.0.2 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +application-configuration@1.0.3 +autopublish@1.0.1 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +ctl-helper@1.0.4 +ctl@1.0.2 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +insecure@1.0.1 +jquery@1.0.1 +json@1.0.1 +livedata@1.0.11 +logging@1.0.4 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +session@1.0.3 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 diff --git a/examples/parties/.meteor/.finished-upgraders b/examples/parties/.meteor/.finished-upgraders index ee0ed5a316..68df3d8d0d 100644 --- a/examples/parties/.meteor/.finished-upgraders +++ b/examples/parties/.meteor/.finished-upgraders @@ -4,3 +4,4 @@ notices-for-0.9.0 notices-for-0.9.1 +0.9.4-platform-file diff --git a/examples/parties/.meteor/platforms b/examples/parties/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/examples/parties/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/examples/parties/.meteor/release b/examples/parties/.meteor/release index 7b32bf7a26..7057f80807 100644 --- a/examples/parties/.meteor/release +++ b/examples/parties/.meteor/release @@ -1 +1 @@ -METEOR@0.9.3 +METEOR@0.9.4 diff --git a/examples/parties/.meteor/versions b/examples/parties/.meteor/versions index 7245eb8d10..a9ab23068b 100644 --- a/examples/parties/.meteor/versions +++ b/examples/parties/.meteor/versions @@ -1,72 +1,72 @@ -accounts-base@1.1.1 -accounts-facebook@1.0.1 -accounts-oauth@1.1.1 -accounts-password@1.0.2 -accounts-twitter@1.0.1 -accounts-ui-unstyled@1.1.2 -accounts-ui@1.1.1 -application-configuration@1.0.2 -audit-argument-checks@1.0.0 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 +accounts-base@1.1.2 +accounts-facebook@1.0.2 +accounts-oauth@1.1.2 +accounts-password@1.0.3 +accounts-twitter@1.0.2 +accounts-ui-unstyled@1.1.3 +accounts-ui@1.1.2 +application-configuration@1.0.3 +audit-argument-checks@1.0.1 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 bootstrap@1.0.1 -callback-hook@1.0.0 -check@1.0.1 -ctl-helper@1.0.3 -ctl@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +ctl-helper@1.0.4 +ctl@1.0.2 d3@1.0.0 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -email@1.0.3 -facebook@1.1.0 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -jquery@1.0.0 -json@1.0.0 -less@1.0.9 -livedata@1.0.10 -localstorage@1.0.0 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +email@1.0.4 +facebook@1.1.1 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +jquery@1.0.1 +json@1.0.1 +less@1.0.10 +livedata@1.0.11 +localstorage@1.0.1 +logging@1.0.4 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 npm-bcrypt@0.7.7 -oauth1@1.1.0 -oauth2@1.1.0 -oauth@1.1.0 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -service-configuration@1.0.1 -session@1.0.2 -sha@1.0.0 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -srp@1.0.0 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -twitter@1.1.0 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +oauth1@1.1.1 +oauth2@1.1.1 +oauth@1.1.1 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +service-configuration@1.0.2 +session@1.0.3 +sha@1.0.1 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +srp@1.0.1 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +twitter@1.1.1 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 92555bf2eb..7057f80807 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -METEOR@0.9.4-rc.6 +METEOR@0.9.4 diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index d07c65cf17..1f4e78365a 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -1,64 +1,64 @@ -accounts-base@1.1.2-rc.2 -accounts-password@1.0.3-rc.0 -application-configuration@1.0.3-rc.0 -autoupdate@1.1.2-rc.3 -base64@1.0.1-rc.0 -binary-heap@1.0.1-rc.0 -blaze-tools@1.0.1-rc.0 -blaze@2.0.2-rc.0 -boilerplate-generator@1.0.1-rc.0 -callback-hook@1.0.1-rc.0 -check@1.0.2-rc.0 -ctl-helper@1.0.4-rc.0 -ctl@1.0.2-rc.0 -ddp@1.0.10-rc.3 -deps@1.0.5-rc.0 -ejson@1.0.4-rc.0 -email@1.0.4-rc.0 -fastclick@1.0.1-rc.0 -follower-livedata@1.0.2-rc.0 -geojson-utils@1.0.1-rc.0 -html-tools@1.0.2-rc.0 -htmljs@1.0.2-rc.0 -http@1.0.7-rc.4 -id-map@1.0.1-rc.0 -insecure@1.0.1-rc.0 +accounts-base@1.1.2 +accounts-password@1.0.3 +application-configuration@1.0.3 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +ctl-helper@1.0.4 +ctl@1.0.2 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +email@1.0.4 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +insecure@1.0.1 iron:core@0.3.4 iron:dynamic-template@0.4.1 iron:layout@0.4.1 iron:router@0.9.4 -jquery@1.0.1-rc.0 -json@1.0.1-rc.0 -less@1.0.10-rc.4 -livedata@1.0.11-rc.0 -localstorage@1.0.1-rc.0 -logging@1.0.4-rc.0 -meteor-platform@1.1.2-rc.0 -meteor@1.1.2-rc.3 -minifiers@1.1.1-rc.0 -minimongo@1.0.4-rc.0 -mobile-status-bar@1.0.1-rc.0 -mongo@1.0.7-rc.0 +jquery@1.0.1 +json@1.0.1 +less@1.0.10 +livedata@1.0.11 +localstorage@1.0.1 +logging@1.0.4 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 npm-bcrypt@0.7.7 -observe-sequence@1.0.3-rc.0 -ordered-dict@1.0.1-rc.0 -random@1.0.1-rc.0 -reactive-dict@1.0.4-rc.0 -reactive-var@1.0.3-rc.0 -reload@1.1.1-rc.0 -retry@1.0.1-rc.0 -routepolicy@1.0.2-rc.0 -service-configuration@1.0.2-rc.0 -session@1.0.3-rc.0 -sha@1.0.1-rc.0 -spacebars-compiler@1.0.3-rc.0 -spacebars@1.0.3-rc.0 -srp@1.0.1-rc.0 -standard-app-packages@1.0.3-rc.0 -templating@1.0.8-rc.3 -tracker@1.0.3-rc.0 -ui@1.0.4-rc.0 -underscore@1.0.1-rc.0 -url@1.0.1-rc.0 -webapp-hashing@1.0.1-rc.0 -webapp@1.1.3-rc.2 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +service-configuration@1.0.2 +session@1.0.3 +sha@1.0.1 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +srp@1.0.1 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 diff --git a/examples/wordplay/.meteor/.finished-upgraders b/examples/wordplay/.meteor/.finished-upgraders index ee0ed5a316..68df3d8d0d 100644 --- a/examples/wordplay/.meteor/.finished-upgraders +++ b/examples/wordplay/.meteor/.finished-upgraders @@ -4,3 +4,4 @@ notices-for-0.9.0 notices-for-0.9.1 +0.9.4-platform-file diff --git a/examples/wordplay/.meteor/platforms b/examples/wordplay/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/examples/wordplay/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/examples/wordplay/.meteor/release b/examples/wordplay/.meteor/release index 7b32bf7a26..7057f80807 100644 --- a/examples/wordplay/.meteor/release +++ b/examples/wordplay/.meteor/release @@ -1 +1 @@ -METEOR@0.9.3 +METEOR@0.9.4 diff --git a/examples/wordplay/.meteor/versions b/examples/wordplay/.meteor/versions index 3ba5d81ee5..5a899d9f06 100644 --- a/examples/wordplay/.meteor/versions +++ b/examples/wordplay/.meteor/versions @@ -1,51 +1,51 @@ -application-configuration@1.0.2 -autoupdate@1.1.1 -base64@1.0.0 -binary-heap@1.0.0 -blaze-tools@1.0.0 -blaze@2.0.1 -boilerplate-generator@1.0.0 -callback-hook@1.0.0 -check@1.0.1 -ctl-helper@1.0.3 -ctl@1.0.1 -ddp@1.0.9 -deps@1.0.4 -ejson@1.0.3 -fastclick@1.0.0 -follower-livedata@1.0.1 -geojson-utils@1.0.0 -html-tools@1.0.1 -htmljs@1.0.1 -http@1.0.6 -id-map@1.0.0 -insecure@1.0.0 -jquery@1.0.0 -json@1.0.0 -livedata@1.0.10 -logging@1.0.3 -meteor-platform@1.1.1 -meteor@1.1.1 -minifiers@1.1.0 -minimongo@1.0.3 -mobile-status-bar@1.0.0 -mongo@1.0.6 -observe-sequence@1.0.2 -ordered-dict@1.0.0 -random@1.0.0 -reactive-dict@1.0.3 -reactive-var@1.0.2 -reload@1.1.0 -retry@1.0.0 -routepolicy@1.0.1 -session@1.0.2 -spacebars-compiler@1.0.2 -spacebars@1.0.2 -standard-app-packages@1.0.2 -templating@1.0.7 -tracker@1.0.2 -ui@1.0.3 -underscore@1.0.0 -url@1.0.0 -webapp-hashing@1.0.0 -webapp@1.1.2 +application-configuration@1.0.3 +autoupdate@1.1.2 +base64@1.0.1 +binary-heap@1.0.1 +blaze-tools@1.0.1 +blaze@2.0.2 +boilerplate-generator@1.0.1 +callback-hook@1.0.1 +check@1.0.2 +ctl-helper@1.0.4 +ctl@1.0.2 +ddp@1.0.10 +deps@1.0.5 +ejson@1.0.4 +fastclick@1.0.1 +follower-livedata@1.0.2 +geojson-utils@1.0.1 +html-tools@1.0.2 +htmljs@1.0.2 +http@1.0.7 +id-map@1.0.1 +insecure@1.0.1 +jquery@1.0.1 +json@1.0.1 +livedata@1.0.11 +logging@1.0.4 +meteor-platform@1.1.2 +meteor@1.1.2 +minifiers@1.1.1 +minimongo@1.0.4 +mobile-status-bar@1.0.1 +mongo@1.0.7 +observe-sequence@1.0.3 +ordered-dict@1.0.1 +random@1.0.1 +reactive-dict@1.0.4 +reactive-var@1.0.3 +reload@1.1.1 +retry@1.0.1 +routepolicy@1.0.2 +session@1.0.3 +spacebars-compiler@1.0.3 +spacebars@1.0.3 +standard-app-packages@1.0.3 +templating@1.0.8 +tracker@1.0.3 +ui@1.0.4 +underscore@1.0.1 +url@1.0.1 +webapp-hashing@1.0.1 +webapp@1.1.3 From 3ff1ca06b891cd7284eb0d31aa2508fb5606da6e Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 Oct 2014 16:07:23 -0700 Subject: [PATCH 222/283] Clarify Session.setDefault docs. Wording suggested by @PeppeL-G. Fixes #2725. --- docs/client/data.js | 2 +- packages/session/session.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/data.js b/docs/client/data.js index f4ab7343d5..66fc3edf85 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Object"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file +DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

Which permissions to request from the user for each external service.

","name":"requestPermissions"},{"type":{"names":["Object"]},"description":"

To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details.

","name":"requestOfflineToken"},{"type":{"names":["Object"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

Which fields to display in the user creation form. One of 'USERNAME_AND_EMAIL', 'USERNAME_AND_OPTIONAL_EMAIL', 'USERNAME_ONLY', or 'EMAIL_ONLY' (default).

","name":"passwordSignupFields"}],"locus":"Client"}},"emailTemplates":{"summary":"Options to customize emails sent from the Accounts system.","name":"emailTemplates","longname":"Accounts.emailTemplates","kind":"member","memberof":"Accounts","scope":"static","locus":"Anywhere"},"config":{"summary":"Set global accounts options.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.config","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

New users with an email address will receive an address verification email.

","name":"sendVerificationEmail"},{"type":{"names":["Boolean"]},"description":"

Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available.

","name":"forbidClientAccountCreation"},{"type":{"names":["String","function"]},"description":"

If set to a string, only allows new users if the domain part of their email address matches the string. If set to a function, only allows new users if the function returns true. The function is passed the full email address of the proposed new user. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: Accounts.config({ restrictCreationByEmailDomain: 'school.edu' }).

","name":"restrictCreationByEmailDomain"},{"type":{"names":["Number"]},"description":"

The number of days from when a user logs in until their token expires and they are logged out. Defaults to 90. Set to null to disable login expiration.

","name":"loginExpirationInDays"},{"type":{"names":["String"]},"description":"

When using the oauth-encryption package, the 16 byte key using to encrypt sensitive account credentials in the database, encoded in base64. This option may only be specifed on the server. See packages/oauth-encryption/README.md for details.

","name":"oauthSecretKey"}],"locus":"Anywhere"},"validateLoginAttempt":{"summary":"Validate login attempts.","params":[{"type":{"names":["function"]},"description":"

Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

","name":"func"}],"name":"validateLoginAttempt","longname":"Accounts.validateLoginAttempt","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLogin":{"summary":"Register a callback to be called after a login attempt succeeds.","params":[{"type":{"names":["function"]},"description":"

The callback to be called when login is successful.

","name":"func"}],"name":"onLogin","longname":"Accounts.onLogin","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onLoginFailure":{"summary":"Register a callback to be called after a login attempt fails.","params":[{"type":{"names":["function"]},"description":"

The callback to be called after the login has failed.

","name":"func"}],"name":"onLoginFailure","longname":"Accounts.onLoginFailure","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onCreateUser":{"summary":"Customize new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Return the new user object, or throw an Error to abort the creation.

","name":"func"}],"name":"onCreateUser","longname":"Accounts.onCreateUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"validateNewUser":{"summary":"Set restrictions on new user creation.","params":[{"type":{"names":["function"]},"description":"

Called whenever a new user is created. Takes the new user object, and returns true to allow the creation or false to abort.

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"createUser","longname":"Accounts.createUser","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

A unique name for this user.

","name":"username"},{"type":{"names":["String"]},"description":"

The user's email address.

","name":"email"},{"type":{"names":["String"]},"description":"

The user's password. This is not sent in plain text over the wire.

","name":"password"},{"type":{"names":["Object"]},"description":"

The user's profile, typically including the name field.

","name":"profile"}],"locus":"Anywhere"},"changePassword":{"summary":"Change the current user's password. Must be logged in.","params":[{"type":{"names":["String"]},"description":"

The user's current password. This is not sent in plain text over the wire.

","name":"oldPassword"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"changePassword","longname":"Accounts.changePassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"forgotPassword":{"summary":"Request a forgot password email.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"forgotPassword","longname":"Accounts.forgotPassword","kind":"function","memberof":"Accounts","scope":"static","options":[{"type":{"names":["String"]},"description":"

The email address to send a password reset link.

","name":"email"}],"locus":"Client"},"resetPassword":{"summary":"Reset the password for a user using a token received in email. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the reset password URL.

","name":"token"},{"type":{"names":["String"]},"description":"

A new password for the user. This is not sent in plain text over the wire.

","name":"newPassword"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"resetPassword","longname":"Accounts.resetPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"verifyEmail":{"summary":"Marks the user's email address as verified. Logs the user in afterwards.","params":[{"type":{"names":["String"]},"description":"

The token retrieved from the verification URL.

","name":"token"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"verifyEmail","longname":"Accounts.verifyEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Client"},"setPassword":{"summary":"Forcibly change the password for a user.","params":[{"type":{"names":["String"]},"description":"

The id of the user to update.

","name":"userId"},{"type":{"names":["String"]},"description":"

A new password for the user.

","name":"newPassword"}],"name":"setPassword","longname":"Accounts.setPassword","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendResetPasswordEmail":{"summary":"Send an email with a link the user can use to reset their password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendResetPasswordEmail","longname":"Accounts.sendResetPasswordEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendEnrollmentEmail":{"summary":"Send an email with a link the user can use to set their initial password.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

","name":"email"}],"name":"sendEnrollmentEmail","longname":"Accounts.sendEnrollmentEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"sendVerificationEmail":{"summary":"Send an email with a link the user can use verify their email address.","params":[{"type":{"names":["String"]},"description":"

The id of the user to send email to.

","name":"userId"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first unverified email in the list.

","name":"email"}],"name":"sendVerificationEmail","longname":"Accounts.sendVerificationEmail","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"}},"EJSON":{"kind":"namespace","summary":"Namespace for EJSON functions","name":"EJSON","longname":"EJSON","scope":"global","newBinary":{"summary":"Allocate a new buffer of binary data that EJSON can serialize.","params":[{"type":{"names":["Number"]},"description":"

The number of bytes of binary data to allocate.

","name":"size"}],"name":"newBinary","longname":"EJSON.newBinary","kind":"member","memberof":"EJSON","scope":"static","locus":"Anywhere"},"CustomType#typeName":{"kind":"function","name":"typeName","memberof":"EJSON.CustomType","summary":"Return the tag used to identify this type. This must match the tag used to register this type with [`EJSON.addType`](#ejson_add_type).","scope":"instance","longname":"EJSON.CustomType#typeName","options":[],"params":[],"locus":"Anywhere"},"CustomType#toJSONValue":{"kind":"function","name":"toJSONValue","memberof":"EJSON.CustomType","summary":"Serialize this instance into a JSON-compatible value.","scope":"instance","longname":"EJSON.CustomType#toJSONValue","options":[],"params":[],"locus":"Anywhere"},"CustomType#clone":{"kind":"function","name":"clone","memberof":"EJSON.CustomType","summary":"Return a value `r` such that `this.equals(r)` is true, and modifications to `r` do not affect `this` and vice versa.","scope":"instance","longname":"EJSON.CustomType#clone","options":[],"params":[],"locus":"Anywhere"},"CustomType#equals":{"kind":"function","name":"equals","memberof":"EJSON.CustomType","summary":"Return `true` if `other` has a value equal to `this`; `false` otherwise.","params":[{"type":{"names":["Object"]},"description":"

Another object to compare this to.

","name":"other"}],"scope":"instance","longname":"EJSON.CustomType#equals","options":[],"locus":"Anywhere"},"addType":{"summary":"Add a custom datatype to EJSON.","params":[{"type":{"names":["String"]},"description":"

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

","name":"factory"}],"name":"addType","longname":"EJSON.addType","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"toJSONValue":{"summary":"Serialize an EJSON-compatible value into its plain JSON representation.","params":[{"type":{"names":["EJSON"]},"description":"

A value to serialize to plain JSON.

","name":"val"}],"name":"toJSONValue","longname":"EJSON.toJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"fromJSONValue":{"summary":"Deserialize an EJSON value from its plain JSON representation.","params":[{"type":{"names":["JSONCompatible"]},"description":"

A value to deserialize into EJSON.

","name":"val"}],"name":"fromJSONValue","longname":"EJSON.fromJSONValue","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"stringify":{"summary":"Serialize a value to a string.\n\nFor EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as `JSON.stringify`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to stringify.

","name":"val"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"stringify","longname":"EJSON.stringify","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean","Integer","String"]},"description":"

Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern.

","name":"indent"},{"type":{"names":["Boolean"]},"description":"

When true, stringifies keys in an object in sorted order.

","name":"canonical"}],"locus":"Anywhere"},"parse":{"summary":"Parse a string into an EJSON value. Throws an error if the string is not valid EJSON.","params":[{"type":{"names":["String"]},"description":"

A string to parse into an EJSON value.

","name":"str"}],"name":"parse","longname":"EJSON.parse","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"isBinary":{"summary":"Returns true if `x` is a buffer of binary data, as returned from [`EJSON.newBinary`](#ejson_new_binary).","params":[{"type":{"names":["Object"]},"description":"

The variable to check.

","name":"x"}],"name":"isBinary","longname":"EJSON.isBinary","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"equals":{"summary":"Return true if `a` and `b` are equal to each other. Return false otherwise. Uses the `equals` method on `a` if present, otherwise performs a deep comparison.","params":[{"type":{"names":["EJSON"]},"name":"a"},{"type":{"names":["EJSON"]},"name":"b"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"equals","longname":"EJSON.equals","kind":"function","memberof":"EJSON","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Compare in key sensitive order, if supported by the JavaScript implementation. For example, {a: 1, b: 2} is equal to {b: 2, a: 1} only when keyOrderSensitive is false. The default is false.

","name":"keyOrderSensitive"}],"locus":"Anywhere"},"clone":{"summary":"Return a deep copy of `val`.","params":[{"type":{"names":["EJSON"]},"description":"

A value to copy.

","name":"val"}],"name":"clone","longname":"EJSON.clone","kind":"function","memberof":"EJSON","scope":"static","options":[],"locus":"Anywhere"},"CustomType":{"kind":"class","name":"CustomType","memberof":"EJSON","summary":"The interface that a class must satisfy to be able to become an\nEJSON custom type via EJSON.addType.","scope":"static","longname":"EJSON.CustomType","options":[],"params":[],"instancename":"customType"}},"Meteor":{"summary":"The Meteor namespace","kind":"namespace","name":"Meteor","longname":"Meteor","users":{"summary":"A [Mongo.Collection](#collections) containing user documents.","name":"users","longname":"Meteor.users","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isClient":{"summary":"Boolean variable. True if running in client environment.","scope":"static","name":"isClient","longname":"Meteor.isClient","kind":"member","memberof":"Meteor","locus":"Anywhere"},"isServer":{"summary":"Boolean variable. True if running in server environment.","scope":"static","name":"isServer","longname":"Meteor.isServer","kind":"member","memberof":"Meteor","locus":"Anywhere"},"settings":{"summary":"`Meteor.settings` contains deployment-specific configuration options. You can initialize settings by passing the `--settings` option (which takes the name of a file containing JSON data) to `meteor run` or `meteor deploy`. When running your server directly (e.g. from a bundle), you instead specify settings by putting the JSON directly into the `METEOR_SETTINGS` environment variable. If you don't provide any settings, `Meteor.settings` will be an empty object. If the settings object contains a key named `public`, then `Meteor.settings.public` will be available on the client as well as the server. All other properties of `Meteor.settings` are only defined on the server.","name":"settings","longname":"Meteor.settings","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"isCordova":{"summary":"Boolean variable. True if running in a Cordova mobile environment.","name":"isCordova","longname":"Meteor.isCordova","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"release":{"summary":"`Meteor.release` is a string containing the name of the [release](#meteorupdate) with which the project was built (for example, `\"1.2.3\"`). It is `undefined` if the project was built using a git checkout of Meteor.","name":"release","longname":"Meteor.release","kind":"member","memberof":"Meteor","scope":"static","locus":"Anywhere"},"userId":{"summary":"Get the current user id, or `null` if no user is logged in. A reactive data source.","name":"userId","longname":"Meteor.userId","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"loggingIn":{"summary":"True if a login method (such as `Meteor.loginWithPassword`, `Meteor.loginWithFacebook`, or `Accounts.createUser`) is currently in progress. A reactive data source.","name":"loggingIn","longname":"Meteor.loggingIn","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Client"},"user":{"summary":"Get the current user record, or `null` if no user is logged in. A reactive data source.","name":"user","longname":"Meteor.user","kind":"function","memberof":"Meteor","scope":"static","options":[],"params":[],"locus":"Anywhere but publish functions"},"logout":{"summary":"Log the user out.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logout","longname":"Meteor.logout","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"logoutOtherClients":{"summary":"Log out other clients logged in as the current user, but does not log out the client that calls this function.","params":[{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"logoutOtherClients","longname":"Meteor.logoutOtherClients","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"loginWith":{"name":"loginWith","memberof":"Meteor","kind":"function","summary":"Log the user in using an external service.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"scope":"static","longname":"Meteor.loginWith","options":[{"type":{"names":["Array."]},"description":"

A list of permissions to request from the user.

","name":"requestPermissions"},{"type":{"names":["Boolean"]},"description":"

If true, asks the user for permission to act on their behalf when offline. This stores an additional offline token in the services field of the user document. Currently only supported with Google.

","name":"requestOfflineToken"},{"type":{"names":["Boolean"]},"description":"

If true, forces the user to approve the app's permissions, even if previously approved. Currently only supported with Google.

","name":"forceApprovalPrompt"},{"type":{"names":["String"]},"description":"

An email address that the external service will use to pre-fill the login prompt. Currently only supported with Meteor developer accounts.

","name":"userEmail"},{"type":{"names":["String"]},"description":"

Login style ("popup" or "redirect", defaults to the login service configuration). The "popup" style opens the login page in a separate popup window, which is generally preferred because the Meteor application doesn't need to be reloaded. The "redirect" style redirects the Meteor application's window to the login page, and the login service provider redirects back to the Meteor application which is then reloaded. The "redirect" style can be used in situations where a popup window can't be opened, such as in a mobile UIWebView. The "redirect" style however relies on session storage which isn't available in Safari private mode, so the "popup" style will be forced if session storage can't be used.

","name":"loginStyle"}],"locus":"Client"},"loginWithPassword":{"summary":"Log the user in with a password.","params":[{"type":{"names":["Object","String"]},"description":"

Either a string interpreted as a username or an email; or an object with a single key: email, username or id.

","name":"user"},{"type":{"names":["String"]},"description":"

The user's password.

","name":"password"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. Called with no arguments on success, or with a single Error argument on failure.

","name":"callback"}],"name":"loginWithPassword","longname":"Meteor.loginWithPassword","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Client"},"subscribe":{"memberof":"Meteor","summary":"Subscribe to a record set. Returns a handle that provides `stop()` and `ready()` methods.","params":[{"type":{"names":["String"]},"description":"

Name of the subscription. Matches the name of the server's publish() call.

","name":"name"},{"type":{"names":["Any"]},"optional":true,"description":"

Optional arguments passed to publisher function on server.

","name":"arg1, arg2..."},{"type":{"names":["function","Object"]},"optional":true,"description":"

Optional. May include onError and onReady callbacks. If a function is passed instead of an object, it is interpreted as an onReady callback.

","name":"callbacks"}],"name":"subscribe","longname":"Meteor.subscribe","kind":"function","scope":"static","options":[],"locus":"Client"},"call":{"memberof":"Meteor","summary":"Invokes a method passing any number of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["EJSONable"]},"optional":true,"description":"

Optional method arguments

","name":"arg1, arg2..."},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

","name":"asyncCallback"}],"name":"call","longname":"Meteor.call","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"apply":{"memberof":"Meteor","summary":"Invoke a method passing an array of arguments.","params":[{"type":{"names":["String"]},"description":"

Name of method to invoke

","name":"name"},{"type":{"names":["Array."]},"description":"

Method arguments

","name":"args"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback; same semantics as in Meteor.call.

","name":"asyncCallback"}],"name":"apply","longname":"Meteor.apply","kind":"function","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

(Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.

","name":"wait"},{"type":{"names":["function"]},"description":"

(Client only) This callback is invoked with the error or result of the method (just like asyncCallback) as soon as the error or result is available. The local cache may not yet reflect the writes performed by the method.

","name":"onResultReceived"}],"locus":"Anywhere"},"status":{"summary":"Get the current connection status. A reactive data source.","memberof":"Meteor","name":"status","longname":"Meteor.status","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"reconnect":{"summary":"Force an immediate reconnection attempt if the client is not connected to the server.\n\n This method does nothing if the client is already connected.","memberof":"Meteor","name":"reconnect","longname":"Meteor.reconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"disconnect":{"summary":"Disconnect the client from the server.","memberof":"Meteor","name":"disconnect","longname":"Meteor.disconnect","kind":"function","scope":"static","options":[],"params":[],"locus":"Client"},"onConnection":{"summary":"Register a callback to be called when a new DDP connection is made to the server.","params":[{"type":{"names":["function"]},"description":"

The function to call when a new DDP connection is established.

","name":"callback"}],"memberof":"Meteor","name":"onConnection","longname":"Meteor.onConnection","kind":"function","scope":"static","options":[],"locus":"Server"},"publish":{"summary":"Publish a record set.","memberof":"Meteor","params":[{"type":{"names":["String"]},"description":"

Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients.

","name":"name"},{"type":{"names":["function"]},"description":"

Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

","name":"func"}],"name":"publish","longname":"Meteor.publish","kind":"function","scope":"static","options":[],"locus":"Server"},"methods":{"summary":"Defines functions that can be invoked over the network by clients.","params":[{"type":{"names":["Object"]},"description":"

Dictionary whose keys are method names and values are functions.

","name":"methods"}],"memberof":"Meteor","name":"methods","longname":"Meteor.methods","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"wrapAsync":{"memberof":"Meteor","summary":"Wrap a function that takes a callback function as its final parameter. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If a callback is provided, the environment captured when the original function was called will be restored in the callback.","params":[{"type":{"names":["function"]},"description":"

A function that takes a callback as its final parameter

","name":"func"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional this object against which the original function will be invoked

","name":"context"}],"name":"wrapAsync","longname":"Meteor.wrapAsync","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"startup":{"summary":"Run code when a client or a server starts.","params":[{"type":{"names":["function"]},"description":"

A function to run on startup.

","name":"func"}],"name":"startup","longname":"Meteor.startup","kind":"function","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"},"setTimeout":{"memberof":"Meteor","summary":"Call a function in the future after waiting for a specified delay.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait before calling function

","name":"delay"}],"name":"setTimeout","longname":"Meteor.setTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"setInterval":{"memberof":"Meteor","summary":"Call a function repeatedly, with a time delay between calls.","params":[{"type":{"names":["function"]},"description":"

The function to run

","name":"func"},{"type":{"names":["Number"]},"description":"

Number of milliseconds to wait between each function call.

","name":"delay"}],"name":"setInterval","longname":"Meteor.setInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearInterval":{"memberof":"Meteor","summary":"Cancel a repeating function call scheduled by `Meteor.setInterval`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setInterval

","name":"id"}],"name":"clearInterval","longname":"Meteor.clearInterval","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"clearTimeout":{"memberof":"Meteor","summary":"Cancel a function call scheduled by `Meteor.setTimeout`.","params":[{"type":{"names":["Number"]},"description":"

The handle returned by Meteor.setTimeout

","name":"id"}],"name":"clearTimeout","longname":"Meteor.clearTimeout","kind":"function","scope":"static","options":[],"locus":"Anywhere"},"absoluteUrl":{"summary":"Generate an absolute URL pointing to the application. The server reads from the `ROOT_URL` environment variable to determine where it is running. This is taken care of automatically for apps deployed with `meteor deploy`, but must be provided when using `meteor bundle`.","params":[{"type":{"names":["String"]},"optional":true,"description":"

A path to append to the root URL. Do not include a leading "/".

","name":"path"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"absoluteUrl","longname":"Meteor.absoluteUrl","kind":"function","memberof":"Meteor","scope":"static","options":[{"type":{"names":["Boolean"]},"description":"

Create an HTTPS URL.

","name":"secure"},{"type":{"names":["Boolean"]},"description":"

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

","name":"replaceLocalhost"},{"type":{"names":["String"]},"description":"

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

","name":"rootUrl"}],"locus":"Anywhere"},"Error":{"summary":"This class represents a symbolic error thrown by a method.","kind":"class","params":[{"type":{"names":["String"]},"description":"

A string code uniquely identifying this kind of error.\nThis string should be used by callers of the method to determine the\nappropriate action to take, instead of attempting to parse the reason\nor details fields. For example:

\n
// on the server, pick a code unique to this error\n// the reason field should be a useful debug message\nthrow new Meteor.Error("logged-out", \n  "The user must be logged in to post a comment.");\n\n// on the client\nMeteor.call("methodName", function (error) {\n  // identify the error\n  if (error.error === "logged-out") {\n    // show a nice error message\n    Session.set("errorMessage", "Please log in to post a comment.");\n  }\n});

For legacy reasons, some built-in Meteor functions such as check throw\nerrors with a number in this field.

","name":"error"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. A short human-readable summary of the\nerror, like 'Not Found'.

","name":"reason"},{"type":{"names":["String"]},"optional":true,"description":"

Optional. Additional information about the error,\nlike a textual stack trace.

","name":"details"}],"name":"Error","longname":"Meteor.Error","memberof":"Meteor","scope":"static","options":[],"locus":"Anywhere"}},"Mongo":{"summary":"Namespace for MongoDB-related items","kind":"namespace","name":"Mongo","longname":"Mongo","scope":"global","Cursor#forEach":{"summary":"Call `callback` once for each matching document, sequentially and synchronously.","kind":"function","name":"forEach","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#forEach","options":[],"locus":"Anywhere"},"Cursor#map":{"summary":"Map callback over all matching documents. Returns an Array.","kind":"function","name":"map","scope":"instance","memberof":"Mongo.Cursor","params":[{"type":{"names":["function"]},"description":"

Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself.

","name":"callback"},{"type":{"names":["Any"]},"optional":true,"description":"

An object which will be the value of this inside callback.

","name":"thisArg"}],"longname":"Mongo.Cursor#map","options":[],"locus":"Anywhere"},"Cursor#fetch":{"summary":"Return all matching documents as an Array.","memberof":"Mongo.Cursor","kind":"function","name":"fetch","scope":"instance","longname":"Mongo.Cursor#fetch","options":[],"params":[],"locus":"Anywhere"},"Cursor#count":{"summary":"Returns the number of documents that match a query.","memberof":"Mongo.Cursor","kind":"function","name":"count","scope":"instance","longname":"Mongo.Cursor#count","options":[],"params":[],"locus":"Anywhere"},"Cursor#observe":{"summary":"Watch a query. Receive callbacks as the result set changes.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observe","longname":"Mongo.Cursor#observe","kind":"function","options":[],"locus":"Anywhere"},"Cursor#observeChanges":{"summary":"Watch a query. Receive callbacks as the result set changes. Only the differences between the old and new documents are passed to the callbacks.","memberof":"Mongo.Cursor","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

Functions to call to deliver the result set as it changes

","name":"callbacks"}],"name":"observeChanges","longname":"Mongo.Cursor#observeChanges","kind":"function","options":[],"locus":"Anywhere"},"Collection#insert":{"summary":"Insert a document in the collection. Returns its unique _id.","kind":"function","name":"insert","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["Object"]},"description":"

The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.

","name":"doc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

","name":"callback"}],"longname":"Mongo.Collection#insert","options":[],"locus":"Anywhere"},"Collection#update":{"summary":"Modify one or more documents in the collection. Returns the number of affected documents.","kind":"function","name":"update","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"longname":"Mongo.Collection#update","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"},{"type":{"names":["Boolean"]},"description":"

True to insert a document if no matching documents are found.

","name":"upsert"}],"locus":"Anywhere"},"Collection#find":{"summary":"Find the documents in a collection that match the selector.","kind":"function","name":"find","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#find","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["Number"]},"description":"

Maximum number of results to return

","name":"limit"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#findOne":{"summary":"Finds the first document that matches the selector, as ordered by sort and skip options.","kind":"function","name":"findOne","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"optional":true,"description":"

A query describing the documents to find

","name":"selector"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"longname":"Mongo.Collection#findOne","options":[{"type":{"names":["MongoSortSpecifier"]},"description":"

Sort order (default: natural order)

","name":"sort"},{"type":{"names":["Number"]},"description":"

Number of results to skip at the beginning

","name":"skip"},{"type":{"names":["MongoFieldSpecifier"]},"description":"

Dictionary of fields to return or exclude.

","name":"fields"},{"type":{"names":["Boolean"]},"description":"

(Client only) Default true; pass false to disable reactivity

","name":"reactive"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

","name":"transform"}],"locus":"Anywhere"},"Collection#remove":{"summary":"Remove documents from the collection","kind":"function","name":"remove","memberof":"Mongo.Collection","scope":"instance","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to remove

","name":"selector"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as its argument.

","name":"callback"}],"longname":"Mongo.Collection#remove","options":[],"locus":"Anywhere"},"Collection#upsert":{"summary":"Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).","params":[{"type":{"names":["MongoSelector"]},"description":"

Specifies which documents to modify

","name":"selector"},{"type":{"names":["MongoModifier"]},"description":"

Specifies how to modify the documents

","name":"modifier"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

","name":"callback"}],"name":"upsert","longname":"Mongo.Collection#upsert","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["Boolean"]},"description":"

True to modify all matching documents; false to only modify one of the matching documents (the default).

","name":"multi"}],"locus":"Anywhere"},"Collection#allow":{"summary":"Allow users to write directly to this collection from client code, subject to limitations you define.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"allow","longname":"Mongo.Collection#allow","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be allowed.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection#deny":{"summary":"Override `allow` rules.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"deny","longname":"Mongo.Collection#deny","kind":"function","memberof":"Mongo.Collection","scope":"instance","options":[{"type":{"names":["function"]},"description":"

Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise.

","name":"insert, update, remove"},{"type":{"names":["Array."]},"description":"

Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.

","name":"fetch"},{"type":{"names":["function"]},"description":"

Overrides transform on the Collection. Pass null to disable transformation.

","name":"transform"}],"locus":"Server"},"Collection":{"summary":"Constructor for a Collection","kind":"class","params":[{"type":{"names":["String"]},"description":"

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

","name":"name"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"Collection","longname":"Mongo.Collection","memberof":"Mongo","scope":"static","options":[{"type":{"names":["Object"]},"description":"

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

","name":"connection"},{"type":{"names":["String"]},"description":"

The method of generating the _id fields of new documents in this collection. Possible values:

\n\n

The default id generation technique is 'STRING'.

","name":"idGeneration"},{"type":{"names":["function"]},"description":"

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

","name":"transform"}],"locus":"Anywhere","instancename":"collection"},"ObjectID":{"summary":"Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).","kind":"class","params":[{"type":{"names":["String"]},"description":"

Optional. The 24-character hexadecimal contents of the ObjectID to create

","name":"hexString"}],"name":"ObjectID","longname":"Mongo.ObjectID","memberof":"Mongo","scope":"static","options":[],"locus":"Anywhere"},"Cursor":{"summary":"To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.","kind":"class","name":"Cursor","longname":"Mongo.Cursor","memberof":"Mongo","scope":"static","options":[],"params":[],"instancename":"cursor"}},"Assets":{"summary":"The namespace for Assets functions, lives in the bundler.","kind":"namespace","name":"Assets","longname":"Assets","getText":{"summary":"Retrieve the contents of the static server asset as a UTF8-encoded string.","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getText","longname":"Assets.getText","kind":"function","scope":"static","options":[],"locus":"Server"},"getBinary":{"summary":"Retrieve the contents of the static server asset as an [EJSON Binary](#ejson_new_binary).","memberof":"Assets","params":[{"type":{"names":["String"]},"description":"

The path of the asset, relative to the application's private subdirectory.

","name":"assetPath"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

","name":"name"},{"type":{"names":["String"]},"description":"

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

","name":"pluginName"},{"type":{"names":["Object"]},"description":"

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

","name":"fileExtension"},{"type":{"names":["function"]},"description":"

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

","name":"handler"}],"memberof":"Plugin","name":"registerSourceHandler","longname":"Plugin.registerSourceHandler","kind":"function","scope":"static","options":[],"locus":"Build Plugin"}},"Package":{"scope":"global","name":"Package","summary":"The Package object in package.js","kind":"namespace","longname":"Package","locus":"package.js","describe":{"summary":"Provide basic package information.","memberof":"Package","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"describe","longname":"Package.describe","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A concise 1-2 sentence description of\nthe package, required for publication.

","name":"summary"},{"type":{"names":["String"]},"description":"

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

","name":"version"},{"type":{"names":["String"]},"description":"

Optional name override. By default, the\npackage name comes from the name of its directory.

","name":"name"},{"type":{"names":["String"]},"description":"

Optional Git URL to the source repository.

","name":"git"}],"locus":"package.js"},"onUse":{"summary":"Define package dependencies and expose package methods.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onUse","longname":"Package.onUse","kind":"function","scope":"static","options":[],"locus":"package.js"},"onTest":{"summary":"Define dependencies and expose package methods for unit tests.","memberof":"Package","params":[{"type":{"names":["function"]},"description":"

A function that takes in the package control 'api' object, which keeps track of dependencies and exports.

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

","name":"name"},{"type":{"names":["String","Array."]},"description":"

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

","name":"use"},{"type":{"names":["Array."]},"description":"

The source files that make up the\nbuild plugin, independent from api.addFiles.

","name":"sources"},{"type":{"names":["Object"]},"description":"

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

","name":"npmDependencies"}],"locus":"package.js"}},"Npm":{"kind":"namespace","name":"Npm","scope":"global","summary":"The Npm object in package.js and package source files.","longname":"Npm","depends":{"summary":"Specify which [NPM](https://www.npmjs.org/) packages\nyour Meteor package depends on.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are package\nnames and the values are version numbers in string form.\nYou can only depend on exact versions of NPM packages. Example:

\n
Npm.depends({moment: "2.8.3"});
","name":"dependencies"}],"memberof":"Npm","name":"depends","longname":"Npm.depends","kind":"function","scope":"static","options":[],"locus":"package.js"},"require":{"summary":"Require a package that was specified using\n`Npm.depends()`.","params":[{"type":{"names":["String"]},"description":"

The name of the package to require.

","name":"name"}],"memberof":"Npm","name":"require","longname":"Npm.require","kind":"function","scope":"static","options":[],"locus":"Server"}},"Cordova":{"kind":"namespace","name":"Cordova","scope":"global","summary":"The Cordova object in package.js.","longname":"Cordova","depends":{"summary":"Specify which [Cordova / PhoneGap](http://cordova.apache.org/)\nplugins your Meteor package depends on.\n\nPlugins are installed from\n[plugins.cordova.io](http://plugins.cordova.io/), so the plugins and\nversions specified must exist there. Alternatively, the version\ncan be replaced with a GitHub tarball URL as described in the\n[Cordova / PhoneGap](https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#meteor-packages-with-cordovaphonegap-dependencies)\npage of the Meteor wiki on GitHub.","params":[{"type":{"names":["Object"]},"description":"

An object where the keys are plugin\nnames and the values are version numbers or GitHub tarball URLs\nin string form.\nExample:

\n
Cordova.depends({\n  "org.apache.cordova.camera": "0.3.0"\n});

Alternatively, with a GitHub URL:

\n
Cordova.depends({\n  "org.apache.cordova.camera":\n    "https://github.com/apache/cordova-plugin-camera/tarball/d84b875c"\n});
","name":"dependencies"}],"memberof":"Cordova","name":"depends","longname":"Cordova.depends","kind":"function","scope":"static","options":[],"locus":"package.js"}},"currentUser":{"scope":"global","name":"currentUser","summary":"Calls [Meteor.user()](#meteor_user). Use `{{#if currentUser}}` to check whether the user is logged in.","longname":"currentUser","kind":"member","ishelper":"true"},"loggingIn":{"scope":"global","name":"loggingIn","summary":"Calls [Meteor.loggingIn()](#meteor_loggingin).","longname":"loggingIn","kind":"member","ishelper":"true"},"Template#created":{"name":"created","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is created.","longname":"Template#created","kind":"member","locus":"Client"},"Template#rendered":{"name":"rendered","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is rendered.","longname":"Template#rendered","kind":"member","locus":"Client"},"Template#destroyed":{"name":"destroyed","scope":"instance","memberof":"Template","summary":"Provide a callback when an instance of a template is destroyed.","longname":"Template#destroyed","kind":"member","locus":"Client"},"Blaze":{"TemplateInstance#data":{"scope":"instance","memberof":"Blaze.TemplateInstance","name":"data","summary":"The data context of this instance's latest invocation.","longname":"Blaze.TemplateInstance#data","kind":"member","locus":"Client"},"TemplateInstance#view":{"name":"view","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The [View](#blaze_view) object for this invocation of the template.","longname":"Blaze.TemplateInstance#view","kind":"member","locus":"Client"},"TemplateInstance#firstNode":{"name":"firstNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The first top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#firstNode","kind":"member","locus":"Client"},"TemplateInstance#lastNode":{"name":"lastNode","memberof":"Blaze.TemplateInstance","scope":"instance","summary":"The last top-level DOM node in this template instance.","longname":"Blaze.TemplateInstance#lastNode","kind":"member","locus":"Client"},"currentView":{"summary":"The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","name":"currentView","longname":"Blaze.currentView","kind":"member","memberof":"Blaze","scope":"static","locus":"Client"},"With":{"summary":"Constructs a View that renders content with a data context.","params":[{"type":{"names":["Object","function"]},"description":"

An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"}],"name":"With","longname":"Blaze.With","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"If":{"summary":"Constructs a View that renders content conditionally.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. Whether the result is truthy or falsy determines whether contentFunc or elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"If","longname":"Blaze.If","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Unless":{"summary":"An inverted [`Blaze.If`](#blaze_if).","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.

","name":"conditionFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content. If no elseFunc is supplied, no content is shown in the "else" case.

","name":"elseFunc"}],"name":"Unless","longname":"Blaze.Unless","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Each":{"summary":"Constructs a View that renders `contentFunc` for each item in a sequence.","params":[{"type":{"names":["function"]},"description":"

A function to reactively re-run. The function may return a Cursor, an array, null, or undefined.

","name":"argFunc"},{"type":{"names":["function"]},"description":"

A Function that returns renderable content.

","name":"contentFunc"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A Function that returns renderable content to display in the case when there are no items to display.

","name":"elseFunc"}],"name":"Each","longname":"Blaze.Each","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"isTemplate":{"summary":"Returns true if `value` is a template object like `Template.myTemplate`.","params":[{"type":{"names":["Any"]},"description":"

The value to test.

","name":"value"}],"name":"isTemplate","longname":"Blaze.isTemplate","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance#$":{"summary":"Find all elements matching `selector` in this template instance, and return them as a JQuery object.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"$","longname":"Blaze.TemplateInstance#$","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#findAll":{"summary":"Find all elements matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"findAll","longname":"Blaze.TemplateInstance#findAll","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#find":{"summary":"Find one element matching `selector` in this template instance.","params":[{"type":{"names":["String"]},"description":"

The CSS selector to match, scoped to the template contents.

","name":"selector"}],"name":"find","longname":"Blaze.TemplateInstance#find","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"TemplateInstance#autorun":{"summary":"A version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: a Tracker.Computation object.

","name":"runFunc"}],"name":"autorun","longname":"Blaze.TemplateInstance#autorun","kind":"function","memberof":"Blaze.TemplateInstance","scope":"instance","options":[],"locus":"Client"},"render":{"summary":"Renders a template or View to DOM nodes and inserts it into the DOM, returning a rendered [View](#blaze_view) which can be passed to [`Blaze.remove`](#blaze_remove).","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render. If a template, a View object is constructed. If a View, it must be an unrendered View, which becomes a rendered View and is returned.

","name":"templateOrView"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"render","longname":"Blaze.render","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"renderWithData":{"summary":"Renders a template or View to DOM nodes with a data context. Otherwise identical to `Blaze.render`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object to render.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

","name":"data"},{"type":{"names":["DOMNode"]},"description":"

The node that will be the parent of the rendered template. It must be an Element node.

","name":"parentNode"},{"type":{"names":["DOMNode"]},"optional":true,"description":"

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

","name":"nextNode"},{"type":{"names":["Blaze.View"]},"optional":true,"description":"

Optional. If provided, it will be set as the rendered View's parentView.

","name":"parentView"}],"name":"renderWithData","longname":"Blaze.renderWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"remove":{"summary":"Removes a rendered View from the DOM, stopping all reactive updates and event listeners on it.","params":[{"type":{"names":["Blaze.View"]},"description":"

The return value from Blaze.render or Blaze.renderWithData.

","name":"renderedView"}],"name":"remove","longname":"Blaze.remove","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTML":{"summary":"Renders a template or View to a string of HTML.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"}],"name":"toHTML","longname":"Blaze.toHTML","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"toHTMLWithData":{"summary":"Renders a template or View to HTML with a data context. Otherwise identical to `Blaze.toHTML`.","params":[{"type":{"names":["Template","Blaze.View"]},"description":"

The template (e.g. Template.myTemplate) or View object from which to generate HTML.

","name":"templateOrView"},{"type":{"names":["Object","function"]},"description":"

The data context to use, or a function returning a data context.

","name":"data"}],"name":"toHTMLWithData","longname":"Blaze.toHTMLWithData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getData":{"summary":"Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template.","params":[{"type":{"names":["DOMElement","Blaze.View"]},"optional":true,"description":"

Optional. An element that was rendered by a Meteor, or a View.

","name":"elementOrView"}],"name":"getData","longname":"Blaze.getData","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"getView":{"summary":"Gets either the current View, or the View enclosing the given DOM element.","params":[{"type":{"names":["DOMElement"]},"optional":true,"description":"

Optional. If specified, the View enclosing element is returned.

","name":"element"}],"name":"getView","longname":"Blaze.getView","kind":"function","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"Template":{"kind":"class","summary":"Constructor for a Template, which is used to construct Views with particular name and content.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for Views constructed by this Template. See view.name.

","name":"viewName"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.

","name":"renderFunction"}],"name":"Template","longname":"Blaze.Template","memberof":"Blaze","scope":"static","options":[],"locus":"Client"},"TemplateInstance":{"kind":"class","summary":"The class for template instances","params":[{"type":{"names":["Blaze.View"]},"name":"view"}],"name":"TemplateInstance","longname":"Blaze.TemplateInstance","memberof":"Blaze","scope":"static","options":[],"instancename":"template"},"View":{"kind":"class","summary":"Constructor for a View, which represents a reactive region of DOM.","params":[{"type":{"names":["String"]},"optional":true,"description":"

Optional. A name for this type of View. See view.name.

","name":"name"},{"type":{"names":["function"]},"description":"

A function that returns renderable content. In this function, this is bound to the View.

","name":"renderFunction"}],"name":"View","longname":"Blaze.View","memberof":"Blaze","scope":"static","options":[],"locus":"Client"}},"MethodInvocation#isSimulation":{"summary":"Access inside a method invocation. Boolean value, true if this invocation is a stub.","name":"isSimulation","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#isSimulation","kind":"member","locus":"Anywhere"},"MethodInvocation#userId":{"summary":"The id of the user that made this method call, or `null` if no user was logged in.","name":"userId","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#userId","kind":"member","locus":"Anywhere"},"MethodInvocation#connection":{"summary":"Access inside a method invocation. The [connection](#meteor_onconnection) that this method was received on. `null` if the method is not associated with a connection, eg. a server initiated method call.","name":"connection","memberof":"MethodInvocation","scope":"instance","longname":"MethodInvocation#connection","kind":"member","locus":"Server"},"Subscription#connection":{"summary":"Access inside the publish function. The incoming [connection](#meteor_onconnection) for this subscription.","name":"connection","memberof":"Subscription","scope":"instance","longname":"Subscription#connection","kind":"member","locus":"Server"},"Subscription#userId":{"summary":"Access inside the publish function. The id of the logged-in user, or `null` if no user is logged in.","memberof":"Subscription","name":"userId","scope":"instance","longname":"Subscription#userId","kind":"member","locus":"Server"},"Template":{"body":{"summary":"The [template object](#templates_api) representing your `` tag.","name":"body","longname":"Template.body","kind":"member","memberof":"Template","scope":"static","locus":"Client"},"instance":{"kind":"function","name":"instance","memberof":"Template","summary":"The [template instance](#template_inst) corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, `null`.","scope":"static","longname":"Template.instance","options":[],"params":[],"locus":"Client"},"currentData":{"summary":"Returns the data context of the current helper, or the data context of the template that declares the current event handler or callback. Establishes a reactive dependency on the result.","kind":"function","name":"currentData","longname":"Template.currentData","memberof":"Template","scope":"static","options":[],"params":[],"locus":"Client"},"parentData":{"summary":"Accesses other data contexts that enclose the current data context.","kind":"function","params":[{"type":{"names":["Integer"]},"description":"

The number of levels beyond the current data context to look.

","name":"numLevels"}],"name":"parentData","longname":"Template.parentData","memberof":"Template","scope":"static","options":[],"locus":"Client"},"registerHelper":{"summary":"Defines a [helper function](#template_helpers) which can be used from all templates.","kind":"function","params":[{"type":{"names":["String"]},"description":"

The name of the helper function you are defining.

","name":"name"},{"type":{"names":["function"]},"description":"

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

","name":"template"},{"type":{"names":["Object"]},"optional":true,"description":"

Optional. The data context in which to include the template.

","name":"data"}],"scope":"static","longname":"Template.dynamic","options":[],"istemplate":"true","locus":"Templates"},"summary":"The class for defining templates","kind":"class","name":"Template","longname":"Template","scope":"global","options":[],"params":[],"instancename":"Template.myTemplate"},"Tracker":{"active":{"summary":"True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.","name":"active","longname":"Tracker.active","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"currentComputation":{"summary":"The current computation, or `null` if there isn't one. The current computation is the [`Tracker.Computation`](#tracker_computation) object created by the innermost active call to `Tracker.autorun`, and it's the computation that gains dependencies when reactive data sources are accessed.","name":"currentComputation","longname":"Tracker.currentComputation","kind":"member","memberof":"Tracker","scope":"static","locus":"Client"},"Computation#stopped":{"summary":"True if this computation has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"stopped","longname":"Tracker.Computation#stopped","kind":"member","locus":"Client"},"Computation#invalidated":{"summary":"True if this computation has been invalidated (and not yet rerun), or if it has been stopped.","memberof":"Tracker.Computation","scope":"instance","name":"invalidated","longname":"Tracker.Computation#invalidated","kind":"member","locus":"Client"},"Computation#firstRun":{"summary":"True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.","memberof":"Tracker.Computation","scope":"instance","name":"firstRun","longname":"Tracker.Computation#firstRun","kind":"member","locus":"Client"},"Computation":{"summary":"A Computation object represents code that is repeatedly rerun\nin response to\nreactive data changes. Computations don't have return values; they just\nperform actions, such as rerendering a template on the screen. Computations\nare created using Tracker.autorun. Use stop to prevent further rerunning of a\ncomputation.","name":"Computation","longname":"Tracker.Computation","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"computation"},"Computation#onInvalidate":{"summary":"Registers `callback` to run when this computation is next invalidated, or runs it immediately if the computation is already invalidated. The callback is run exactly once and not upon future invalidations unless `onInvalidate` is called again after the computation becomes valid again.","params":[{"type":{"names":["function"]},"description":"

Function to be called on invalidation. Receives one argument, the computation that was invalidated.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.Computation#onInvalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"locus":"Client"},"Computation#invalidate":{"summary":"Invalidates this computation so that it will be rerun.","name":"invalidate","longname":"Tracker.Computation#invalidate","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Computation#stop":{"summary":"Prevents this computation from rerunning.","name":"stop","longname":"Tracker.Computation#stop","kind":"function","memberof":"Tracker.Computation","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#depend":{"summary":"Declares that the current computation (or `fromComputation` if given) depends on `dependency`. The computation will be invalidated the next time `dependency` changes.\n\nIf there is no current computation and `depend()` is called with no arguments, it does nothing and returns false.\n\nReturns true if the computation is a new dependent of `dependency` rather than an existing one.","params":[{"type":{"names":["Tracker.Computation"]},"optional":true,"description":"

An optional computation declared to depend on dependency instead of the current computation.

","name":"fromComputation"}],"name":"depend","longname":"Tracker.Dependency#depend","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"locus":"Client"},"Dependency#changed":{"summary":"Invalidate all dependent computations immediately and remove them as dependents.","name":"changed","longname":"Tracker.Dependency#changed","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"Dependency#hasDependents":{"summary":"True if this Dependency has one or more dependent Computations, which would be invalidated if this Dependency were to change.","name":"hasDependents","longname":"Tracker.Dependency#hasDependents","kind":"function","memberof":"Tracker.Dependency","scope":"instance","options":[],"params":[],"locus":"Client"},"flush":{"summary":"Process all reactive updates immediately and ensure that all invalidated computations are rerun.","name":"flush","longname":"Tracker.flush","kind":"function","memberof":"Tracker","scope":"static","options":[],"params":[],"locus":"Client"},"autorun":{"summary":"Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.","params":[{"type":{"names":["function"]},"description":"

The function to run. It receives one argument: the Computation object that will be returned.

","name":"runFunc"}],"name":"autorun","longname":"Tracker.autorun","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"nonreactive":{"summary":"Run a function without tracking dependencies.","params":[{"type":{"names":["function"]},"description":"

A function to call immediately.

","name":"func"}],"name":"nonreactive","longname":"Tracker.nonreactive","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"onInvalidate":{"summary":"Registers a new [`onInvalidate`](#computation_oninvalidate) callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped.","params":[{"type":{"names":["function"]},"description":"

A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

","name":"callback"}],"name":"onInvalidate","longname":"Tracker.onInvalidate","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"afterFlush":{"summary":"Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless `afterFlush` is called again.","params":[{"type":{"names":["function"]},"description":"

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

","name":"helpers"}],"name":"helpers","longname":"Template#helpers","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"Template#events":{"summary":"Specify event handlers for this template.","params":[{"type":{"names":["EventMap"]},"description":"

Event handlers to associate with this template.

","name":"eventMap"}],"name":"events","longname":"Template#events","kind":"function","memberof":"Template","scope":"instance","options":[],"locus":"Client"},"check":{"summary":"Check that a value matches a [pattern](#matchpatterns).\nIf the value does not match the pattern, throw a `Match.Error`.\n\nParticularly useful to assert that arguments to a function have the right\ntypes and structure.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match\nvalue against

","name":"pattern"}],"name":"check","longname":"check","kind":"function","scope":"global","options":[],"locus":"Anywhere"},"Match":{"test":{"summary":"Returns true if the value matches the pattern.","params":[{"type":{"names":["Any"]},"description":"

The value to check

","name":"value"},{"type":{"names":["MatchPattern"]},"description":"

The pattern to match value against

","name":"pattern"}],"name":"test","longname":"Match.test","kind":"function","memberof":"Match","scope":"static","options":[],"locus":"Anywhere"}},"MethodInvocation":{"summary":"The state for a single invocation of a method, referenced by this\ninside a method definition.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"MethodInvocation","longname":"MethodInvocation","kind":"function","scope":"global","options":[],"instancename":"this"},"MethodInvocation#unblock":{"summary":"Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.","memberof":"MethodInvocation","scope":"instance","name":"unblock","longname":"MethodInvocation#unblock","kind":"function","options":[],"params":[],"locus":"Server"},"MethodInvocation#setUserId":{"summary":"Set the logged in user.","memberof":"MethodInvocation","scope":"instance","params":[{"type":{"names":["String","null"]},"description":"

The value that should be returned by userId on this connection.

","name":"userId"}],"name":"setUserId","longname":"MethodInvocation#setUserId","kind":"function","options":[],"locus":"Server"},"DDP":{"connect":{"summary":"Connect to the server of a different Meteor application to subscribe to its document sets and invoke its remote methods.","params":[{"type":{"names":["String"]},"description":"

The URL of another Meteor application.

","name":"url"}],"name":"connect","longname":"DDP.connect","kind":"function","memberof":"DDP","scope":"static","options":[],"locus":"Anywhere"}},"Subscription#error":{"summary":"Call inside the publish function. Stops this client's subscription, triggering a call on the client to the `onError` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any. If `error` is not a [`Meteor.Error`](#meteor_error), it will be [sanitized](#meteor_error).","params":[{"type":{"names":["Error"]},"description":"

The error to pass to the client.

","name":"error"}],"scope":"instance","memberof":"Subscription","name":"error","longname":"Subscription#error","kind":"function","options":[],"locus":"Server"},"Subscription#stop":{"summary":"Call inside the publish function. Stops this client's subscription; the `onError` callback is *not* invoked on the client.","scope":"instance","memberof":"Subscription","name":"stop","longname":"Subscription#stop","kind":"function","options":[],"params":[],"locus":"Server"},"Subscription#onStop":{"summary":"Call inside the publish function. Registers a callback function to run when the subscription is stopped.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["function"]},"description":"

The callback function

","name":"func"}],"name":"onStop","longname":"Subscription#onStop","kind":"function","options":[],"locus":"Server"},"Subscription#added":{"summary":"Call inside the publish function. Informs the subscriber that a document has been added to the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the new document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The new document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the new document. If _id is present it is ignored.

","name":"fields"}],"name":"added","longname":"Subscription#added","kind":"function","options":[],"locus":"Server"},"Subscription#changed":{"summary":"Call inside the publish function. Informs the subscriber that a document in the record set has been modified.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that contains the changed document.

","name":"collection"},{"type":{"names":["String"]},"description":"

The changed document's ID.

","name":"id"},{"type":{"names":["Object"]},"description":"

The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a value of undefined it was removed from the document. If _id is present it is ignored.

","name":"fields"}],"name":"changed","longname":"Subscription#changed","kind":"function","options":[],"locus":"Server"},"Subscription#removed":{"summary":"Call inside the publish function. Informs the subscriber that a document has been removed from the record set.","memberof":"Subscription","scope":"instance","params":[{"type":{"names":["String"]},"description":"

The name of the collection that the document has been removed from.

","name":"collection"},{"type":{"names":["String"]},"description":"

The ID of the document that has been removed.

","name":"id"}],"name":"removed","longname":"Subscription#removed","kind":"function","options":[],"locus":"Server"},"Subscription#ready":{"summary":"Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the `onReady` callback passed to [`Meteor.subscribe`](#meteor_subscribe), if any.","memberof":"Subscription","scope":"instance","name":"ready","longname":"Subscription#ready","kind":"function","options":[],"params":[],"locus":"Server"},"Email":{"send":{"summary":"Send an email. Throws an `Error` on failure to contact mail server\nor if mail server returns an error. All fields should match\n[RFC5322](http://tools.ietf.org/html/rfc5322) specification.","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"send","longname":"Email.send","kind":"function","memberof":"Email","scope":"static","options":[{"type":{"names":["String"]},"description":"

"From:" address (required)

","name":"from"},{"type":{"names":["String","Array."]},"description":"

"To:", "Cc:", "Bcc:", and "Reply-To:" addresses

","name":"to, cc, bcc, replyTo"},{"type":{"names":["String"]},"optional":true,"description":"

"Subject:" line

","name":"subject"},{"type":{"names":["String"]},"optional":true,"description":"

Mail body (in plain text or HTML)

","name":"text, html"},{"type":{"names":["Object"]},"optional":true,"description":"

Dictionary of custom headers

","name":"headers"}],"locus":"Server"}},"HTTP":{"call":{"summary":"Perform an outbound HTTP request.","params":[{"type":{"names":["String"]},"description":"

The HTTP method to use, such as "GET", "POST", or "HEAD".

","name":"method"},{"type":{"names":["String"]},"description":"

The URL to retrieve.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required.

","name":"asyncCallback"}],"name":"call","longname":"HTTP.call","kind":"function","memberof":"HTTP","scope":"static","options":[{"type":{"names":["String"]},"description":"

String to use as the HTTP request body.

","name":"content"},{"type":{"names":["Object"]},"description":"

JSON-able object to stringify and use as the HTTP request body. Overwrites content.

","name":"data"},{"type":{"names":["String"]},"description":"

Query string to go in the URL. Overwrites any query string in url.

","name":"query"},{"type":{"names":["Object"]},"description":"

Dictionary of request parameters to be encoded and placed in the URL (for GETs) or request body (for POSTs). If content or data is specified, params will always be placed in the URL.

","name":"params"},{"type":{"names":["String"]},"description":"

HTTP basic authentication string of the form "username:password"

","name":"auth"},{"type":{"names":["Object"]},"description":"

Dictionary of strings, headers to add to the HTTP request.

","name":"headers"},{"type":{"names":["Number"]},"description":"

Maximum time in milliseconds to wait for the request before failing. There is no timeout by default.

","name":"timeout"},{"type":{"names":["Boolean"]},"description":"

If true, transparently follow HTTP redirects. Cannot be set to false on the client. Default true.

","name":"followRedirects"}],"locus":"Anywhere"},"get":{"summary":"Send an HTTP `GET` request. Equivalent to calling [`HTTP.call`](#http_call) with \"GET\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it hasn't been set before. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file diff --git a/packages/session/session.js b/packages/session/session.js index 72691a4e7c..24e6d6cc3c 100644 --- a/packages/session/session.js +++ b/packages/session/session.js @@ -15,7 +15,7 @@ Session = new ReactiveDict('session'); /** * @memberOf Session * @method setDefault - * @summary Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set). + * @summary Set a variable in the session if it hasn't been set before. Otherwise works exactly the same as [`Session.set`](#session_set). * @locus Client * @param {String} key The key to set, eg, `selectedItem` * @param {EJSONable | undefined} value The new value for `key` From d46e14a0aaa39e7bc34f3ded487cd8c0d7136b70 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Mon, 13 Oct 2014 16:23:59 -0700 Subject: [PATCH 223/283] Don't print 'expected' error-exit from phantomjs --- tools/selftest.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/selftest.js b/tools/selftest.js index 7e2ad61f80..6d74aa1223 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -825,6 +825,8 @@ var PhantomClient = function (options) { self.name = "phantomjs"; self.process = null; + + self._logError = true; }; util.inherits(PhantomClient, Client); @@ -840,15 +842,17 @@ _.extend(PhantomClient.prototype, { ['-c', ("exec " + phantomPath + " --load-images=no /dev/stdin <<'END'\n" + phantomScript + "\nEND\n")], - {}, function (exitCode, stdout, stderr) { - if (exitCode != 0) { - console.log("PhantomJS exited with exitCode ", exitCode, "\nstdout:\n", stdout, "\nstderr:\n", stderr); + {}, function (error, stdout, stderr) { + if (self._logError && error) { + console.log("PhantomJS exited with error ", error, "\nstdout:\n", stdout, "\nstderr:\n", stderr); } }); }, stop: function() { var self = this; + // Suppress the expected SIGTERM exit 'failure' + self._logError = false; self.process && self.process.kill(); self.process = null; } From 4462c18964168ce40ae5ba18be68e8e6f5a1122a Mon Sep 17 00:00:00 2001 From: Stephan Hochhaus Date: Wed, 1 Oct 2014 10:33:31 +0200 Subject: [PATCH 224/283] Deps.autorun becomes Tracker.autorun Updated wordplay and parties example to use Tracker.autorun instead of legacy Deps --- examples/parties/client/client.js | 4 ++-- examples/wordplay/client/wordplay.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/parties/client/client.js b/examples/parties/client/client.js index 69d33a51f5..be6c2e43f2 100644 --- a/examples/parties/client/client.js +++ b/examples/parties/client/client.js @@ -5,7 +5,7 @@ Meteor.subscribe("parties"); // If no party selected, or if the selected party was deleted, select one. Meteor.startup(function () { - Deps.autorun(function () { + Tracker.autorun(function () { var selected = Session.get("selected"); if (! selected || ! Parties.findOne(selected)) { var party = Parties.findOne(); @@ -130,7 +130,7 @@ Template.map.rendered = function () { self.node = self.find("svg"); if (! self.handle) { - self.handle = Deps.autorun(function () { + self.handle = Tracker.autorun(function () { var selected = Session.get('selected'); var selectedParty = selected && Parties.findOne(selected); var radius = function (party) { diff --git a/examples/wordplay/client/wordplay.js b/examples/wordplay/client/wordplay.js index 3c4d816e6c..9e3059ffab 100644 --- a/examples/wordplay/client/wordplay.js +++ b/examples/wordplay/client/wordplay.js @@ -228,7 +228,7 @@ Meteor.startup(function () { // subscribe to all the players, the game i'm in, and all // the words in that game. - Deps.autorun(function () { + Tracker.autorun(function () { Meteor.subscribe('players'); if (Session.get('player_id')) { From 6c793b427cd270493950504924630aaafa839625 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 3 Oct 2014 01:15:01 +0200 Subject: [PATCH 225/283] Fix `emailTemplates` locus close #2748 --- packages/accounts-password/email_templates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-password/email_templates.js b/packages/accounts-password/email_templates.js index a957e6fa24..bbc81036be 100644 --- a/packages/accounts-password/email_templates.js +++ b/packages/accounts-password/email_templates.js @@ -1,6 +1,6 @@ /** * @summary Options to customize emails sent from the Accounts system. - * @locus Anywhere + * @locus Server */ Accounts.emailTemplates = { from: "Meteor Accounts ", From 16e9196a8ea3003e7314ecb19b037bca219daea9 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 Oct 2014 17:06:58 -0700 Subject: [PATCH 226/283] Include loginStyle in sample ServiceConfiguration Fixes #2758. --- docs/client/api.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/client/api.html b/docs/client/api.html index f5c4ee4826..d71760ae2f 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -1855,6 +1855,7 @@ running `meteor add service-configuration` in your app: ServiceConfiguration.configurations.insert({ service: "weibo", clientId: "1292962797", + loginStyle: "popup", secret: "75a730b58f5691de5522789070c319bc" }); From 364b09ffda7ae4db5f31dc8dc9961cef50bfd641 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 17:20:50 -0700 Subject: [PATCH 227/283] Add image from Meteor Manual --- packages/tracker/trp.svg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/tracker/trp.svg diff --git a/packages/tracker/trp.svg b/packages/tracker/trp.svg new file mode 100644 index 0000000000..ab99b82462 --- /dev/null +++ b/packages/tracker/trp.svg @@ -0,0 +1,20 @@ + + + + + + +DatabaseProvides Reactivity + + +Front-End LibraryConsumes Reactivity + + +Application CodeTransparently Reactive(doesn’t need to know about reactivity) + + + From ba41957243f28af624dca5fc8881f5ef9bb99800 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 17:25:35 -0700 Subject: [PATCH 228/283] another image from Meteor Manual --- packages/tracker/subscriptions.svg | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 packages/tracker/subscriptions.svg diff --git a/packages/tracker/subscriptions.svg b/packages/tracker/subscriptions.svg new file mode 100644 index 0000000000..33c57c8196 --- /dev/null +++ b/packages/tracker/subscriptions.svg @@ -0,0 +1,37 @@ + + + + + + +`currentInterest` changesfrom “fashion” to “celebrities” + + +subscription autorun invalidated + + +onInvalidate() runs- “Cosmo” subscription stops; its`references` property is now 0 + + +subscription autorun reruns- new “People” subscription made, with `references` property of 1 + + +afterFlush() runs- “Cosmo” subscription removed,because it is unused (references 0) + + + + + + + + + + + + + + +user is subscribed to “Cosmo”,with a `currentInterest` of “fashion” + + From dbef8b72471ba234d1f52910f4609c8bfbce9ca5 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 Oct 2014 17:25:38 -0700 Subject: [PATCH 229/283] Improve error message for limited ordered observe See #1643. --- packages/minimongo/minimongo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/minimongo/minimongo.js b/packages/minimongo/minimongo.js index ef6e4a5909..83a4a19edf 100644 --- a/packages/minimongo/minimongo.js +++ b/packages/minimongo/minimongo.js @@ -323,7 +323,7 @@ _.extend(LocalCollection.Cursor.prototype, { // comment in _modifyAndNotify // XXX allow skip/limit with unordered observe if (!options._allow_unordered && !ordered && (self.skip || self.limit)) - throw new Error("must use ordered observe with skip or limit"); + throw new Error("must use ordered observe (ie, 'addedBefore' instead of 'added') with skip or limit"); if (self.fields && (self.fields._id === 0 || self.fields._id === false)) throw Error("You may not observe a cursor with {fields: {_id: 0}}"); From 4d64c493d65d33dca2669a54831526e3a6b48f11 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 17:28:23 -0700 Subject: [PATCH 230/283] README.md: port Tracker chapter over from Meteor Manual --- packages/tracker/README.md | 1138 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 packages/tracker/README.md diff --git a/packages/tracker/README.md b/packages/tracker/README.md new file mode 100644 index 0000000000..852c541d3a --- /dev/null +++ b/packages/tracker/README.md @@ -0,0 +1,1138 @@ +# Meteor Tracker + +Meteor Tracker (originally "Meteor Deps") is an incredibly tiny (~1k) but incredibly powerful library for **transparent reactive programming** in JavaScript. + +## Transparent Reactive Programming + +A basic problem when writing software, especially application software, is monitoring some value – like a record in a database, the currently selected item in a table, the width of a window, or the current time – and updating something whenever that value changes. + +There are several common patterns for expressing this idea in code, including: + +* **Poll and diff.** Periodically (every second, for example), fetch the current value of the thing, see if it's changed, and if so perform the update. + +* **Events.** The thing that can change emits an event when it changes. Another part of the program (often called a controller) arranges to listen for this event, and get the current value and perform the update when the event fires. + +* **Bindings.** Values are represented by objects that implement some interface, like BindableValue. Then a 'bind' method is used to tie two BindableValues together so that when one value changes, the other is updated automatically. Sometimes as part of setting up the binding, a transformation function can be specified. For example, Foo could be bound to Bar with the transformation function of toUpperCase. + +Another pattern, not yet as commonly used but very well suited for complex modern apps, is **reactive programming**. A reactive programming system works like a spreadsheet. The programmer says, "the contents of cell A3 should be equal to the sum of cells B1-B6, multiplied by the value of cell C4", and the spreadsheet is responsible for automatically modeling the flow of data between the cells, so that when cell B2 changes the value of cell A3 will be automatically updated. + +So reactive programming is a **declarative** style of programming, in which the programmer says what should happen (A3 should be kept equal to the result of a certain computation over the other cells), not how it should happen, as in imperative programming. + +Reactive programming is perfect for building user interfaces, because instead of attempting to model all interactions in a single piece of cohesive code the programmer can express what should happen upon specific changes. The paradigm of responding to a change is simpler to understand than modeling which changes affect the state of the program explicitly. For example, suppose that we are writing an HTML5 app with a table of items, and the user can click on an item to select it, or ctrl-click to select multiple items. We might have a `

` tag and want the contents of the tag to be equal to the name of the currently selected item, capitalized, or else "Multiple selection" if multiple items are selected. And we might have a set of `` tags and want the CSS class on each `` to be 'selected' if the items corresponding to that row is in the set of selected items, or the empty string otherwise. + +Reactive programming is a perfect fit for a situation like this: + +* If we use **poll and diff**, the UI will be unacceptably laggy. After the user clicks, the screen won't actually update until the next polling cycle. Also, we have to store the old selection set and diff it against the new selection set, which is a bit of a hassle. + +* If we use **events**, we have to write some fairly tangled controller code to manually map changes to the selection, or to the name of the selected item, onto updates to the UI. For example, when the selection changes we have to remember to update both the `

` and (typically) two affected ``s. What's more, when the selection changes we have to automatically register an event handler on the newly select item so that we can remember to update the `

`. This controller code is hard to structure cleanly and to maintain, especially as the UI is extended and redesigned. + +* If we use **bindings**, we will have to use a complex DSL (domain specific language) to express the complex relationships between the variables. The DSL will have to include indirection (bind the contents of the `

` not to the name of any fixed item, but to the item indicated by the current selection), transformation (capitalize the name), and conditionals (if more than one item is selected, show a placeholder string). + +Reactive programming promises to let us express this problem exactly as we think about it, giving us concise, readable, maintainable code. The only problem? Historically, reactive programming systems have been too complicated and slow for most people to use in production. They required reactive expressions to be modeled as a tree of nodes, and had to run an expensive dataflow analysis every time a change happened in order to know what to update. + +Meteor Tracker is a new reactive programming system that is incredibly simple and lightweight. It is **small** (around 1kb, gzipped and minifed), **simple** (you just write normal JavaScript and it's automatically reactive!), and **fast** (no expensive dataflow analysis – a reactive update is about as expensive as firing an event). + +When writing modern HTML5 applications, Tracker is your new best friend! + +## A Simple Example + + var favoriteFood = "apples"; + var favoriteFoodDep = new Tracker.Dependency; + + var getFavoriteFood = function () { + favoriteFoodDep.depend(); + return favoriteFood; + }; + + var setFavoriteFood = function (newValue) { + favoriteFood = newValue; + favoriteFoodDep.changed(); + }; + + getFavoriteFood(); + // "apples" + +This code should look familiar. It keeps track of a single value, `favoriteFood`, which is the user's favorite food as a string. And it provides a function `getFavoriteFood` to get the current favorite food and a function `setFavoriteFood` to set it. + +But it also contains three additional lines – the creation of a `Dependency` object, a call to `depend` on that object when the current value of `favoriteFood` is read, and a call to `changed` on that object when `favoriteFood` changes. That's all it takes to make `favoriteFood` a fully-fledged **reactive value**. You can learn more about how to create and use reactive values in Section 7. Creating Reactive Values. + +So what's a "reactive value" and how do we use it? + + var handle = Tracker.autorun(function () { + console.log("Your favorite food is " + getFavoriteFood()); + }); + // "Your favorite food is apples" + + setFavoriteFood("mangoes"); + // "Your favorite food is mangoes" + +`Tracker.autorun` immediately runs the function passed to it, printing "Your favorite food is apples". + +But wait, there's more! Whenever the user's favorite food changes, the autorun runs its function again. So when `setFavoriteFood("mangoes")` is called, the autorun is retriggered and "Your favorite food is mangoes" is printed. This happens because the user's favorite food is a reactive value (that is, because it calls `changed` from its setter and `depend` from its getter). + +Notice that this happens without registering for any events or setting up any bindings! The autorun simply logs the reactive values accessed while running its function, and reruns the function whenever any of those values change. + + setFavoriteFood("peaches"); + // "Your favorite food is peaches" + setFavoriteFood("bananas"); + // "Your favorite food is bananas" + handle.stop(); + setFavoriteFood("cake"); + // (nothing printed) + +The autorun remains active, printing a line every time the favorite food changes. + +Like `setTimeout` or `setInterval`, when `Tracker.autorun` is called, it returns a handle that can be used to stop the autorun later. Stopping the autorun cleans it up and causes it to no longer run, so nothing is printed after setting the favorite food to "cake". + +What if the autorun doesn't call `getFavoriteFood` directly? What if there is some other function – `getReversedFood` – in between `getFavoriteFood` and the autorun? + + var getReversedFood = function () { + return getFavoriteFood().split("").reverse().join(""); + }; + getReversedFood(); + // "ekac" + + var handle = Tracker.autorun(function () { + console.log("Your favorite food is " + getReversedFood() + " when reversed"); + }); + // Your favorite food is ekac when reversed + setFavoriteFood("pizza"); + // Your favorite food is azzip when reversed + +No problem at all. **Autoruns can make arbitrary blocks of JavaScript code reactive.** The code can call other functions, do arbitrary computations on the reactive values, or use the values of some reactive values to decide what other reactive values to look at. It's just plain JavaScript! + +This is a very powerful idea because for many users, it enables **transparent reactive programming** – reactive programming with no code changes. The only code that needs to know about Tracker are **providers** of reactive values (such as a database library) and **consumers** of reactive values (such as a frontend library like Blaze, React, or famo.us). The rest of the code – the application code itself, that does database queries to produce values to be used in the UI – can be written without even knowing that the reactive programming system exists. This makes applications fun and super fast to write, and incredibly easy to maintain, compared to other systems like polling, manually wired up events, or bindings. + +The next section shows how transparent reactive programming can be used in a real application to make a live-updating user interface. + +## Building a User Interface with Transparent Reactive Programming + +In the previous section we created a reactive value from scratch (the `getFavoriteFood` and `setFavoriteFood` functions). In practice, when you're writing a real application, you'll probably never need to do this. Instead you'll probably use libraries that already have Tracker support, so that when you do a database query, or get the current time or the size of the browser window, the library handles the reactive value's registration for you. (It's easy to add Tracker support to a library – often little more than a call to `depend` and a call to`changed` in the right places.) + +One library you can use is [ReactiveDict](https://atmospherejs.com/meteor/reactive-dict). It provides a simple dictionary object whose `get(key)` and `set(key, value)` functions are fully reactive. + + var forecasts = new ReactiveDict; + forecasts.set("san-francisco", "cloudy"); + forecasts.get("san-francisco"); + // "cloudy" + +Now let's put the current forecast for San Francisco on the screen, and make it reactively update whenever the forecast changes. The code to do this is shockingly short. + + + $('body').html("The weather here is !"); + Tracker.autorun(function () { + $('.forecast').text(forecasts.get('san-francisco')); + }); + // Page now says "The weather here is cloudy!" + + forecasts.set("san-francisco", "foggy"); + // Page updates to say "The weather here is foggy!" + + +In a real application you'd probably never need to write even that much code. You'd use a library like [Meteor Blaze](https://www.meteor.com/blaze), which lets you instead use a templating syntax such as: + + + + // In app.js + Template.weather.forecast = function () { + return forecasts.get("san-francisco"); + }; + +Blaze parses the template and sets up autoruns to update all of the elements as necessary. But fundamentally, what Blaze is doing is very simple – it's simply letting you express your app's interface in HTML templates instead of in JavaScript code. + +The power of Tracker comes from the fact that you can use arbitrary JavaScript to compute what will appear on the screen, and it will be automatically reactive. Here's a more complex example: + + var forecasts = new ReactiveDict; + forecasts.set("Chicago", "cloudy"); + forecasts.set("Tokyo", "sunny"); + + var settings = new ReactiveDict; + settings.set("city", "Chicago"); + + $('body').html("The weather in is ."); + Tracker.autorun(function () { + console.log("Updating"); + var currentCity = settings.get('city'); + $('.city').text(currentCity); + $('.weather').text(forecasts.get(currentCity).toUpperCase()); + }); + // Prints "Updating" + // Page now says "The weather in Chicago is CLOUDY." + +In this example, one reactive variable ("city" in `settings`) is used to determine what other reactive variable to look at (the appropriate `forecast` for that city), and also the forecast is changed to upper case before it's used. + +When we change any of the reactive values that actually went into rendering the page, the page automatically updates: + + settings.set("city", "Tokyo"); + // Prints "Updating" + // Page updates to "The weather in Tokyo is SUNNY." + + forecasts.set("Tokyo", "wet"); + // Prints "Updating" + // Page updates to "The weather in Tokyo is WET." + +But, when we change a reactive value that wasn't needed to render the page, nothing happens, because Tracker knows that that value wasn't actually used. + + forecasts.set("Chicago", "warm"); + // Does *not* print "Updating" + // No work is done + +Like any app written with Tracker, this code naturally breaks down into three parts: + +* The **reactive data source**, in this case the ReactiveDict library. A real app will use a variety of libraries that provide reactive values, like a database library that lets you do arbitrary reactive database queries (such as Meteor's Minimongo, which provides a reactive implementation of the entire MongoDB query API), or simple libraries that provide the current time or window size as a reactive value. +* The **reactive data consumer**, in this case a simple autorun that uses jQuery to update a DOM element, but in a real app more likely a reactive templating library like Meteor Blaze. +* The **application logic**, in this case the actual code that fetches the appropriate forecast and capitalizes it. + +The key idea of Tracker is that the application code doesn't have to be aware of reactivity at all! This is **transparent reactive programming**. The application code just uses the public APIs of the reactive data sources (`currentCity.get()`, or a normal MongoDB query using Minimongo, for example). The application code never has to call any of the Tracker APIs. Only creators of new reactive data sources (like implementors of new databases), or of new reactive data consumers (like new templating systems), need to call the Tracker API or even be aware that Tracker exists. + + + +Tracker works behind the scenes to set up the reactivity. How does this work? + +## How Tracker Works + +The one-sentence summary is that `Tracker.autorun` logs all of the reactive values that are accessed while running the autorun's function, and when any of those reactive values change, they fire an event that causes the autorun to rerun itself. + +More precisely: + +Each call to `Tracker.autorun` creates an object called a `Computation`. Whenever an autorun is executing code, the global variable `Tracker.currentComputation` is set to the `Computation` that goes with that autorun. (When no autorun is running, `Tracker.currentComputation` is null.) + +A reactive data source (for example the `get()` method of `ReactiveDict`) checks to see if there is a `currentComputation`, that is, if it's being called from inside an autorun. If so, it holds on to a reference to that `Computation` and arranges to call a method on it when the relevant data (for example, the referenced key on the `ReactiveDict`) changes in the future. This tells the `Computation` created by the autorun to rerun itself. + +In other words, `Tracker` simply provides a global variable that is a rendezvous point between data that could change, and code that needs to know when the data changes. The global variable lets a reactive data source figure out which autoruns to notify when a reactive value changes. + +The following sections describe this system in complete detail. + +## Monitoring Reactive Values + +In `Tracker`, the usual way to monitor a reactive value is with `Tracker.autorun`. `Tracker.autorun` takes one argument, a function that might (or might not) end up referencing one or more reactive values when it's executed. `Tracker.autorun` runs the function immediately, before returning a result, and arranges to run the function again whenever the referenced reactive values change. + +Each call to `Tracker.autorun` creates a new `Computation` object, which represents the autorun. Calling the `stop()` method on the `Computation` cleans up the autorun and stops it from ever rerunning again. + +### Autoruns Can Be Nested Inside Autorun + + var weather = new ReactiveDict; + + weather.set("sky", "sunny"); + weather.set("temperature", "cool"); + + var weatherPrinter = Tracker.autorun(function () { + console.log("The sky is " + weather.get("sky")); + var temperaturePrinter = Tracker.autorun(function () { + console.log("The temperature is " + weather.get("temperature")); + }); + }); + // "The sky is sunny" + // "The temperature is cool" + +In the example above, the `temperaturePrinter` autorun is nested inside the `weatherPrinter` autorun. The first time through, both autoruns run the functions passed to them, printing out "The sky is sunny" and "The temperature is cool". + + weather.set("temperature", "hot"); + // "The temperature is hot" + +When there are nested autoruns, dependencies accrue to the innermost enclosing autorun. So changing `temperature` causes `temperaturePrinter` to rerun, but not `weatherPrinter`, because `temperaturePrinter` is the innermost autorun around the call to `weather.get("temperature")`. + + weather.set("sky", "stormy"); + // The sky is stormy + // The temperature is hot + +On the other hand, changing `sky` causes both messages to print. That's because the change to `sky` triggers a rerun of the outer `weatherPrinter` autorun, which tears down and recreates the inner `temperaturePrinter` autorun in the course of rerunning itself. + +Even though a new `temperaturePrinter` autorun is created every time the `weatherPrinter` autorun is rerun, it's not necessary to call `stop()` on the old `temperaturePrinter` autoruns. This is because of the automatic cleanup convention, discussed in the next section. + +When is it advantageous to nest autoruns? Most commonly in libraries such as Blaze, in cases where control is desired over the _granularity of reactivity_. Putting the two `console.log` lines in two different autoruns creates _finer-grained reactivity_, because if only the temperature changes, only the second `console.log` needs to be rerun. If both `console.log` lines had been put in the same autorun, any change to either variable would cause both messages to be printed. This would be _coarse-grained reactivity_. By using autoruns as _reactivity boundaries_ in this way, it's possible for libraries like Blaze to tightly optimize the amount of work that is done when a given reactive value changes, though this is not typically necessary in application code. + +### The Automatic Cleanup Convention + +For a library to be fully compatible with Tracker, it should obey this convention: if an object is created inside an autorun that needs to be stopped or cleaned up later, it should be automatically stopped whenever that autorun reruns itself. Why is this the correct convention? Because presumably, the autorun will recreate the object when it reruns itself, at least if the object is still wanted. + +Here's an example of how this convention might be used inside a Meteor application: + + Tracker.autorun(function () { + if (Session.get("subscribeToNewsFeed")) { + Meteor.subscribe("newsFeed", Meteor.userId()); + } + }); + +This code opens a DDP subscription to the current user's news feed, but only if the "subscribeToNewsFeed" flag is set. If the "subscribeToNewsFeed" flag is set to false, the subscription, if any, is destroyed (because the autorun will rerun itself and will fail to recreate the subscription). Likewise, if the user logs in as a different user, the subscription is torn down (because of the automatic cleanup convention) and replaced with a new subscription that points to the newly logged in user (as a result of the autorun rerunning and calling `Meteor.subscribe` with the new value of `Meteor.userId()`). + +When you nest autoruns, autorun itself follows the automatic cleanup convention. Inner autoruns will be cleaned up when outer autoruns are rerun. + + weatherPrinter.stop(); + weather.set("temperature", "chilly"); + // Nothing happens + +We stopped `weatherPrinter` but not `temperaturePrinter`. Nevertheless, when we change the temperature nothing is printed, because stopping `weatherPrinter` automatically stopped `temperaturePrinter` as the latter was created from inside the former. + +### When Autoruns Throw Exceptions + +If an autorun's function throws an exception the first time it is run, the exception propagates out of `Tracker.autorun` to the caller. No autorun is actually started, any `Tracker.Computation` created is destroyed, and the function is never rerun. This is usually the most convenient behavior. (It's useful to propagate the exception, and since an exception is being raised no `Tracker.Computation` can be returned, meaning that if an autorun were created it would be difficult for the caller to stop it.) + +If an autorun's already been run once without throwing an exception, it continues to run regardless of whether it throws exceptions on subsequent reruns. + +### Accessing the Current Computation Inside an Autorun + +The autorun function is called with one argument: the `Computation` object that represents this particular autorun. + + var partyInfo = new ReactiveDict; + partyInfo.set("status", "going-strong"); + + Tracker.autorun(function (comp) { + if (partyInfo.equals("status", "over")) { + console.log("Mom's home! Get out! The party's over!"); + comp.stop(); + return; + } + + runDiscoLights(); + crankTheMusic(); + eatPixieSticks(); + }); + +This autorun will self-destruct (stop itself) if the "status" flag of the party is ever set to "over". + +The following code will **not work**: + + // WRONG + var partyRunner = Tracker.autorun(function () { + if (partyInfo.equals("status", "over")) { + partyRunner.stop(); // WRONG + return; + } + ... + }) + +This code is almost right, but will fail to stop the party if the "status" flag has already been set to "over" on the first time the autorun runs. That's because that at that point, `Tracker.autorun` has not returned yet, so the value of `partyRunner` is still `undefined`. This is exactly the reason why the autorun function receives the current Computation as an argument. + +### Detecting the First Run + +Often, an autorun has logic that's specific to the first run. The `firstRun` flag on `Computation` reveals whether the autorun is being run for the first time. + + var book = new ReactiveDict; + book.set("title", "A Game of Thrones"); + Tracker.autorun(function (c) { + if (c.firstRun) { + console.log("Curling up on the couch to read."); + } + console.log("Now reading: " + book.get("title")); + }); + // "Curling up on the couch to read." + // "Now reading: A Game of Thrones" + +On the first run, the "Curling up on the couch to read" message is printed, because `firstRun` is true. + + book.set("title", "A Clash of Kings"); + // "Now reading: A Clash of Kings" + +When we change `title`, the autorun runs again, but the "Curling up on the couch to read" message is not printed because it is not the first time through the function. + +### Ignoring Changes to Certain Reactive Values + +Occasionally it is useful for an autorun to ignore changes to a particular reactive value, even though that value was used in the course of running the autorun. This can be done by wrapping the code that accesses that value inside `Tracker.nonreactive`. + + var game = new ReactiveDict; + game.set("score", 42); + game.set("umpire", "Giraffe"); + + Tracker.autorun(function () { + Tracker.nonreactive(function () { + console.log("DEBUG: current game umpire is " + game.get("umpire")); + }); + console.log("The game score is now " + game.get("score") + "!"); + }); + // "DEBUG: current game umpire is Giraffe" + // "The game score is now 42!" + +When "score" changes, the autorun is updated and new messages are printed. Changes to the umpire are considered less interesting, though, so even though we record the current umpire whenever we print the score, an umpire change is not sufficient to trigger an update. + + game.set("umpire", "Hippo"); + // (nothing printed) + + game.set("score", 137); + // "DEBUG: current game umpire is Hippo" + // "The game score is now 137!" + +# Fine-Grained Reactivity + +When using reactive APIs, it is best to ask only for the data that your app actually needs. For example, if your app stores `Person` objects, and needs only the given and family name of a particular `Person`, it should retrieve only those fields and not other fields, like mailing address or date of birth, that aren't needed. + +This improves performance for two reasons: + +* First of all, in most any system, retrieving less data will be faster and will use less memory. +* Second, in the Tracker system of transparent reactivity, retrieving data is the same as subscribing to change notifications for that data. + +By retrieving a piece of data like a `Person` object's date of birth, you're indicating that you want your code to be rerun whenever that `Person`'s date of birth changes. So to limit the amount of recomputation that happens, you should only retrieve the date of birth if it's actually needed for the computation that you're doing. (Of course, this only matters for code that is actually run in a reactive context, like an autorun, a reactive HTML template, and so forth.) + +Well-designed reactive APIs support _fine-grained_ queries. They let you ask for just the data that you need, like the family name of a `Person` object without the other fields. This improves efficiency because the app will be notified only when the family name of the `Person` changes, not when the other fields like date of birth change. The opposite of _fine-grained_ is _coarse-grained_. A query retrieving all of the fields on a `Person` object might be called _coarse-grained_ if most of the fields were unneeded, especially if the unneeded fields changed very frequently and this created a performance problem. + +Fine-grained reactivity can improve performance, but it's also important to not go overboard in creating incredibly fine-grained reactivity when it's not needed for performance. For example, there probably isn't any point in an ultra-fine-grained API that lets you retrieve just the first character of the name of a `Person`. + +Here are some examples of fine-grained reactivity in common Meteor APIs. + +ReactiveDict:`get` versus `equals` + +What's the difference between these two ways of writing an autorun? + + var data = new ReactiveDict; + + // VERSION 1 (INEFFICIENT) + Tracker.autorun(function () { + if (data.get("favoriteFood") === "pizza") + console.log("Inefficient code says: Time to get some pizza!"); + else + console.log("Inefficient code say: No pizza for you!"); + }); + + // VERSION 2 (MORE EFFICIENT) + Tracker.autorun(function () { + if (data.equals("favoriteFood", "pizza")) // CHANGED LINE + console.log("Efficient code says: Time to get some pizza!"); + else + console.log("Efficient code says: No pizza for you!"); + }); + +The first version ("Inefficient") prints a message whenever "favoriteFood" changes. The second ("More efficient") version is finer-grained: it prints a message only when "favoriteFood" changes to or from "pizza". + + data.set("favoriteFood", "apples"); + // Inefficient code says: No pizza for you! + // Efficient code says: No pizza for you! + data.set("favoriteFood", "pears"); + // Inefficient code says: No pizza for you! + data.set("favoriteFood", "oranges"); + // Inefficient code says: No pizza for you! + data.set("favoriteFood", "pizza"); + // Inefficient code says: Time to get some pizza! + // Efficient code says: Time to get some pizza! + data.set("favoriteFood", "pancakes"); + // Inefficient code says: No pizza for you! + // Efficient code says: No pizza for you! + +The coarse-grained version calls `get("favoriteFood")` on the `ReactiveDict`, so it depends on the value of "favoriteFood", and whenever "favoriteFood" changes the autorun has to rerun. This results in a lot of wasted work, because the autorun doesn't actually care about the value of "favoriteFood". It only cares if "favoriteFood" is "pizza". + +On the other hand, the fine-grained version calls `equals("favoriteFood", "pizza")` on the `ReactiveDict`, so it does not depend on the value of "favoriteFood", but rather _whether "favoriteFood" has a specific value, "pizza"_. + +You should use `equals` in preference to `get` whenever possible, because it will often be radically faster. For example, suppose there is a table with 1000 rows, that there is a ReactiveDict with a key named "selection" that indicates the currently selected row, and that each row should receive the "selectedRow" CSS class if it is selected. If `equals` is used to determine if a row should get the CSS class, then when "selection" changes, only two rows have to be checked for CSS class updates, the previously selected row and the newly selected row. If `get` is used, then all 1000 rows will have to be checked for CSS class updates. + +### Collection.find() versus Collection.cursor.fetch() + +In Meteor, a Collection is used for storing multiple records or "documents" that are all of a similar type. For example, a User Collection might contain a record for every user of an application. + +`Collection.find()` returns a cursor, which represents a query to a Collection in the abstract — it doesn't return any actual documents. Calling `cursor.fetch()`, on the other hand, returns the documents matched by the query. In addition, when `cursor.fetch()` is called from inside an autorun, it creates dependencies for all the documents matched by the call to `find()`. Inside an autorun, just using `Collection.find()` doesn't set up any reactive dependencies. + +For example, calling `Posts.find()` will return a cursor that _represents_ a query for all the posts in an application, while calling `Posts.find({tag: "kittens"})` will give you a cursor representing a query for all posts about kittens. To get all of the posts about kittens, you can call `Posts.find({tag: "kittens"}).fetch()`. + + Just made up the term "property selector" to differentiate from "field selector" (or "field specifier" in the docs); open to suggestion + +In order to enable _fine-grained reactivity_, you can pass _selectors_ into `find()` to narrow the scope of the query. There are two main types of selectors, _property selectors_ and _field selectors_. _Property selectors_ (in the format `{property: constraint}` are used to fetch documents whose `property` property satisfies some constraint. For example, the `{tag: "meteor"}` selector, when passed into `Posts.find`, returns only the Posts that have been tagged with "meteor". Alternatively, a selector `{tag: {$in: ["meteor", "node", "javascript"]}}` would return posts tagged with "meteor", "node", or "javascript". + + // VERSION 1 (INEFFICIENT) + Tracker.autorun(function(){ + var allPosts = Posts.find().fetch(); + for (var post in allPosts) { + if (post.tag === "kittens") console.log(post.title); + } + }); + + // VERSION 2 (MORE EFFICIENT) + Tracker.autorun(function(){ + var postsAboutKittens = Posts.find({tag:"kittens"}).fetch(); + postsAboutKittens.forEach(function (post) { + console.log(post.title); + }); + }); + +The code above shows the advantage of using a _property selector_. Both autoruns print out the titles of all posts tagged "kittens". However, the "inefficient" version reruns any time a Post (of any sort) is added or deleted, while the "efficient" version only reruns when a Post tagged with "kittens" is edited, added, or deleted. This is because the "inefficient" version calls`Posts.find().fetch()`, which makes the autorun depend on the values of all Posts, but the "efficient" version calls `Posts.find({tag:"kittens}).fetch()`, which only sets up dependencies on Posts tagged "kittens". + +In addition to _property selectors_, you can use a _field selector_ to reduce the number of fields in the documents returned by a query. Inside an autorun, using a field selector reduces the number of fields that can cause the autorun to rerun. + + Tracker.autorun(function(){ + var postAuthors = Posts.find({}, {fields: {tag: 0, author: 1, title: 0).fetch(); + postAuthors.forEach(function (post) { + console.log(post.author); + }); + }); + + Calling `Posts.find({}, {fields: {author: 1,title: 0}}).fetch()` (where the fields selector is `{author: 1,title: 0}`) returns a list of all the authors of Posts. The autorun will rerun whenever the author of any Post changes, but not if the author decides to change the title of the Post. + +### Collection.cursor.count() + + `cursor.count()` returns the _number_ of documents matched by a cursor, as opposed to `fetch()`, `forEach()`, or `map()`, which return the documents themselves. Likewise, when called from inside an autorun, `cursor.count()` sets up a dependency specifically on the number of documents matched by the cursor. This means that if `cursor.count()` is called from within an autorun, the autorun only reruns when the number of documents matched by the cursor changes. + + // VERSION 1: INEFFICIENT + Tracker.autorun(function(){ + console.log(Posts.find({tags:"kittens"}).fetch().length); + }); + + // VERSION 2: EFFICIENT + Tracker.autorun(function(){ + console.log(Posts.find({tags:"kittens"}).count()); + }); + +Both of the autoruns above print out the number of posts about kittens. However, the "inefficient" autorun will rerun any time a post about kittens is added, removed, _or edited_. The second autorun only reruns when the number of posts about kittens changes, which means that it won't rerun if a post is merely edited, but does rerun if a post is added or removed. + +### Guidelines for Fine-Grained and Coarse-Grained Reactivity + +Here are some general guidelines for using fine-grained reactivity. + +* When fine-grained reactivity is as easy as coarse-grained reactivity, prefer fine-grained. In other words, don't go out of your way to fetch data that you don't need. +* If your app is slow, profile it. If you discover that an expensive function is being called far too often because it depends on data it doesn't actually use, switch to finer-grained functions. +* When designing an API for a library, try to make fine-grained reactivity the default, but don't compromise ease of use to accomplish this. If you can't make fine-grained reactivity the default, consider providing a fine-grained API for users that need more performance. +* When writing a library, a good approach is to match the level of reactivity to what your library can efficiently compute. For example, the `equals` method on `ReactiveDict` is valuable precisely because `ReactiveDict` can compute it more efficiently than the application could, by separately tracking the autoruns that depend on each possible value of each variable. It only takes `ReactiveDict` O(1) time to determine which `equals` callers should be notified when the value of a key changes, but if you tried to implement `equals` yourself on top of the `get` function on `ReactiveDict`, it would take O(n) time. + +## Creating Reactive Values + +It the heart of `Tracker` is the notion of a **reactive value** – a value that changes from time to time, that can be read by calling a getter function, and that will trigger any affected autoruns to be rerun whenever it changes. + +A reactive value could represent: + +* The currently selected item in a table in a user interface +* The result of a database query (changing whenever the underlying information in the database changes) +* In a web browser, the current size of the browser window, or (in a browser that supports the HTML5 pushState API) the current URL +* A string such as "5 minutes ago" or "last Tuesday" that gives the difference between a particular time and the current time + +`Tracker` makes it easy to create new types of reactive values. This work is usually done by library authors that want to built reactivity support into their libraries, or by application authors that need a particular, custom kind of reactive value that isn't provided by any existing library. + +This section shows two easy ways to create a reactive value: by using the `ReactiveDict` library to do the work for you, and by doing the work yourself using the `Tracker.Dependency` object. As an advanced topic, it also shows a not-so-easy way to create a reactive value, by bypassing the `Tracker.Dependency` object and using the underlying `Tracker.Computation` API, and it shows how `Tracker.Dependency` is just a convenient wrapper around that lower-level API. + +Finally, it covers a couple of topics mostly of interest to library implementors: examples to illustrate the many-to-many relationship between `Tracker.Dependency` and `Tracker.Computation`; and an example that shows how one might use Tracker to take a "wait and see" approach to recurring behaviors such as subscriptions. + +### Creating a Reactive Value Using the ReactiveDict Library + +An incredibly simple way to create a reactive value is to use the `ReactiveDict` library. Since `ReactiveDict` implements a reactive dictionary, making a reactive value is as simple as creating a `ReactiveDict` and using its `get()` and `set()` methods. + + var data = new ReactiveDict; + + var getFavoriteFood = function () { + return data.get("favoriteFood"); + }; + + var setFavoriteFood = function (newValue) { + data.set("favoriteFood", newValue); + }; + +This simple approach is often all that's needed to create a quick reactive value for an application. One limitation is that at present, values in a `ReactiveDict` may not be objects or arrays, only strings, numbers, booleans, Dates, null, and undefined. + +`ReactiveDict` is not included in the main Tracker library. Rather, it's a small (~600 byte) utility library that you can use alongside Tracker. The command `meteor add reactive-dict` will add it to a Meteor app. + +### Some Examples of Custom Reactive Values Using ReactiveDict + +Here's a reactive value that gives the current time, with updates triggered every second: + + var data = new ReactiveDict; + + data.set("now", new Date); + setTimeout(function () { + data.set("now", new Date); + }, 1000); + + var currentTime = function () { + data.get("now"); + }; + +Here's a reactive value that gives the current size of the browser window: + + var data = new ReactiveDict; + + var updateWindowSize = function () { + data.set("width", window.innerWidth); + data.set("height", window.innerHeight); + }; + updateWindowSize(); + window.addEventListener("resize", updateWindowSize); + + var windowSize = function () { + return { + width: data.get("width"), + height: data.get("height") + }; + }; + +### Creating a Reactive Value Using Tracker.Dependency + +The other common way to create reactive values is to use the `Tracker.Dependency` helper object, which is included in the main Tracker library. + +To see how `Tracker.Dependency` is used, first suppose that we had a variable `favoriteFood` and getter and setter functions `getFavoriteFood` and `setFavoriteFood` that we could use to access it: + + var favoriteFood = "apples"; + + var getFavoriteFood = function () { + return favoriteFood; + }; + + var setFavoriteFood = function (newValue) { + favoriteFood = newValue; + }; + + `favoriteFood` can be made into a reactive variable by adding just four lines of code. + + var favoriteFood = "apples"; + var favoriteFoodDep = new Tracker.Dependency; // FIRST ADDED LINE + + var getFavoriteFood = function () { + favoriteFoodDep.depend(); // SECOND ADDED LINE + return favoriteFood; + }; + + var setFavoriteFood = function (newValue) { + if (newValue !== favoriteFood) // THIRD ADDED LINE + favoriteFoodDep.changed(); // FOURTH ADDED LINE + favoriteFood = newValue; + }; + +The first added line creates a new `Tracker.Dependency` object called `favoriteFoodDep` that will store the list of autoruns that care about the current value of `favoriteFood`. + +In the second added line, whenever the value of `favoriteFood` is read, the current autorun (if any) is added to `favoriteFoodDep`. This is done by calling the `depend()` function on `favoriteFoodDep`. This will do nothing if `getFavoriteFood()` is not being called from inside an autorun. + +Finally, in the third and fourth added lines, whenever the value of `favoriteFood` changes, all of the autoruns that were recorded in `favoriteFoodDep` are told to rerun themselves by calling `changed()` on `favoriteFoodDep`. For efficiency, but also to avoid change loops, `changed()` is called only if the new value is different from the old value. + +(It's important to use `changed()` only if the value of `favoriteFood` has actually changed — not if it only could potentially have changed! See "Avoiding Change Loops" in **Section 8. The Flush Cycle**.) + +This is all that you need to know to use `Tracker.Dependency`: create a new `Tracker.Dependency` for each distinct reactive value that you are maintaining, call `depend()` whenever you read that reactive value, and call `changed()` whenever that reactive value changes. + +### The `Tracker.Computation` Object + +The `Tracker.Dependency` is actually just a convenient helper object, provided for your convenience. It is built on top of the fundamental Tracker object, `Tracker.Computation`. + +A `Tracker.Computation` object is created every time `Tracker.autorun` is called. It represents that particular instance of an autorun, and it has a method `stop()` that terminates and cleans up the autorun. + +Computations also have two other methods: + +* `invalidate()`: Cause this autorun to rerun itself. +* `onInvalidate(callback)`: Cause `callback` to be called the next time this autorun reruns itself, or when it is stopped. + +They also have three attributes, `stopped`, `invalidated`, and `firstRun`, whose meanings are easy to guess (and are fully specified in the documentation). + +Code can look at the global variable `Tracker.currentComputation` to see if it is running from inside an autorun. Outside an autorun, `Tracker.currentComputation` is null; inside an autorun, it is the `Tracker.Computation` object that represents the autorun. When code uses`Tracker.Computation` inside nested autoruns, that `Tracker.Computation` object represents the code's "parent" autorun, or the smallest autorun that completely contains the code. + +A `Tracker.Dependency` is simply a container for storing a set of `Tracker.Computation` objects. `depend()` adds `Tracker.currentComputation`, if any, to the set. And `changed()` calls `invalidate()` on every computation in the set. + +A `Tracker.Dependency` also sets up an `onInvalidate` callback on every computation that it tracks. Whenever a computation is invalidated, the callback removes it from the set of computations being tracked by the `Tracker.Dependency`. Computations are invalidated by a call to `changed()` on a `Tracker.Dependency`, by a call to `changed()` on some _other_ `Tracker.Dependency` that is used by the same computation, or by a call to `stop()` on an autorun. + +Sound simple? It is! `Tracker.Dependency` is something that you could have implemented yourself on top of the `Tracker.Computation` API. Here's how you might do it: + + Dependency = function () { + this._nextId = 0; + this._dependents = {}; + }; + + Dependency.prototype.depend = function () { + var self = this; + if (Tracker.currentComputation) { + var id = self._nextId++; + self._dependents[id] = Tracker.currentComputation; + Tracker.currentComputation.onInvalidate(function () { + delete self._dependents[id]; + }); + } + }; + + Dependency.prototype.changed = function () { + for (var id in this._dependents) { + this._dependents[id].invalidate(); + } + }; + +A `Dependency` is just a set of `Tracker.Computation` objects, stored in `_dependents`. For easy removal of computations from the set, `_dependents`is structured as an object, with unique integers as keys and computations as values. + +`depend()` does nothing if there is no `currentComputation`. If there is a `currentComputation`, `depend()` assigns a unique `id` (`_nextId++`) to it, adds it to the set of computations in `_dependentsById` , and sets up an `onInvalidate` callback to remove it prior to rerunning the autorun. (If the autorun still depends on this reactive variable when it is rerun, in the course of rerunning it will end up calling `depend()` to re-add itself.) The `onInvalidate` callback also removes the computation from `_dependentsById` if the autorun is stopped. + +`changed()` simply calls `invalidate()` on all of the `_dependentsById`. It doesn't need to remove the `_dependentsById` from the set because this will happen through the `onInvalidate` callbacks that we've already set up. + +The code above is not exactly the same as the official implementation of `Tracker.Dependency`. The real implementation is a few lines longer. These extra lines make sure that a given computation is stored only once in `_dependentsById`, no matter how many times `depend()` is called, and allow a computation other that `currentComputation` to be passed to `depend()`. They also provide a function `hasDependents()` that tests to see if `_dependentsById` is empty. + +### Creating a Reactive Value the Hard Way + +In rare cases it's useful to bypass the convenience of `Tracker.Dependency` and use the `Tracker.Computation` object directly. Here's an example. This function returns a string like "17 minutes ago" giving the difference between a time in the past and the current time. + + var minutesAgo = function (timeInPast) { + var now = new Date; + var millisecondsAgo = now.getTime() - timeInPast.getTime(); + var minutesAgo = Math.floor(millisecondsAgo / 1000 / 60); + + if (Tracker.active) { + // Save the computation to invalidate when the time changes. + // (If we just called Tracker.currentComputation inside the setTimeout callback, + // we would get the wrong result! We would get the *then-current* computation, + // if any, not the computation that called minutesAgo.) + var computation = Tracker.currentComputation; + + var timer = setTimeout(function () { + computation.invalidate(); + }, 60 * 1000 /* one minute */); + computation.onInvalidate(function () { + clearTimeout(timer); + }); + } + + if (minutesAgo < 1) { + return "just now"; + } else { + return minutesAgo + " minutes ago"; + } + }; + +If this function is called from inside an autorun, it arranges for the autorun to be rerun in exactly one minute. If the autorun is stopped, the `onInvalidate` handler cleans up the timer so as to avoid wasting memory. + +To further understand how the timer is managed with `onInvalidate`, suppose we have an autorun that depends on both a call to `minutesAgo` and some other reactive value. + + var startTime = new Date; + var data = new ReactiveDict; + data.set("favoriteFood", "peaches"); + + var logger = Tracker.autorun(function () { + console.log("The app started " + minutesAgo(startTime) + " and my favorite " + + "food is " + data.get("favoriteFood") + "."); + }); + // Prints "The app started just now and my favorite food is peaches." + // 60 seconds later: "The app started 1 minutes ago and my favorite food is peaches." + +When the value of "favoriteFood" changes, the `minutesAgo` timer will be canceled and reset to one minute. The change to "favoriteFood" will cause the autorun to be invalidated (canceling the existing timer) and rerun (creating a new one). + +### The Many-to-Many Relationship Between Computations and Dependencies + +To fully understand Tracker, it is critical to understand why the following code is wrong: + + // WRONG + Dependency = function () { + this._nextId = 0; + this._dependents = {}; + }; + + Dependency.prototype.depend = function () { + if (Tracker.currentComputation) { + var id = self._nextId++; + this._dependents[id] = Tracker.currentComputation; + } + }; + + Dependency.prototype.changed = function () { + for (var id in this._dependents) { + this._dependents[id].invalidate(); + } + this._dependents = {}; + }; + // WRONG + +Compare this code to the implementation of `Dependency` in the earlier section, *The `Tracker.Computation` Object*. Instead of using the computation's `onInvalidate` callback to clean up the `_dependents` list, it's done from `changed`. This is wrong. + +An easy way to see that it's wrong is that if an autorun is stopped, its `Tracker.Computation` object will not be removed from the `_dependents` list. This results in wasted memory. For a reactive value that never happens to change (that is, for which `changed()` is never called), this is a permanent memory leak. + +But something more fundamental is wrong with this code. There is a many-to-many relationship between Computations and Dependencies. Just as one Dependency can be depended on by several Computations (which the code above gets right), one Computation can reference several Dependencies (which the code above neglects). A computation should be removed from the `_dependents` list _whenever that computation reruns_, no matter whether it was this _particular_ Dependency that changed and caused it to rerun, or _some other_ Dependency that the computation also used. Thus we have to clean up `_dependents` from an `onInvalidate` callback rather than from `changed`. + +Remember, when a Computation reruns, it will re-establish all of its Dependency relationships. Often this will mean that it tears down its dependencies and recreates exactly the same set every time, as in this code: + + var comp = Tracker.autorun(function () { + console.log(data.get("favoriteFood")); + }); + +Each time the autorun is invalidated, `comp` is removed from the dependent list for "favoriteFood", only to be immediately re-added as the autorun reruns. + +But that's only because the this autorun is very simple. In general, the dependencies could be different each time the autorun reruns: + + var comp = Tracker.autorun(function () { + if (data.get("favoriteFood") === "banana") + console.log(minutesAgo(someTime)); + else + console.log("you should really give bananas a chance"); + }); + +In this code, setting "favoriteFood" will ultimately cause `minutesAgo` to start or stop a timer depending on the favorite food chosen, and it's all intermediated through the `onInvalidate` callback. + +### Taking a "Wait and See" Approach + +This section shows a library that uses Tracker can improve performance by taking a "wait and see" approach with regard to recurring behaviors. Consider the example below, which automatically subscribes a user to a particular magazine based on their current interests. Users interested in either fashion or fitness are subscribed to _Cosmo_, while users that prefer gossip or celebrities are subscribed to _People_. + + var data = ReactiveDict; + data.set("currentInterest", "fashion"); + + Tracker.autorun(function () { + var currentInterest = data.get("currentInterest"); + if (currentInterest === "fashion" || currentInterest === "fitness") + subscribeToMagazine("Cosmo"); + if (currentInterest === "celebrities" || currentInterest === "gossip") + subscribeToMagazine("People"); + }); + // "Putting a check in the mail to subscribe to Cosmo" + + data.set("currentInterest", "gossip"); + // "Putting a check in the mail to subscribe to People" + // "Canceling our subscription to Cosmo" + + data.set("currentInterest", "celebrities"); + // Nothing printed (People subscription is maintained, not canceled and restarted) + +If a user that's interested in fashion decides they like celebrities instead, they are unsubscribed from _Cosmo_ and auto-subscribed to _People_. But when that user's interest changes again from "fashion" to "gossip", they stay subscribed to _People_. The _People_ subscription is maintained _without having to tear down and re-create the original subscription_. + +This is what we mean by a "wait and see" approach. When a user's `currentInterest` changes, their subscription isn't deleted immediately. The subscription is maintained until the autorun is rerun; if the user still needs to be subscribed to the same magazine, then the old subscription is reused. In other words, `subscribeToMagazine` _waits to see_ whether the user's subscription has truly changed. If it has, a new subscription is created and the old one is deleted; otherwise, the old subscription is maintained. + +Below is an implementation of the `subscribeToMagazine` function that takes a "wait and see" approach to subscriptions. `subscribeToMagazine` uses the global variable `subscriptions` to track subscriptions; each key-value pair in `subscriptions` represents a different magazine subscription. Each key is a magazine's name, and each value contains object with a `stop()` handle for stopping the subscription. + + var subscriptions = {}; // keys are names of magazines + var subscribeToMagazine = function (magazineName) { + if (! _.has(subscriptions, magazineName)) { + // We're not currently subscribed to this magazine. Go start a subscription. + console.log("Putting a check in the mail to subscribe to", magazineName); + subscriptions[magazineName] = { + references: 1, + stop: function () { + // Wait for all autoruns to finish rerunning before processing the unsubscription + // request. It's possible that stop() was called because an autorun is rerunning, + // so before doing anything drastic, we should wait to see if the autorun + // recreates the subscription when it is rerun. + this.references--; + Tracker.afterFlush(function () { + if (this.references === 0) { + // Nope, either the autorun did not recreate the subscription, or there + // were multiple calls to subscribeToMagazine() in the first place and not all + // of them have been stopped. Go ahead and cancel. + console.log("Canceling our subscription to", magazineName); + delete subscriptions[magazineName]; + } + }); + } + }; + }) else { + // We already have a subscription to this magazine running. Increment the reference + // count to stop it from going away. + subscriptions[magazineName].references++; + } + + if (Tracker.active) { + Tracker.onInvalidate(function (c) { + // subscribeToMagazine was called from inside an autorun, and the autorun is + // about to rerun itself. Tentatively plan to cancel the subscription. If the + // autorun resubscribes to that same magazine when it is rerun, the logic in + // in stop() is smart enough to leave the subscription alone rather than + // canceling and immediately recreating it. + // + // (Tracker.onInvalidate is a shortcut for Tracker.currentComputation.onInvalidate.) + if (_.has(subscriptions, magazineName)) { + subscriptions[magazineName].stop(); + } + }); + } + + return subscriptions[magazineName]; + }; + + + +Suppose that the user's `currentInterest` is "fashion", meaning that they should be automatically subscribed to _Cosmo_. The autorun runs, calling `subscribeToMagazine()` with a `magazineName` of "Cosmo". `subscribeToMagazine()` checks the list of subscriptions to see if there is already a new subscription for _Cosmo_. There isn't, so it adds a new subscription to `subscriptions`. + +In addition, `subscribeToMagazine()` sets up an `onInvalidate` callback that will run whenever a reactive value (such as `currentInterest`) inside the enclosing autorun changes, but before the autorun is scheduled to be rerun. Changing `currentInterest` from "fashion" to "fitness" triggers the `onInvalidate`callback, which calls the`stop()` method on all current subscriptions. Using `stop()` doesn't automatically delete the subscriptions, though, because `stop()` _waits to see_ whether the user will be re-subscribed to the same magazines after the autorun is rerun. + +`stop()` uses the `reference` property on a subscription to figure out whether or not the subscription should actually be stopped. Whenever a new subscription to a magazine is created, the `reference` property is set to 1. When `stop()` runs, it decrements `references` but doesn't delete the subscription just yet. Then, when the autorun gets rerun, `subscribeToMagazine` can reuse the previously created subscription instead of having to build one from scratch. If the user's interests change to "fitness" from "fashion" (meaning they should stay subscribed to Cosmo), `subscribeToMagazine` finds the previously created _Cosmo_ subscription and reinstates it by incrementing `references` back to 1. + +But how do we actually stop a subscription? We can do so by setting up an `afterFlush()` callback in `stop()` to clean up any unnecessary subscriptions. If the user's `currentInterest` changes to "celebrities", the`reference` property of the _Cosmo_ subscription is set to 0 by the `stop()` method. Then, the autorun reruns, calling `subscribeToMagazine`, which creates a subscription to _People_ with a `reference` property of 1. Once the flush cycle is over (after all autoruns are rerun), the afterFlush() callback goes ahead and deletes any subscriptions that have a `reference` property of 0. After the autorun is rerun, a new _People_ subscription is in the list but the _Cosmo_ subscription is gone. + +## The Flush Cycle + +When – precisely – do autoruns rerun? In other words, when do changes to reactive values actually take effect? In this code: + + var data = new ReactiveDict; + data.set("favoriteFood", "chicken"); + + Tracker.autorun(function () { + console.log(data.get("favoriteFood")); + }); + + console.log("start update"); + data.set("favoriteFood", "waffles"); + data.set("favoriteFood", "pie"); + console.log("finish update"); + +will "waffles" and "pie" be printed before the word "finish", or after the word "finish"? + +The answer is that, by default, all changes to reactive values are batched up and put into effect all at once, when all JavaScript code has finished executing and the system is idle. (For example, in a web browser, this might be after the browser has finished handling the current event.) This process of doing a batch of reactive updates is called _flushing_, and it's also possible to manually trigger it by calling `Tracker.flush()`. + +So the example code above will print: + + chicken + start update + finish update + waffles + pie + +But if the example is changed by adding a call to `Tracker.flush()`: + + var data = new ReactiveDict; + data.set("favoriteFood", "chicken"); + + Tracker.autorun(function () { + console.log(data.get("favoriteFood")); + }); + + console.log("start update"); + data.set("favoriteFood", "waffles"); + data.set("favoriteFood", "pie"); + Tracker.flush(); // ADDED LINE + console.log("finish update"); + +Then it will print: + + chicken + start update + waffles + pie + finish update + +### The Reason for the Flush Cycle + +Why have flushing? Why not do updates immediately, whenever any data changes? + +#### Predictability +The most important reason is _predictability_. Updates don't happen while your code is running, so you don't have to worry about data structures or the DOM changing out from under you. On the other hand, if you do want to see the results of your changes, you can call `Tracker.flush()` to trigger an update and it won't return until everything is fully updated. + +Here's an example. Let's say that in response to a click event, an application reads data out of a form in a popup window, and uses that data to make a write to the database. Then it reads a second value from the form, and makes a second write to the database. Because reactive updates are deferred until after your code has finished executing, you can be certain that the first write to the database won't cause a reactive update that closes the popup. No updates happen until flush time, so the DOM is completely locked down and stable while your code is running. + +On the other hand, suppose that in response to a click event, an application sets a reactive value that causes a popup window to open, and then from the same event handler it wants to use jQuery to find a particular DOM element in the popup window and focus it. In this case, after setting the reactive value that opens the popup, the application can simply call `Tracker.flush()`. When flush returns, all updates will have completed, meaning that the popup window will have been rendered and put into the DOM, guaranteeing that it can be found and manipulated with jQuery. + +So _not flushing_ guarantees that nothing will change out from under you, while _flushing_ guarantees that all updates have completed. No matter which kind of predictabliity you want, Tracker can provide it. + +#### Consistency +A second reason is _consistency_. Flushing moves the system from one consistent state to another. If several variables are being changed, the update won't happen until all of the variables have their new values. + +Take this example, which tracks the bank balances of two users, Alice and Bob. + + var balances = new ReactiveDict; + balances.set("alice", "2"); + balances.set("bob", "1"); + + Tracker.autorun(function() { + console.log("Alice:", balances.get("alice"), "Bob:", balances.get("bob"), + "Total:", balances.get("alice") + balances.get("bob")); + }); + // "Alice: 2 Bob: 1 Total: 3" + +Here's a function that transfers money from Alice to Bob. The autorun doesn't trigger until all of the balances have been updated and a consistent snapshot can be read. We never do an update with an inconsistent state where the balances in the accounts don't add up to 3. + + var transferMoney = function (amount) { + bank.set("alice", bank.get("alice") - amount); + bank.set("bob", bank.get("bob") + amount); + }; + + transferMoney(1); + // "Alice: 1 Bob: 2 Total: 3" + +If we didn't want this consistency, and really wanted the updates to happen immediately, we could manually flush after each change. + + bank.set("alice", bank.get("alice") + 1); + Tracker.flush(); + // "Alice: 2 Bob: 2 Total: 4" + bank.set("bob", bank.get("bob") - 1); + Tracker.flush(); + + // "Alice: 2 Bob: 1 Total: 3" + +Because a flush was manually performed before all of the account balances had been updated, we see the inconsistent state where the account balances momentarily add up to 4 instead of 3. + +#### Performance +Finally, batching up the updates is simply more efficient. For example, we may want to re-render portions of a `
` depending on various reactive values. If several of the values change at once, then the screen should be updated just once, with the full set of new values. We wouldn't want to update the DOM over and and over again, once for each value that had changed. That would slow down the app and could potentially also cause flicker in the user interface. + +### Hooking Into the Flush Cycle + +You can use `Tracker.afterFlush()` to run a callback function once at the completion of the next flush cycle (after all the autoruns have been re-run). + + var data = new ReactiveDict; + data.set("favoriteFood", "cake"); + + Tracker.autorun(function () { + console.log("My favorite food is " + data.get("favoriteFood") + "!"); + }); + + var setUnpopularFood = function (what) { + data.set("favoriteFood", what); + Tracker.afterFlush(function () { + console.log("Sounds gross to you, but from where I'm from it's considered a delicacy!"); + }); + }; + +In this example, when `setUnpopularFood` is used – presumably to change the favorite food to something dubious – a message is printed defending the choice. + + set("favoriteFood", "candy"); + // "My favorite food is candy!" + setUnpopularFood("lizards"); + // "My favorite food is lizards!" + // "Sounds gross to you, but from where I'm from it's considered a delicacy!" + set("favoriteFood", "ice cream"); + // "My favorite food is ice cream!" + +`Tracker.afterFlush` is one-shot. It runs the provided function once, at the end of the next flush cycle. It won't run again unless another call to `Tracker.afterFlush` is made. That's why the `afterFlush` handler doesn't run when "favoriteFood" is set to ice cream. + +### How the Flush Cycle Works + +Every autorun (represented by a `Tracker.Computation` object) has a flag, `invalidated`, that indicates whether it needs to be rerun. When a reactive value changes, this flag is set to true on all affected `Computation`s, meaning that they need to be rerun during the next flush. When a flush is triggered, either by a call to `Tracker.flush()` or by the system being idle, all of the invalidated `Computation`s are rerun and their `invalidated` flag is cleared. Finally, at the end of the flush, any `afterFlush` handlers are run. + +The following guarantees are made: + +* When `Tracker.flush()` returns, everything will have been fully updated. Every autorun affected by a change will have finished rerunning. The autoruns are not guaranteed to be rerun in any particular order. This guarantee applies even if reactive values are changed during the flush cycle. +* When `Tracker.flush()` returns, any `afterFlush` handlers will have been run, even if they were not registered until after flushing started. +`afterFlush` handlers will not be called until there are no more autoruns that need to be rerun. +`afterFlush` handlers will run in the order they were registered. + +These guarantees apply even if reactive values change during the flush cycle, or if additional afterFlush handlers are registered during the flush cycle. Some implications of this: + +* At times, rerunning an autorun may change a reactive value. When that happens, the autoruns that depend on that reactive value are rerun as part of the same flush cycle. +* **You can't call `flush()` from inside an autorun**, or else you'll get stuck in an infinite loop. `flush()` only returns when all of the autoruns have returned, but the autorun can't return until `flush()` returns! +* If an `afterFlush` callback changes a reactive value, all of the autoruns that depend on that reactive value get rerun before any of the other `afterFlush` callbacks are executed. +* If an `afterFlush` handler registers an `afterFlush` handler, it will be run as part of the current flush cycle. + +Here's an example that illustrates some of these guarantees . If the balance of the checking account goes below zero, an "insufficient funds" message will be printed and check writing will be disabled. However, there is an autorun that provides overdraft protection, transferring $25 from savings to checking whenever the checking account is empty. + + var bank = new ReactiveDict; + bank.set("checking", 10); + bank.set("savings", 50); + bank.set("checkWritingAllowed", true); + + Tracker.autorun(function () { + console.log("There is $" + bank.get("checking") + " in your checking account."); + + Tracker.afterFlush(function () { + // Since this is inside afterFlush, it only runs after every autorun affected + // by the most recent update has finished rerunning. So the overdraft protection + // code below will run before this check happens. + if (bank.get("checking") < 0) { + console.log("Insufficient funds! No more checks for you!"); + bank.set("checkWritingAllowed", false); + } + }); + }); + + Tracker.autorun(function () { + if (bank.get("checking") < 0 && + bank.get("savings") >= 25) { + bank.set("checking", bank.get("checking") + 25); + bank.set("savings", bank.get("savings") - 25); + console.log("Automatically transferred $25 from savings to checking."); + } + }); + + Tracker.autorun(function () { + if (bank.get("checkWritingAllowed")) + console.log("Go ahead, write some checks!"); + else + console.log("Your check writing privileges have been suspended!"); + }); + + var writeACheck = function (amount) { + if (bank.get("checkWritingAllowed")) + bank.set("checking", bank.get("checking") - amount); + }; + + // "There is $10 in your checking account." + // "Go ahead, write some checks!" + writeACheck(5); + // "There is $5 in your checking account." + writeACheck(20); + // "There is $-15 in your checking account." + // "Automatically transferred $25 from savings to checking." + // "There is $10 in your checking account." + writeACheck(30); + // "There is $-20 in your checking account." + // "Automatically transferred $25 from savings to checking." + // "There is $5 in your checking account." + writeACheck(15); + // "There is $-10 in your checking account." + // "Insufficient funds! No more checks for you!" + // "Your check writing privileges have been suspended!" + +Because `Tracker.afterFlush` is used to do the insufficient funds check after all autoruns have finished running, the insufficient funds message will only be printed if the overdraft protection wasn't able to make the checking account balance positive again. (Because the call to `Tracker.afterFlush` is inside an autorun, the insufficient funds check happens every time the checking account balance changes, not just once.) + +When the insufficient funds check fails, the "checkWritingAllowed" variable is set from inside the `Tracker.afterFlush` handler. This causes one more autorun to rerun before the flush cycle is complete, even though `Tracker.afterFlush` handlers had started to run. + +### Avoiding Change Loops +Just as carelessly written recursive code can recurse forever, carelessly written reactive code can get `Tracker.flush` stuck in an infinite loop. This is easy to avoid by following two simple rules. + +#### Rule #1: Don't Call Tracker.changed() Unless Something Has Actually Changed +If you are creating your own new type of reactive value, don't call `changed()` unless your reactive value has actually changed! (ReactiveDict and all of the standard reactive data sources handle this automatically for you.) + + // WRONG + var firstVar = 0; + var firstDep = new Tracker.Dependency(); + var secondVar = 0; + var secondDep = new Tracker.Dependency(); + + var setFirstVar = function(newValue) { + firstVar = newValue; + firstDep.changed(); + }; + + var setSecondVar = function(newValue) { + secondVar = newValue; + secondDep.changed(); + }; + + Tracker.autorun(function () { + secondDep.depend(); + firstVar = secondVar; + firstDep.changed(); + }); + + Tracker.autorun(function () { + firstDep.depend(); + secondVar = firstVar; + secondDep.changed(); + }); + +In the example above, the first autorun sets `firstVar` to `secondVar` without checking to see if the two are different. If `secondVar` changes, the first autorun is rerun during flush, updating `firstVar`. This sets off the second autorun, which similarly sets `secondVar` to `firstVar` without confirming that they are different. Because `secondVar` was changed, the first autorun runs again, resulting in an infinite loop. + +This is easily fixed with two more lines of code: + + // RIGHT + var firstVar = 0; + var firstDep = new Tracker.Dependency(); + var secondVar = 0; + var secondDep = new Tracker.Dependency(); + + var setFirstVar = function(newValue) { + firstVar = newValue; + firstDep.changed(); + }; + + var setSecondVar = function(newValue) { + secondVar = newValue; + secondDep.changed(); + }; + + var handle1 = Tracker.autorun(function () { + secondDep.depend(); + if (firstVar !== secondVar) { // ADDED LINE + firstVar = secondVar; + firstDep.changed(); + } + }); + + var handle2 = Tracker.autorun(function () { + firstDep.depend(); + if (secondVar !== firstVar) { // ADDED LINE + secondVar = firstVar; + secondDep.changed(); + } + }); + +In the example above, `firstVar` is only changed if it's different from `secondVar`, and vice versa. When `secondVar` changes, and `firstVar` is different from `secondVar`, the first autorun will set `firstVar` to be equal to `secondVar`. The change to `firstVar` sets off the second autorun, but this time it doesn't change the value of `secondVar` because it's equivalent to `firstVar`. + +#### Rule #2: Don't Create Any Circular References +Beware of _circular references_ — situations where a reactive value (directly or indirectly) refers back to itself, resulting in a contradiction. + + var scores = new ReactiveDict; + + Tracker.autorun(function () { + scores.set("a", scores.get("b") + 1); + }); + + Tracker.autorun(function () { + scores.set("b", scores.get("a") + 1); + }); + + Tracker.flush(); + +In this example, there are no possible values for "a" and "b" that will satisfy both autoruns! "a" wants to be higher than "b", but "b" wants to be higher than "a"! There's no way that both of these can be true simultaneously, so the system will never rest. + +The first autorun uses "b" to set the value of "a"; therefore, it updates "a" whenever the value of "b" changes. When "a" changes, though, the second autorun reruns, changing the value of "b" based on "a". This forces the first autorun to rerun, creating an infinite loop. `Tracker.flush()` will never return because the flush will never complete. + +`Tracker.flush` guarantees that, when it returns, all recomputed reactive values are consistent with one another. But there is no way to assign consistent values to "a" and "b" that satisfy both autoruns, so `Tracker.flush` can never return. + +You can avoid this problem by avoiding circular references. If "a" depends on "b", don't have "b" depend on "a". From 441d35dc38154672ae575b689a236d6864addf67 Mon Sep 17 00:00:00 2001 From: Sander van den Akker Date: Sun, 5 Oct 2014 21:25:50 +0900 Subject: [PATCH 231/283] Added missing underscore package dependency. --- packages/url/package.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/url/package.js b/packages/url/package.js index 2f015cf221..c5a4759d09 100644 --- a/packages/url/package.js +++ b/packages/url/package.js @@ -5,6 +5,7 @@ Package.describe({ Package.onUse(function(api) { api.export('URL'); + api.use('underscore', ['client', 'server']); api.addFiles('url_common.js', ['client', 'server']); api.addFiles('url_client.js', 'client'); api.addFiles('url_server.js', 'server'); From 51a23fc346191267baf9f57620720ada72d64088 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 13 Oct 2014 16:24:43 -0700 Subject: [PATCH 232/283] Another pass on LaunchScreens --- examples/todos/.meteor/versions | 1 + examples/todos/client/launchScreenConf.js | 4 -- examples/todos/lib/router.js | 14 ++++--- .../.gitignore | 0 .../README.md | 36 +++++++---------- .../launch-screen/mobile-launch-screen.js | 36 +++++++++++++++++ .../package.js | 6 +-- packages/meteor-platform/package.js | 9 ++++- .../mobile-launch-screen.js | 40 ------------------- tools/commands-cordova.js | 2 +- 10 files changed, 72 insertions(+), 76 deletions(-) delete mode 100644 examples/todos/client/launchScreenConf.js rename packages/{mobile-launch-screen => launch-screen}/.gitignore (100%) rename packages/{mobile-launch-screen => launch-screen}/README.md (52%) create mode 100644 packages/launch-screen/mobile-launch-screen.js rename packages/{mobile-launch-screen => launch-screen}/package.js (59%) delete mode 100644 packages/mobile-launch-screen/mobile-launch-screen.js diff --git a/examples/todos/.meteor/versions b/examples/todos/.meteor/versions index 1f4e78365a..c64ef0a6d7 100644 --- a/examples/todos/.meteor/versions +++ b/examples/todos/.meteor/versions @@ -29,6 +29,7 @@ iron:layout@0.4.1 iron:router@0.9.4 jquery@1.0.1 json@1.0.1 +launch-screen@1.0.0 less@1.0.10 livedata@1.0.11 localstorage@1.0.1 diff --git a/examples/todos/client/launchScreenConf.js b/examples/todos/client/launchScreenConf.js deleted file mode 100644 index d5d86ba396..0000000000 --- a/examples/todos/client/launchScreenConf.js +++ /dev/null @@ -1,4 +0,0 @@ -if (Meteor.isCordova) { - LaunchScreen.controlManually = true; -} - diff --git a/examples/todos/lib/router.js b/examples/todos/lib/router.js index 512b09da35..7a93ed1c77 100644 --- a/examples/todos/lib/router.js +++ b/examples/todos/lib/router.js @@ -18,27 +18,29 @@ Router.configure({ } }); +if (Meteor.isClient) + LaunchScreen.hold(); + Router.map(function() { this.route('join'); this.route('signin'); this.route('listsShow', { path: '/lists/:_id', - // subscribe to todos before the page is rendered but don't wait on the + // subscribe to todos before the page is rendered but don't wait on the // subscription, we'll just render the items as they arrive - onBeforeAction: function() { + onBeforeAction: function () { this.todosHandle = Meteor.subscribe('todos', this.params._id); }, - data: function() { + data: function () { return Lists.findOne(this.params._id); }, action: function () { this.render(); - if (Meteor.isCordova) - LaunchScreen.hide(); + LaunchScreen.release(); } }); - + this.route('home', { path: '/', action: function() { diff --git a/packages/mobile-launch-screen/.gitignore b/packages/launch-screen/.gitignore similarity index 100% rename from packages/mobile-launch-screen/.gitignore rename to packages/launch-screen/.gitignore diff --git a/packages/mobile-launch-screen/README.md b/packages/launch-screen/README.md similarity index 52% rename from packages/mobile-launch-screen/README.md rename to packages/launch-screen/README.md index aef57bc7e0..45fb281fa8 100644 --- a/packages/mobile-launch-screen/README.md +++ b/packages/launch-screen/README.md @@ -15,33 +15,27 @@ experience don't hold the launch screen for too long. ``` When this package is added, the app will hold the launch screen until the -`body` template or `__IronDefaultLayout__` template (in case you use IronRouter) -is fully loaded on the screen. +`body` template is fully loaded on the screen or, in case you use the IronRouter +package, unless first route is rendered. You can also control it manually if you want to wait on other UI elements to be loaded before releasing the launch screen and showing the user the actual app. +###Manually adding more actions to await before releasing the launch screen -###Manually specifying the template +To tell the package that there is another action you want to be awaited on +startup, declare it by holding the screen in the top-level code once per action +and the release it when the action is completed. + +The example awaiting for a template to be rendered is shown below. ```javascript -// release the launch screen the first time appMainSection is rendered -LaunchScreen.startingTemplate = 'appMainSection'; +// declare that there is a new block to hold +if (Meteor.isClient) + LaunchScreen.hold(); + +Template.myUI.rendered = function () { + LaunchScreen.release(); +}; ``` -###Manually release the launch screen - -```javascript -LaunchScreen.controlManually = true; - -// ... later ... -LaunchScreen.hide(); -``` - -###Show launch screen back - -```javascript -LaunchScreen.show(); -``` - - diff --git a/packages/launch-screen/mobile-launch-screen.js b/packages/launch-screen/mobile-launch-screen.js new file mode 100644 index 0000000000..95d188f987 --- /dev/null +++ b/packages/launch-screen/mobile-launch-screen.js @@ -0,0 +1,36 @@ +var Template = Package.templating && Package.templating.Template; + +var holdCount = 1; +LaunchScreen = { + hold: function () { + holdCount++; + if (holdCount === 1 && navigator.splashscreen) + navigator.splashscreen.show(); + }, + release: function () { + holdCount--; + if (! holdCount && navigator.splashscreen) + navigator.splashscreen.hide(); + } +}; + +// on startup it should be clear what templates are there +Meteor.startup(function () { + if (! Template) return; + LaunchScreen.hold(); + + if (Package['iron:router']) { + Package['iron:router'].Router.onAfterAction(_.once(function () { + LaunchScreen.release(); + })); + } else { + Template.body.rendered = function () { + LaunchScreen.release(); + }; + } +}); + +Meteor.startup(function () { + LaunchScreen.release(); +}); + diff --git a/packages/mobile-launch-screen/package.js b/packages/launch-screen/package.js similarity index 59% rename from packages/mobile-launch-screen/package.js rename to packages/launch-screen/package.js index fb93af76b4..adbcafc7d4 100644 --- a/packages/mobile-launch-screen/package.js +++ b/packages/launch-screen/package.js @@ -1,5 +1,5 @@ Package.describe({ - name: 'mobile-launch-screen', + name: 'launch-screen', summary: 'More control over launch screen on mobile.', version: '1.0.0' }); @@ -9,8 +9,8 @@ Cordova.depends({ }); Package.onUse(function(api) { - api.addFiles('mobile-launch-screen.js', 'web.cordova'); - api.use(['blaze', 'templating'], 'web.cordova', { weak: true }); + api.addFiles('mobile-launch-screen.js', 'web'); + api.use(['blaze', 'templating', 'iron:router'], 'web', { weak: true }); api.export('LaunchScreen'); }); diff --git a/packages/meteor-platform/package.js b/packages/meteor-platform/package.js index 501aa46738..9bc23c4f4f 100644 --- a/packages/meteor-platform/package.js +++ b/packages/meteor-platform/package.js @@ -58,12 +58,19 @@ Package.on_use(function(api) { 'autoupdate' ], ['client', 'server']); - api.use([ + // More mobile specific implies + api.imply([ // Remove the 300ms click delay on mobile 'fastclick', // Good defaults for the mobile status bar 'mobile-status-bar' ], 'web.cordova'); + + api.imply([ + // Launch screen configuration. Currently only on mobile but we include the + // no-op browser version anyway. + 'launch-screen' + ], 'web'); }); Cordova.depends({ diff --git a/packages/mobile-launch-screen/mobile-launch-screen.js b/packages/mobile-launch-screen/mobile-launch-screen.js deleted file mode 100644 index fc06fa0106..0000000000 --- a/packages/mobile-launch-screen/mobile-launch-screen.js +++ /dev/null @@ -1,40 +0,0 @@ -var Template = Package.templating && Package.templating.Template; - -LaunchScreen = { - hide: function () { - if (navigator.splashscreen) - navigator.splashscreen.hide(); - }, - show: function () { - if (navigator.splashscreen) - navigator.splashscreen.show(); - }, - startingTemplate: 'body', - controlManually: false -}; - -var hideLoadScreenOnTemplateRendered = function (name) { - if (! Template) return; - - // in case some other package registered a rendered callback - var oldRendered = Template.body.rendered; - - // XXX will break if some other package or the user-code overrides w/o - // calling this callback later; - Template[name].rendered = function () { - // Hide the load screen after the body template is fully rendered. - LaunchScreen.hide(); - oldRendered && oldRendered(); - }; -}; - -// on startup it should be clear what templates are there -Meteor.startup(function () { - if (! Template) return; - if (Template['__IronDefaultLayout__']) - LaunchScreen.startingTemplate = '__IronDefaultLayout__'; - - if (! LaunchScreen.controlManually) - hideLoadScreenOnTemplateRendered(LaunchScreen.startingTemplate); -}); - diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index c3af98ead1..bddd9d47a9 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1283,7 +1283,7 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { 'DisallowOverscroll': true }; - if (project.dependencies['mobile-launch-screen']) { + if (project.dependencies['launch-screen']) { additionalConfiguration.AutoHideSplashScreen = false; } From 8f3966fbf4207cab9f46e470e3103502a9cce453 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 13 Oct 2014 17:36:21 -0700 Subject: [PATCH 233/283] Format deploy console messages to include protocol --- tools/deploy.js | 4 ++-- tools/test-utils.js | 2 +- tools/tests/deploy-auth.js | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/deploy.js b/tools/deploy.js index b84035c8e3..6164849031 100644 --- a/tools/deploy.js +++ b/tools/deploy.js @@ -386,7 +386,7 @@ var bundleAndDeploy = function (options) { var buildDir = path.join(options.appDir, '.meteor', 'local', 'build_tar'); var bundlePath = path.join(buildDir, 'bundle'); - Console.stdout.write('Deploying to ' + site + '. Bundling...\n'); + Console.stdout.write('Deploying to http://' + site + '. Bundling...\n'); var settings = null; var messages = buildmessage.capture({ @@ -452,7 +452,7 @@ var bundleAndDeploy = function (options) { var deployedAt = require('url').parse(result.payload.url); var hostname = deployedAt.hostname; - Console.stdout.write('Now serving at ' + hostname + '\n'); + Console.stdout.write('Now serving at http://' + hostname + '\n'); files.rm_recursive(buildDir); if (! hostname.match(/meteor\.com$/)) { diff --git a/tools/test-utils.js b/tools/test-utils.js index ca54046f30..aa9f73175f 100644 --- a/tools/test-utils.js +++ b/tools/test-utils.js @@ -113,7 +113,7 @@ exports.createAndDeployApp = function (sandbox, options) { } var run = sandbox.run.apply(sandbox, runArgs); run.waitSecs(90); - run.match('Now serving at ' + name); + run.match('Now serving at http://' + name); run.waitSecs(10); run.expectExit(0); return name; diff --git a/tools/tests/deploy-auth.js b/tools/tests/deploy-auth.js index c3f7144e50..0be845a260 100644 --- a/tools/tests/deploy-auth.js +++ b/tools/tests/deploy-auth.js @@ -111,7 +111,7 @@ selftest.define('deploy - logged in', ['net', 'slow'], function () { // deploy to the legacy app. var run = sandbox.run('deploy', noPasswordLegacyApp); run.waitSecs(90); - run.match('Now serving at ' + noPasswordLegacyApp); + run.match('Now serving at http://' + noPasswordLegacyApp); run.expectExit(0); // And we should have claimed the app by deploying to it. run = sandbox.run('claim', noPasswordLegacyApp); @@ -141,7 +141,7 @@ selftest.define('deploy - logged in', ['net', 'slow'], function () { run.expectExit(0); run = sandbox.run('deploy', passwordLegacyApp); run.waitSecs(90); - run.match('Now serving at ' + passwordLegacyApp); + run.match('Now serving at http://' + passwordLegacyApp); run.expectExit(0); // Clean up testUtils.cleanUpApp(sandbox, passwordLegacyApp); @@ -193,7 +193,7 @@ selftest.define('deploy - logged out', ['net', 'slow'], function () { run.matchErr('Password:'); run.write('testtest\n'); run.waitSecs(90); - run.match('Now serving at ' + appName); + run.match('Now serving at http://' + appName); run.expectExit(0); testUtils.cleanUpApp(s, appName); From 504574876e2b171e4a6f26cfece91790cffc6600 Mon Sep 17 00:00:00 2001 From: Denis Gorbachev Date: Tue, 7 Oct 2014 11:42:25 +0200 Subject: [PATCH 234/283] Fix directory lists My wife was confused by the previous wording of which directories are loaded where. Explicitly stating the directory lists should remove the confusion. --- docs/client/concepts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/concepts.html b/docs/client/concepts.html index 71dab6c299..83d527509f 100644 --- a/docs/client/concepts.html +++ b/docs/client/concepts.html @@ -89,7 +89,7 @@ server code but not served to the client, like private data files. There are more assets to consider on the client side. Meteor gathers all JavaScript files in your tree, with the exception of -the `server`, `public`, and `private` subdirectories, for the +the `server`, `tests`, `public`, and `private` subdirectories, for the client. It minifies this bundle and serves it to each new client. You're free to use a single JavaScript file for your entire application, or create a nested tree of separate files, or anything in between. @@ -100,7 +100,7 @@ executed without being wrapped in a new variable scope. This means that each top-level `var` defines a global variable. In addition, these files are executed before other client-side JavaScript files. -Files outside the `client`, `server` and `tests` subdirectories are loaded on +Files outside the `client`, `server`, `tests`, `public` and `private` subdirectories are loaded on both the client and the server! That's the place for model definitions and other functions. Meteor provides the variables [`isClient`](#meteor_isclient) and [`isServer`](#meteor_isserver) so that your code can alter its behavior depending From 3c98e47709a2ba8b15f2829bc4027168d998e003 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 17:43:22 -0700 Subject: [PATCH 235/283] fix tracker readme formatting typo --- packages/tracker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tracker/README.md b/packages/tracker/README.md index 852c541d3a..4b02e84d19 100644 --- a/packages/tracker/README.md +++ b/packages/tracker/README.md @@ -354,7 +354,7 @@ When "score" changes, the autorun is updated and new messages are printed. Chang // "DEBUG: current game umpire is Hippo" // "The game score is now 137!" -# Fine-Grained Reactivity +## Fine-Grained Reactivity When using reactive APIs, it is best to ask only for the data that your app actually needs. For example, if your app stores `Person` objects, and needs only the given and family name of a particular `Person`, it should retrieve only those fields and not other fields, like mailing address or date of birth, that aren't needed. @@ -371,7 +371,7 @@ Fine-grained reactivity can improve performance, but it's also important to not Here are some examples of fine-grained reactivity in common Meteor APIs. -ReactiveDict:`get` versus `equals` +### ReactiveDict:`get` versus `equals` What's the difference between these two ways of writing an autorun? From 3ec522f9e4f4f9a49b7cb1ce7612cbe20a8f0a5e Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 13 Oct 2014 17:48:37 -0700 Subject: [PATCH 236/283] Additional configs for Android's splash screens Who knows why it doesn't just work when you add the cordova plugin. --- tools/commands-cordova.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index bddd9d47a9..dbc565e52a 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1285,6 +1285,8 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { if (project.dependencies['launch-screen']) { additionalConfiguration.AutoHideSplashScreen = false; + additionalConfiguration.SplashScreen = 'screen'; + additionalConfiguration.SplashScreenDelay = 10000; } var imagePaths = { From 98f5445f37c10b6747f485e9d491b2ccfa9d510e Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 13 Oct 2014 17:50:13 -0700 Subject: [PATCH 237/283] Remove the underscore dep from launch screen package --- packages/launch-screen/mobile-launch-screen.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/launch-screen/mobile-launch-screen.js b/packages/launch-screen/mobile-launch-screen.js index 95d188f987..f7fe1e18ed 100644 --- a/packages/launch-screen/mobile-launch-screen.js +++ b/packages/launch-screen/mobile-launch-screen.js @@ -20,9 +20,13 @@ Meteor.startup(function () { LaunchScreen.hold(); if (Package['iron:router']) { - Package['iron:router'].Router.onAfterAction(_.once(function () { - LaunchScreen.release(); - })); + var released = false; + Package['iron:router'].Router.onAfterAction(function () { + if (! released) { + released = true; + LaunchScreen.release(); + } + }); } else { Template.body.rendered = function () { LaunchScreen.release(); From bd9dcf9643d69243de5aad7e0a184583e391db70 Mon Sep 17 00:00:00 2001 From: Rahul Date: Mon, 13 Oct 2014 13:44:33 +0200 Subject: [PATCH 238/283] Fix the typeof check Encountered this bug when I tried to update an app that was generating Blaze warnings about the deprecated old-style helper to a 0.9.4 RC. The problem is that the type of the string `'Log'` is being checked rather than the value of the `Log` variable, which obviously returns true, and then the code breaks on the `&& Log` check, which is undefined. --- packages/blaze/preamble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/blaze/preamble.js b/packages/blaze/preamble.js index 8229c20f3a..74e565ef93 100644 --- a/packages/blaze/preamble.js +++ b/packages/blaze/preamble.js @@ -22,7 +22,7 @@ Blaze._escape = (function() { Blaze._warn = function (msg) { msg = 'Warning: ' + msg; - if ((typeof 'Log' !== 'undefined') && Log && Log.warn) + if ((typeof Log !== 'undefined') && Log && Log.warn) Log.warn(msg); // use Meteor's "logging" package else if ((typeof 'console' !== 'undefined') && console.log) console.log(msg); From 619faab29f419170f15d82a72a9e7501c69d079a Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Mon, 13 Oct 2014 18:04:14 -0700 Subject: [PATCH 239/283] fix another typeof --- packages/blaze/preamble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/blaze/preamble.js b/packages/blaze/preamble.js index 74e565ef93..1928c72359 100644 --- a/packages/blaze/preamble.js +++ b/packages/blaze/preamble.js @@ -24,6 +24,6 @@ Blaze._warn = function (msg) { if ((typeof Log !== 'undefined') && Log && Log.warn) Log.warn(msg); // use Meteor's "logging" package - else if ((typeof 'console' !== 'undefined') && console.log) + else if ((typeof console !== 'undefined') && console.log) console.log(msg); }; From 5661a590f297347cb2612ebe8bb92f4113b0f5dd Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 18:36:54 -0700 Subject: [PATCH 240/283] Move spiderable docs from docs.meteor.com to readme --- docs/client/docs.js | 1 - docs/client/packages.html | 1 - .../spiderable/README.md | 28 ++++--------------- 3 files changed, 6 insertions(+), 24 deletions(-) rename docs/client/packages/spiderable.html => packages/spiderable/README.md (75%) diff --git a/docs/client/docs.js b/docs/client/docs.js index f366555b8f..0ebca03df4 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -423,7 +423,6 @@ var toc = [ "less", "oauth-encryption", "random", - "spiderable", "stylus", "showdown", "underscore", diff --git a/docs/client/packages.html b/docs/client/packages.html index d79071ccf1..61d539f994 100644 --- a/docs/client/packages.html +++ b/docs/client/packages.html @@ -29,7 +29,6 @@ Meteor Development Group maintains the following packages: {{> pkg_less}} {{> pkg_oauth_encryption}} {{> pkg_random}} -{{> pkg_spiderable}} {{> pkg_stylus}} {{> pkg_showdown}} {{> pkg_underscore}} diff --git a/docs/client/packages/spiderable.html b/packages/spiderable/README.md similarity index 75% rename from docs/client/packages/spiderable.html rename to packages/spiderable/README.md index d3adbd6339..7d68b80ebc 100644 --- a/docs/client/packages/spiderable.html +++ b/packages/spiderable/README.md @@ -1,23 +1,16 @@ - From b90d87e56a95c6c5608d236bc31dbf6681a914df Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 20:05:40 -0700 Subject: [PATCH 241/283] Readmes for reactive-dict, reactive-var, session --- packages/reactive-dict/README.md | 26 ++++++++++++++++++++++++++ packages/reactive-var/README.md | 11 +++++++++++ packages/session/README.md | 16 ++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 packages/reactive-dict/README.md create mode 100644 packages/reactive-var/README.md create mode 100644 packages/session/README.md diff --git a/packages/reactive-dict/README.md b/packages/reactive-dict/README.md new file mode 100644 index 0000000000..014424ac9e --- /dev/null +++ b/packages/reactive-dict/README.md @@ -0,0 +1,26 @@ +# reactive-dict + +This package provide `ReactiveDict`, a general-purpose reactive +datatype for use with +[tracker](https://atmospherejs.com/meteor/tracker). It provides all of +the functionality of the `Session` object documented in the [main +Meteor docs](https://docs.meteor.com/#session), such as reactive +`get`, `set`, and `equals` functions, except that its contents are not +saved across Hot Code Push client code updates. + +Example usage: +``` +> var dict = new ReactiveDict; +> dict.set("weather", "cloudy"); +> Tracker.autorun(function () { console.log("now " + dict.get("weather")); }); +now cloudy +> dict.set("weather", "sunny"); +now sunny +``` + +For more information, see the [Tracker project +page](https://www.meteor.com/tracker). + +## Future work + +Unify with [reactive-var](https://atmospherejs.com/meteor/reactive-var). diff --git a/packages/reactive-var/README.md b/packages/reactive-var/README.md new file mode 100644 index 0000000000..9dff989b35 --- /dev/null +++ b/packages/reactive-var/README.md @@ -0,0 +1,11 @@ +# reactive-var + +This package provide `ReactiveVar`, a general-purpose reactive +datatype for use with +[tracker](https://atmospherejs.com/meteor/tracker). `ReactiveVar` is +documented on the [main +Meteor docs page](https://docs.meteor.com/#reactivevar_pkg). + +## Future work + +Unify with [reactive-dict](https://atmospherejs.com/meteor/reactive-dict). diff --git a/packages/session/README.md b/packages/session/README.md new file mode 100644 index 0000000000..bce9fd577b --- /dev/null +++ b/packages/session/README.md @@ -0,0 +1,16 @@ +# session + +This package provide `Session`. `Session` is a special +[`ReactiveDict`] (https://atmospherejs.com/meteor/reactive-dict) whose +contents are preserved across Hot Code Push. It's usually used to +store the current state of the user interface, for example, the +currently selected row in a table, ora flag indicating if a dialog box +is open. + +Full documentation of `Session` can be found on the [main Meteor docs +page](https://docs.meteor.com/#session). + +## Future work + +Unify with [reactive-dict](https://atmospherejs.com/meteor/reactive-dict). +2 \ No newline at end of file From 8fc4e3cfeb3090ae99ff2317760b00e0724407bd Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 20:08:44 -0700 Subject: [PATCH 242/283] session readme fixes --- packages/session/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/session/README.md b/packages/session/README.md index bce9fd577b..bf7b9a0a2e 100644 --- a/packages/session/README.md +++ b/packages/session/README.md @@ -1,7 +1,7 @@ # session This package provide `Session`. `Session` is a special -[`ReactiveDict`] (https://atmospherejs.com/meteor/reactive-dict) whose +[ReactiveDict] (https://atmospherejs.com/meteor/reactive-dict) whose contents are preserved across Hot Code Push. It's usually used to store the current state of the user interface, for example, the currently selected row in a table, ora flag indicating if a dialog box @@ -13,4 +13,3 @@ page](https://docs.meteor.com/#session). ## Future work Unify with [reactive-dict](https://atmospherejs.com/meteor/reactive-dict). -2 \ No newline at end of file From 4b7312b5560ef531ee933b22d3efacea70f50f9f Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 20:09:30 -0700 Subject: [PATCH 243/283] session readme fixes take 2 --- packages/session/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/session/README.md b/packages/session/README.md index bf7b9a0a2e..481555ad58 100644 --- a/packages/session/README.md +++ b/packages/session/README.md @@ -1,7 +1,7 @@ # session This package provide `Session`. `Session` is a special -[ReactiveDict] (https://atmospherejs.com/meteor/reactive-dict) whose +[`ReactiveDict`](https://atmospherejs.com/meteor/reactive-dict) whose contents are preserved across Hot Code Push. It's usually used to store the current state of the user interface, for example, the currently selected row in a table, ora flag indicating if a dialog box From a0fe7cb0b9e9beccfafc46d0b015724415d6b30c Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 20:10:36 -0700 Subject: [PATCH 244/283] one more try to make session readme look its best on atmosphere --- packages/session/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/session/README.md b/packages/session/README.md index 481555ad58..f7c1911e9d 100644 --- a/packages/session/README.md +++ b/packages/session/README.md @@ -1,7 +1,7 @@ # session This package provide `Session`. `Session` is a special -[`ReactiveDict`](https://atmospherejs.com/meteor/reactive-dict) whose +[ReactiveDict](https://atmospherejs.com/meteor/reactive-dict) whose contents are preserved across Hot Code Push. It's usually used to store the current state of the user interface, for example, the currently selected row in a table, ora flag indicating if a dialog box From cdbc57c0cef10ac83f3827012c25e047b763bb0d Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 20:21:23 -0700 Subject: [PATCH 245/283] Move appcache docs from docs.meteor.com to package readme --- docs/client/docs.js | 1 - docs/client/packages.html | 2 +- .../appcache/README.md | 18 +++++++----------- 3 files changed, 8 insertions(+), 13 deletions(-) rename docs/client/packages/appcache.html => packages/appcache/README.md (88%) diff --git a/docs/client/docs.js b/docs/client/docs.js index 0ebca03df4..31df7d4d25 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -413,7 +413,6 @@ var toc = [ "Packages", [ [ "accounts-ui", - "appcache", "audit-argument-checks", "browser-policy", "coffeescript", diff --git a/docs/client/packages.html b/docs/client/packages.html index 61d539f994..90740a762b 100644 --- a/docs/client/packages.html +++ b/docs/client/packages.html @@ -19,7 +19,6 @@ and removed with: Meteor Development Group maintains the following packages: {{> pkg_accounts_ui}} -{{> pkg_appcache}} {{> pkg_audit_argument_checks}} {{> pkg_browser_policy}} {{> pkg_coffeescript}} @@ -29,6 +28,7 @@ Meteor Development Group maintains the following packages: {{> pkg_less}} {{> pkg_oauth_encryption}} {{> pkg_random}} +{{> pkg_spiderable}} {{> pkg_stylus}} {{> pkg_showdown}} {{> pkg_underscore}} diff --git a/docs/client/packages/appcache.html b/packages/appcache/README.md similarity index 88% rename from docs/client/packages/appcache.html rename to packages/appcache/README.md index 58c0696662..63124ded13 100644 --- a/docs/client/packages/appcache.html +++ b/packages/appcache/README.md @@ -1,12 +1,11 @@ - From 25205a2f61c102a2e11ab486dc034b8471efe176 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 21:23:07 -0700 Subject: [PATCH 246/283] short readmes for autoupdate, reload, webapp, webapp-hashing --- packages/autoupdate/README.md | 12 ++++++++++++ packages/reload/README.md | 14 ++++++++++++++ packages/webapp-hashing/README.md | 7 +++++++ packages/webapp/README.md | 8 ++++++++ 4 files changed, 41 insertions(+) create mode 100644 packages/autoupdate/README.md create mode 100644 packages/reload/README.md create mode 100644 packages/webapp-hashing/README.md create mode 100644 packages/webapp/README.md diff --git a/packages/autoupdate/README.md b/packages/autoupdate/README.md new file mode 100644 index 0000000000..b1c634a92a --- /dev/null +++ b/packages/autoupdate/README.md @@ -0,0 +1,12 @@ +# autoupdate + +This package is the heart of Meteor's Hot Code Push functionality. It +has a client component and a server component component. The client +component uses a DDP API provided by the server to subscribe to the +version ID of the most recent build of the app's client. When it sees +that a new version is available, it uses the +[reload](https://atmospherejs.com/meteor/reload) package to gracefully +save the app's state and reload it in place. + +`autoupdate` is part of the [Webapp](https://www.meteor.com/webapp) +project. diff --git a/packages/reload/README.md b/packages/reload/README.md new file mode 100644 index 0000000000..c8d6e6f4f6 --- /dev/null +++ b/packages/reload/README.md @@ -0,0 +1,14 @@ +# reload + +The `reload` package handles the process of *migrating* an app: +serializing the app's state, then shutting down and restarting the app +(for example, to load updated client code or to move the client +session from one JavaScript virtual machine to another), and finally +restoring its state. + +Packages that want to participate in the migration process register +with `reload`. They can make the migration process wait until they are +ready and include whatever state they may possess in the serialization +and deserialization process. + +`reload` is part of the [Webapp](https://www.meteor.com/webapp) project. diff --git a/packages/webapp-hashing/README.md b/packages/webapp-hashing/README.md new file mode 100644 index 0000000000..377be035c2 --- /dev/null +++ b/packages/webapp-hashing/README.md @@ -0,0 +1,7 @@ +# webapp-hashing + +This package knows how to hash together all of the elements in a +client resource manifest to produce a build ID that can be used to +determine if a client has the latest code, or if it needs to be +updated. It is used internally by +[webapp](https://atmospherejs.com/meteor/webapp). diff --git a/packages/webapp/README.md b/packages/webapp/README.md new file mode 100644 index 0000000000..f21db1ccde --- /dev/null +++ b/packages/webapp/README.md @@ -0,0 +1,8 @@ +# webapp + +The `webapp` package contains the core functionality that makes a +Meteor project into a web application. It is a "value added HTTP +server" that includes not just a web server, but also advanced app +serving functionality like over-the-air mobile app updates and HTML5 +Appcache support. For more information, see the [Webapp project +page](https://www.meteor.com/webapp). From 34505c8356c8654a9d375569f754f7cd575385cd Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 13 Oct 2014 21:54:04 -0700 Subject: [PATCH 247/283] Move browser-policy docs from docs.meteor.com to the browser-policy readme. Also create placeholder readmes for the other browser-policy-* packages. --- docs/client/docs.js | 1 - docs/client/packages.html | 1 - packages/browser-policy-common/README.md | 7 + packages/browser-policy-content/README.md | 7 + packages/browser-policy-framing/README.md | 7 + .../browser-policy/README.md | 153 ++++++++++-------- 6 files changed, 106 insertions(+), 70 deletions(-) create mode 100644 packages/browser-policy-common/README.md create mode 100644 packages/browser-policy-content/README.md create mode 100644 packages/browser-policy-framing/README.md rename docs/client/packages/browser-policy.html => packages/browser-policy/README.md (62%) diff --git a/docs/client/docs.js b/docs/client/docs.js index 31df7d4d25..56904f66e4 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -414,7 +414,6 @@ var toc = [ "Packages", [ [ "accounts-ui", "audit-argument-checks", - "browser-policy", "coffeescript", "fastclick", "force-ssl", diff --git a/docs/client/packages.html b/docs/client/packages.html index 90740a762b..f6de38bfd1 100644 --- a/docs/client/packages.html +++ b/docs/client/packages.html @@ -20,7 +20,6 @@ Meteor Development Group maintains the following packages: {{> pkg_accounts_ui}} {{> pkg_audit_argument_checks}} -{{> pkg_browser_policy}} {{> pkg_coffeescript}} {{> pkg_fastclick}} {{> pkg_force_ssl}} diff --git a/packages/browser-policy-common/README.md b/packages/browser-policy-common/README.md new file mode 100644 index 0000000000..37f8a88562 --- /dev/null +++ b/packages/browser-policy-common/README.md @@ -0,0 +1,7 @@ +# browser-policy-common + +This is one of a family of packages that can be used to easily +configure an app's browser-side security policies. The documentation +is in the +[browser-policy](https://atmospherejs.com/meteor/browser-policy) +package. diff --git a/packages/browser-policy-content/README.md b/packages/browser-policy-content/README.md new file mode 100644 index 0000000000..864b2f283f --- /dev/null +++ b/packages/browser-policy-content/README.md @@ -0,0 +1,7 @@ +# browser-policy-content + +This is one of a family of packages that can be used to easily +configure an app's browser-side security policies. The documentation +is in the +[browser-policy](https://atmospherejs.com/meteor/browser-policy) +package. diff --git a/packages/browser-policy-framing/README.md b/packages/browser-policy-framing/README.md new file mode 100644 index 0000000000..bdf41b0189 --- /dev/null +++ b/packages/browser-policy-framing/README.md @@ -0,0 +1,7 @@ +# browser-policy-framing + +This is one of a family of packages that can be used to easily +configure an app's browser-side security policies. The documentation +is in the +[browser-policy](https://atmospherejs.com/meteor/browser-policy) +package. diff --git a/docs/client/packages/browser-policy.html b/packages/browser-policy/README.md similarity index 62% rename from docs/client/packages/browser-policy.html rename to packages/browser-policy/README.md index 94c90a4616..c94cd964eb 100644 --- a/docs/client/packages/browser-policy.html +++ b/packages/browser-policy/README.md @@ -1,10 +1,10 @@ -