diff --git a/docs/client/api.html b/docs/client/api.html index f6a9270538..f5c4ee4826 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 17358be291..64bc697bef 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.
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).
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.
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' }).
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.
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.
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.
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:
\ntoken: A password reset token that can be passed to\nAccounts.resetPassword.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.The function to call. It is given two arguments:
\ntoken: An email verification token that can be passed to\nAccounts.verifyEmail.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.The function to call. It is given two arguments:
\ntoken: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.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.Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
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.
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.
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.
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.
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.
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.
When true, stringifies keys in an object in sorted order.
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.
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.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
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 of the subscription. Matches the name of the server's publish() call.
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 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.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.
(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.
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.
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.
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
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
The handle returned by Meteor.setTimeout
A path to append to the root URL. Do not include a leading "/".
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"
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.
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.
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
Overrides transform on the Collection for this cursor. Pass null to disable transformation.
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.
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.Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.
Overrides transform on the Collection. Pass null to disable transformation.
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.Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.
Overrides transform on the Collection. Pass null to disable transformation.
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.
The method of generating the _id fields of new documents in this collection. Possible values:
'STRING': random strings'MONGO': random Mongo.ObjectID valuesThe default id generation technique is 'STRING'.
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.
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.
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.
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.
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.
\nValid key values:
\niphoneiphone_2xiphone_3xipadipad_2xandroid_ldpiandroid_mdpiandroid_hdpiandroid_xhdpiA dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.
\nFor Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.
\nValid key values:
\niphoneiphone_2xiphone5iphone6iphone6p_portraitiphone6p_landscapeipad_portraitipad_portrait_2xipad_landscapeipad_landscape_2xandroid_ldpi_portraitandroid_ldpi_landscapeandroid_mdpi_portraitandroid_mdpi_landscapeandroid_hdpi_portraitandroid_hdpi_landscapeandroid_xhdpi_portraitandroid_xhdpi_landscapeThe file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".
A function that takes one argument,\na CompileStep object.
\nDocumentation 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.
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.Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.
","name":"use"},{"type":{"names":["Array.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:
\nNpm.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:
\nCordova.depends({\n "org.apache.cordova.camera": "0.3.0"\n});Alternatively, with a GitHub URL:
\nCordova.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.
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.
A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.
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.
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.
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.
The template (e.g. Template.myTemplate) or View object to render.
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.
The return value from Blaze.render or Blaze.renderWithData.
The template (e.g. Template.myTemplate) or View object from which to generate HTML.
The template (e.g. Template.myTemplate) or View object from which to generate HTML.
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.
Optional. A name for Views constructed by this Template. See view.name.
A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.
Optional. A name for this type of View. See view.name.
A function that returns renderable content. In this function, this is bound to the View.
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.
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.
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
The value to check
","name":"value"},{"type":{"names":["MatchPattern"]},"description":"The pattern to match value against
The value that should be returned by userId on this connection.
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.
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.
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."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".
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.
Query string to go in the URL. Overwrites any query string in url.
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.
HTTP basic authentication string of the form "username:password"
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.
The URL to which the request should be sent.
","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"Options passed on to HTTP.call.
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.
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.
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.
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
The new value for key
The key to set, eg, selectedItem
The new value for key
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.
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.Packages being depended on.\nPackage names may be suffixed with an @version tag.
\nIn 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).
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.
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.
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 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.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.Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.
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.
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.
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.
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).
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.
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' }).
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.
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.
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.
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:
\ntoken: A password reset token that can be passed to\nAccounts.resetPassword.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.The function to call. It is given two arguments:
\ntoken: An email verification token that can be passed to\nAccounts.verifyEmail.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.The function to call. It is given two arguments:
\ntoken: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.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.Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
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.
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.
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.
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.
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.
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.
When true, stringifies keys in an object in sorted order.
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.
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.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
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.
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.
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 of the subscription. Matches the name of the server's publish() call.
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 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.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.
(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.
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.
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.
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
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
The handle returned by Meteor.setTimeout
A path to append to the root URL. Do not include a leading "/".
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"
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.
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.
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.
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
Overrides transform on the Collection for this cursor. Pass null to disable transformation.
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.
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.Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.
Overrides transform on the Collection. Pass null to disable transformation.
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.Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions.
Overrides transform on the Collection. Pass null to disable transformation.
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.
The method of generating the _id fields of new documents in this collection. Possible values:
'STRING': random strings'MONGO': random Mongo.ObjectID valuesThe default id generation technique is 'STRING'.
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.
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.
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.
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.
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.
\nValid key values:
\niphoneiphone_2xiphone_3xipadipad_2xandroid_ldpiandroid_mdpiandroid_hdpiandroid_xhdpiA dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.
\nFor Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.
\nValid key values:
\niphoneiphone_2xiphone5iphone6iphone6p_portraitiphone6p_landscapeipad_portraitipad_portrait_2xipad_landscapeipad_landscape_2xandroid_ldpi_portraitandroid_ldpi_landscapeandroid_mdpi_portraitandroid_mdpi_landscapeandroid_hdpi_portraitandroid_hdpi_landscapeandroid_xhdpi_portraitandroid_xhdpi_landscapeThe file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".
A function that takes one argument,\na CompileStep object.
\nDocumentation 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.
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.Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.
","name":"use"},{"type":{"names":["Array.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:
\nNpm.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:
\nCordova.depends({\n "org.apache.cordova.camera": "0.3.0"\n});Alternatively, with a GitHub URL:
\nCordova.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.
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.
A function to reactively re-run. If the result is falsy, contentFunc is shown, otherwise elseFunc is shown. An empty array is considered falsy.
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.
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.
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.
The template (e.g. Template.myTemplate) or View object to render.
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.
The return value from Blaze.render or Blaze.renderWithData.
The template (e.g. Template.myTemplate) or View object from which to generate HTML.
The template (e.g. Template.myTemplate) or View object from which to generate HTML.
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.
Optional. A name for Views constructed by this Template. See view.name.
A function that returns renderable content. This function is used as the renderFunction for Views constructed by this Template.
Optional. A name for this type of View. See view.name.
A function that returns renderable content. In this function, this is bound to the View.
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.
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.
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
The value to check
","name":"value"},{"type":{"names":["MatchPattern"]},"description":"The pattern to match value against
The value that should be returned by userId on this connection.
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.
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.
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."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".
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.
Query string to go in the URL. Overwrites any query string in url.
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.
HTTP basic authentication string of the form "username:password"
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.
The URL to which the request should be sent.
","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"Options passed on to HTTP.call.
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.
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.
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.
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
The new value for key
The key to set, eg, selectedItem
The new value for key
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.
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.Packages being depended on.\nPackage names may be suffixed with an @version tag.
\nIn 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).
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.
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.
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 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.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.Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.
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.
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.
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"}}; 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-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"]) { 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/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. 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..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-pre.11' + version: '1.0.34-rc.1' }); Package.includeTool(); 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", diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 62e8e27fc7..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-pre.3' + version: '1.1.2-rc.1' }); 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({ diff --git a/scripts/admin/bump-all-version-numbers.js b/scripts/admin/bump-all-version-numbers.js index c98d4b3e49..617e19cce7 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,8 @@ _.each(packageNames, function (name) { if (match) { var versionNumber = match[0]; var s = versionNumber.split("."); - s[3] = (parseInt(s[3], 10) + 1) + ""; + s[2] = s[2].split("-")[0] + "-rc.0"; + s = s.slice(0, 3); var incremented = s.join("."); content = content.replace(versionNumber, incremented); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 21f630fb7c..9df8c67d65 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.1", "recommended": false, "official": false, - "description": "A preview of Meteor 0.9.4." + "description": "An RC of Meteor 0.9.4." } diff --git a/tools/commands.js b/tools/commands.js index f94030aff9..eeea60d3e8 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1748,7 +1748,9 @@ main.registerCommand({ 'force-online': { type: Boolean }, slow: { type: Boolean }, browserstack: { type: Boolean }, - history: { type: Number } + history: { type: Number }, + list: { type: Boolean }, + file: { type: String } }, hidden: true }, function (options) { @@ -1765,29 +1767,59 @@ 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; + } + } + + if (options.list) { + selftest.listTests({ + onlyChanged: options.changed, + offline: offline, + includeSlowTests: options.slow, + testRegexp: testRegexp, + fileRegexp: fileRegexp + }); + + return 0; + } + var clients = { browserstack: options.browserstack }; return selftest.runTests({ + // filtering options onlyChanged: options.changed, offline: offline, includeSlowTests: options.slow, + testRegexp: testRegexp, + fileRegexp: fileRegexp, + // other options historyLines: options.history, - clients: clients, - testRegexp: testRegexp + clients: clients }); }); diff --git a/tools/help.txt b/tools/help.txt index aaaad79eb2..71c269341b 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -433,8 +433,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. @@ -442,6 +442,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 129544a44f..142ddece07 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"; @@ -379,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); } @@ -1329,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 = []; }; @@ -1390,10 +1391,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, @@ -1404,91 +1403,245 @@ 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 + slow: 'take quite a long time; use --slow to include', + // 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" + 'non-matching': "don't match specified pattern", + 'in other files': "" }; -// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp -// clients: -// - browserstack (need s3cmd credentials) -var runTests = function (options) { - var failureCount = 0; +// 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 || {}; - 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', '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.fileRegexp && ! options.fileRegexp.test(test.file)) { + 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]) { + 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.fileRegexp) { + tagsToSkip.push('in other files'); + } + 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); +}; + +// 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 also has code to save the hashes of files where all tests +// ran and passed (for the `--changed` option). If a testState is +// 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 + + 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]; + + // 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]++; + fileInfo.hasSkips = true; + return true; + } else { + return false; + } + }); + }); +}; + +// 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; +}; + +// 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; + 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); +}; + +// Return a string like "Skipped 1 foo test\nSkipped 5 bar tests\n" +TestList.prototype.generateSkipReport = function () { + var self = this; + var result = ''; + + _.each(self.skippedTags, function (tag) { + var count = self.skipCounts[tag]; + if (count) { + 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'); + } + }); + + 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 - 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; +// Same options as getFilteredTests. Writes to stdout and stderr. +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]; + _.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(' ') + ']' + : '')); }); - skipCounts.unchanged = lengthBeforeOnlyChanged - tests.length; + }); + + Console.stderr.write('\n'); + Console.stderr.write(testList.filteredTests.length + " tests listed."); + Console.stderr.write(testList.generateSkipReport()); +}; + +/////////////////////////////////////////////////////////////////////////////// +// Running tests +/////////////////////////////////////////////////////////////////////////////// + +// options: onlyChanged, offline, includeSlowTests, historyLines, testRegexp, +// fileRegexp, +// 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 failedTests = []; + _.each(testList.filteredTests, function (test) { totalRun++; - process.stderr.write(test.name + "... "); + Console.stderr.write(test.file + ": " + test.name + " ... "); var failure = null; try { @@ -1498,7 +1651,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 { @@ -1507,12 +1660,14 @@ var runTests = function (options) { } if (failure) { - process.stderr.write("fail!\n"); - failureCount++; + Console.stderr.write("fail!\n"); + failedTests.push(test); + 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') { } @@ -1521,28 +1676,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"); @@ -1551,51 +1706,37 @@ 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 totalSkipCount = 0; - _.each(skipCounts, function (count, tag) { - totalSkipCount += count; - if (count) { - 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) { + } else if (failedTests.length === 0) { var disclaimers = ''; - if (totalSkipCount > 0) + 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" + - (failureCount > 1 ? "s" : "") + ".\n"); + var failureCount = failedTests.length; + Console.stderr.write(failureCount + " failure" + + (failureCount > 1 ? "s" : "") + ":\n"); + _.each(failedTests, function (test) { + Console.stderr.write(" - " + test.file + ": " + test.name); + }); return 1; } }; @@ -1633,6 +1774,7 @@ var runTests = function (options) { _.extend(exports, { runTests: runTests, + listTests: listTests, markStack: markStack, define: define, Sandbox: Sandbox, 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); + }); }); });