From af71abfef156ba954d0d2cef84a0ec172eb5d94c Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:04:08 -0700 Subject: [PATCH 01/26] Don't show errors if we can fix something during install-sdk --- tools/commands-cordova.js | 44 ++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index e7094e4aa4..a3b6b286af 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1620,11 +1620,13 @@ _.extend(IOS.prototype, { if (self.hasXcode()) { log && Console.info(Console.success("Xcode is installed")); } else { - log && Console.info(Console.fail("Xcode is not installed")); - if (fix) { + log && Console.info("Installing Xcode"); + self.installXcode(); } else { + log && Console.info(Console.fail("Xcode is not installed")); + result.missing.push("xcode"); result.acceptable = false; } @@ -1642,11 +1644,15 @@ _.extend(IOS.prototype, { if (self.hasAgreedXcodeLicense()) { log && Console.info(Console.success("Xcode license agreed")); } else { - log && Console.info(Console.fail("You must accept the Xcode license")); - if (fix) { + log && Console.info("Please accept the Xcode license"); + self.launchXcode(); + + // XXX: Wait? } else { + log && Console.info(Console.fail("You must accept the Xcode license")); + result.missing.push("xcode-license"); result.acceptable = false; } @@ -2124,12 +2130,14 @@ _.extend(Android.prototype, { log && Console.info(Console.success("Found Android bundle")); hasAndroid = true; } else { - log && Console.info(Console.fail("Android bundle not found")); - if (fixConsole) { + log && Console.info("Installing Android bundle"); + self.installAndroidBundle(); hasAndroid = true; } else { + log && Console.info(Console.fail("Android bundle not found")); + result.missing.push("android-bundle"); result.acceptable = false; } @@ -2140,12 +2148,14 @@ _.extend(Android.prototype, { log && Console.info(Console.success("A JDK is installed")); hasJava = true; } else { - log && Console.info(Console.fail("A JDK is not installed")); - if (fix) { + log && Console.info("Installing JDK"); + self.installJdk(); hasJava = true; } else { + log && Console.info(Console.fail("A JDK is not installed")); + result.missing.push("jdk"); result.acceptable = false; } @@ -2154,12 +2164,11 @@ _.extend(Android.prototype, { // (hasAcceleration can also be undefined) var hasAcceleration = self.hasAcceleration(); if (hasAcceleration === false) { - log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); - - if (fix) { self.installAcceleration(); } else { + log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); + result.missing.push("haxm"); // Not all systems can install the accelerator, so don't block @@ -2175,12 +2184,12 @@ _.extend(Android.prototype, { if (self.hasTarget('19', 'default/x86')) { log && Console.info(Console.success("Found suitable Android x86 image")); } else { - log && Console.info(Console.fail("Suitable Android x86 image not found")); - if (fixSilent) { - Console.info("Installing Android x86 image"); + log && Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); } else { + log && Console.info(Console.fail("Suitable Android x86 image not found")); + result.missing.push("android-sys-img"); result.acceptable = false; } @@ -2190,13 +2199,14 @@ _.extend(Android.prototype, { if (self.hasAvd(avdName)) { log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) found")); } else { - log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); - if (fixSilent) { + log && Console.info("Creating android virtual device (AVD): " + avdName); + var avdOptions = {}; self.createAvd(avdName, avdOptions); - Console.info(Console.success("Created android virtual device (AVD): " + avdName)); } else { + log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); + result.missing.push("android-avd"); result.acceptable = false; } From 25d941690c20b7f1165d429c2b9166f5d46d1bae Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:06:00 -0700 Subject: [PATCH 02/26] Provide affirmation after successful install-sdk fixes --- tools/commands-cordova.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index a3b6b286af..3511472ed2 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2187,6 +2187,7 @@ _.extend(Android.prototype, { if (fixSilent) { log && Console.info("Installing Android x86 image"); self.installTarget('sys-img-x86-android-19'); + log && Console.info(Console.success("Installed Android x86 image")); } else { log && Console.info(Console.fail("Suitable Android x86 image not found")); @@ -2204,6 +2205,8 @@ _.extend(Android.prototype, { var avdOptions = {}; self.createAvd(avdName, avdOptions); + + log && Console.info(Console.success("'" + avdName + "' android virtual device (AVD) created")); } else { log && Console.info(Console.fail("'" + avdName + "' android virtual device (AVD) not found")); From 570644b58902ed9a6e5b8477692ed6564da5764a Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:07:07 -0700 Subject: [PATCH 03/26] Newline around URL to stop it wrapping in install-sdk --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 3511472ed2..5503a5c0de 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2443,7 +2443,7 @@ main.registerCommand({ url += "#" + anchor; } openUrl(url); - Console.info("Please follow the instructions here: " + Console.bold(url)); + Console.info("Please follow the instructions here:\n " + Console.bold(url) + "\n"); } else { Console.info("We don't have installation instructions for your platform") } From bb77c6e2102bc09fc618bd5801ebd7605dc3c54b Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:11:03 -0700 Subject: [PATCH 04/26] Add some help to install-sdk --- tools/help.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/help.txt b/tools/help.txt index 3b29bfcd02..aaaad79eb2 100644 --- a/tools/help.txt +++ b/tools/help.txt @@ -196,6 +196,17 @@ After adding a mobile platform, you can use 'meteor run ' to run on a mobile device or emulator. 'meteor build' will always build the project for every added platform. +>>> install-sdk +Installs SDKs for a platform. +Usage: meteor install-sdk + +Installs the SDK for a platform; will also verify that the platform +requirements are met. + +Available platforms: + android + ios (on OS X only) + >>> remove-platform Remove a platform from this project. Usage: meteor remove-platform [platform..] From d4fd64da6a02c494f2f60b36257f4aafd3cb425c Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:13:09 -0700 Subject: [PATCH 05/26] Split up the super-long android emulator acceleration message --- tools/commands-cordova.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 5503a5c0de..dc0fe14185 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2167,7 +2167,8 @@ _.extend(Android.prototype, { if (fix) { self.installAcceleration(); } else { - log && Console.info(Console.fail("Acceleration is not installed; the Android emulator will be very slow without it")); + log && Console.info(Console.fail("Android emulator acceleration is not installed")); + log && Console.info(" (The Android emulator will be very slow without acceleration)"); result.missing.push("haxm"); From 48e91ff9aa59850723fd620feeb64fecc4e27f88 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:39:10 -0700 Subject: [PATCH 06/26] Linux does not meet the iOS platform requirements --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index dc0fe14185..9aa07dc5e4 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1611,7 +1611,7 @@ _.extend(IOS.prototype, { if (!Host.isMac()) { log && Console.info("You are not running on OSX; we won't be able to install Xcode for local iOS development"); - return undefined; + return { acceptable: false, missing: [ "ios" ] }; } var result = { acceptable: true, missing: [] }; From c88fffbc6a03f15df850b6eb940b85c026b6e166 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 08:42:52 -0700 Subject: [PATCH 07/26] Special case the failure message for 'install-sdk ios' on Linux --- tools/commands-cordova.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 9aa07dc5e4..c4c87c5f61 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -2428,6 +2428,11 @@ main.registerCommand({ var installed = checkPlatformRequirements(platform, { log:true, fix: false, fixConsole: true, fixSilent: true } ); if (!installed.acceptable) { + if (Host.isLinux() && platform === "ios") { + Console.warn(Console.fail("iOS support cannot be installed on Linux")); + return 1; + } + Console.warn("Platform requirements not yet met"); var host = null; From 19f845fccc9b0013ca561150d896709cda5553fa Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 10:02:35 -0700 Subject: [PATCH 08/26] Hacky parsing of installation progress --- tools/commands-cordova.js | 24 ++++++++++++++++++++++-- tools/processes.js | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index c4c87c5f61..4891ad184b 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1763,16 +1763,34 @@ _.extend(Android.prototype, { var self = this; var androidBundlePath = self.getAndroidBundlePath(); - var androidToolPath = path.join(androidBundlePath, 'android-sdk', 'tools', 'android'); options = options || {}; options.env = _.extend({}, process.env, options.env || {}, { 'ANDROID_SDK_HOME': androidBundlePath }); + + if (options.progress) { + options.onStdout = function (data) { + // Output looks like: (20%, ... + var re = /\((.{1,3})%,/; + var match = re.exec(data); + if (match) { + var status = {current: parseInt(match[1]), end: 100}; + options.progress.reportProgress(status); + } + }; + } + var cmd = new processes.RunCommand(androidToolPath, args, options); if (options.detached) { return cmd.start(); } + var execution = cmd.run(); + + if (options.progress) { + options.progress.reportDone(); + } + if (execution.exitCode !== 0) { Console.warn("Unexpected exit code from android process: " + execution.exitCode); Console.warn("stdout: " + execution.stdout); @@ -1832,7 +1850,9 @@ _.extend(Android.prototype, { var self = this; buildmessage.enterJob({ title: 'Installing Android API library'}, function () { - var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], {stdin: 'y\n'}); + var options = {stdin: 'y\n'}; + options.progress = buildmessage.getCurrentProgressTracker(); + var out = self.runAndroidTool(['update', 'sdk', '-t', target, '--all', '-u'], options); }); }, diff --git a/tools/processes.js b/tools/processes.js index ff9955f83c..39aaba4a21 100644 --- a/tools/processes.js +++ b/tools/processes.js @@ -59,6 +59,9 @@ _.extend(RunCommand.prototype, { if (self.options.pipeOutput) { Console.stdout.write(data); } + if (self.options.onStdout) { + self.options.onStdout(data); + } }); self.process.stderr.on('data', function (data) { From f12fddb95d2f0e0a91a3d30e84cb343f582500ba Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 8 Oct 2014 10:10:53 -0700 Subject: [PATCH 09/26] reportDone -> reportProgressDone progress.reportProgressDone()? Interesting choice of function name, Justin... --- tools/commands-cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 4891ad184b..8fc8db6f22 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1788,7 +1788,7 @@ _.extend(Android.prototype, { var execution = cmd.run(); if (options.progress) { - options.progress.reportDone(); + options.progress.reportProgressDone(); } if (execution.exitCode !== 0) { From 32e192883e12a330becd97addbc45e5392cb8c8b Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 7 Oct 2014 19:25:57 -0700 Subject: [PATCH 10/26] Fixes to 'add cordova plugins' selftest. * Remove --settings option that is no longer supported. * Add --server option that is now required. Test still doesn't pass. --- tools/tests/cordova-plugins.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index f0a1654102..50eaa1a248 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -30,7 +30,7 @@ var localCordova = path.join(files.getCurrentToolsDir(), "tools", // // sand: a sandbox, that has the main app directory as its cwd. // plugins: an array of plugins in order. -var checkCordovaPlugins = function(sand, plugins) { +var checkCordovaPlugins = selftest.markStack(function(sand, plugins) { var lines = selftest.execFileSync(localCordova, ['plugins'], { cwd: path.join(sand.cwd, '.meteor', 'local', 'cordova-build'), @@ -53,7 +53,7 @@ var checkCordovaPlugins = function(sand, plugins) { i++; }); selftest.expectEqual(plugins.length, i); -}; +}); // Given a sandbox, that has the app as its cwd, read the cordova plugins // file and check that it contains exactly the plugins specified, in order. @@ -147,7 +147,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("run", "android"); run.matchErr("not added to the project"); - run.matchErr("meteor add-platform "); + run.match("meteor add-platform "); run = s.run("add-platform", "android"); run.match("Do you agree"); @@ -185,7 +185,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("list-platforms"); run.match("android"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(30); // This fails because the FB plugin does not compile without additional // configuration for android. @@ -199,7 +199,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run = s.run("remove", "contains-cordova-plugin"); run.match("removed"); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -209,7 +209,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("removed"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); @@ -219,7 +219,7 @@ selftest.define("add cordova plugins", ["slow"], function () { run.match("added"); run.expectExit(0); - run = s.run("build", "../a", "--settings", "settings.json"); + run = s.run("build", "../a", "--server", "localhost:3000"); run.waitSecs(60); run.expectExit(0); checkCordovaPlugins(s, ["org.apache.cordova.device"]); From 842e3a290a7d867d699abf3c595672e68eec34e1 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 10:59:41 -0700 Subject: [PATCH 11/26] Update 'add cordova plugins' test to reflect reality. If we fail to install one plugin, then we uninstall all plugins to avoid awakening the Cordova monsters. Previously, this test was passing because we were passing a `--settings` argument, which was allowing the facebookconnect plugin to install, but the build to fail to other, not-understood reasons. Now that we've removed `--settings`, the plugin fails to install, which means that all plugins get uninstalled. Test passes now. --- tools/tests/cordova-plugins.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index 50eaa1a248..c28ed989aa 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -191,9 +191,10 @@ selftest.define("add cordova plugins", ["slow"], function () { // configuration for android. run.expectExit(8); - checkCordovaPlugins(s, - ["org.apache.cordova.camera", - "com.phonegap.plugins.facebookconnect"]); + // When one plugin installation fails, we uninstall all the plugins + // (legend has it that Cordova can get in a weird inconsistent state + // if we don't do this). + checkCordovaPlugins(s, []); // Remove a plugin run = s.run("remove", "contains-cordova-plugin"); From 0bd892a2617908b329375807f9db0aeda0b1c469 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:07:32 -0700 Subject: [PATCH 12/26] Remove copied-and-pasted comment on 'add cordova platforms' --- tools/tests/cordova-platforms.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index 389e31a347..e31f49e926 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -2,8 +2,6 @@ var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../files.js'); -// Add plugins to an app. Change the contents of the plugins and their -// dependencies, make sure that the app still refreshes. selftest.define("add cordova platforms", function () { var s = new Sandbox(); var run; From 149389d9323009b551d4c940346438a041ece0a5 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:09:02 -0700 Subject: [PATCH 13/26] Update 'add cordova platforms' to match latest command output --- tools/tests/cordova-platforms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index e31f49e926..60c146ffa7 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -12,8 +12,8 @@ selftest.define("add cordova platforms", function () { s.set("METEOR_TEST_TMP", files.mkdtemp()); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); run = s.run("add-platform", "android"); @@ -28,7 +28,7 @@ selftest.define("add cordova platforms", function () { run = s.run("remove-platform", "android"); run.match("removed"); run = s.run("run", "android"); - run.matchErr("platform is not added"); - run.matchErr("meteor add-platform android"); + run.matchErr("Platform is not added"); + run.match("meteor add-platform android"); run.expectExit(1); }); From 6d1730562971ba6888724b862a5b9b23fb530aeb Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:19:17 -0700 Subject: [PATCH 14/26] Update path in cordova builds selftest --- tools/tests/cordova-builds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 2d9210e027..7a3b3612ca 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -7,7 +7,7 @@ var selftest = require('../selftest.js'); var Sandbox = selftest.Sandbox; var checkMobileServer = selftest.markStack(function (s, expected) { - var output = s.read("android/assets/www/application/index.html"); + var output = s.read("android/project/assets/www/application/index.html"); if (! output.match(new RegExp( '"DDP_DEFAULT_CONNECTION_URL":"' + expected + '"'))) { selftest.fail( From 8b86948d41c1a9a8bd19f9c3c13f1fa425585565 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 11:50:21 -0700 Subject: [PATCH 15/26] Fix argument parsing test; default port is now a string --- tools/tests/command-line.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 8109e1dbe0..690aeccd7e 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -56,52 +56,52 @@ selftest.define("argument parsing", function () { // successful command invocation, correct parsing of arguments run = s.run("dummy", "--email", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "", ""); - run.read('"x" 3000 none ["",""]\n'); + run.read('"x" "3000" none ["",""]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e="); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "-"); - run.read('"x" 3000 none ["-"]\n'); + run.read('"x" "3000" none ["-"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", "x"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-e", ""); - run.read('"" 3000 none []\n'); + run.read('"" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "-exxx"); - run.read('"xxx" 3000 none []\n'); + run.read('"xxx" "3000" none []\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "-"); - run.read('"-" 3000 none []\n'); + run.read('"-" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -121,7 +121,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "--port", "1234", "--changed"); - run.read('"--port" 3000 true ["1234"]\n'); + run.read('"--port" "3000" true ["1234"]\n'); run.expectEnd(); run.expectExit(0); @@ -237,17 +237,17 @@ selftest.define("argument parsing", function () { // '--' to end parsing run = s.run("dummy", "--email", "x", "--", "-p", "4000"); - run.read('"x" 3000 none ["-p","4000"]\n'); + run.read('"x" "3000" none ["-p","4000"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--", "--changed", "--changed"); - run.read('"x" 3000 none ["--changed","--changed"]\n'); + run.read('"x" "3000" none ["--changed","--changed"]\n'); run.expectEnd(); run.expectExit(0); run = s.run("dummy", "--email", "x", "--"); - run.read('"x" 3000 none []\n'); + run.read('"x" "3000" none []\n'); run.expectEnd(); run.expectExit(0); @@ -258,7 +258,7 @@ selftest.define("argument parsing", function () { run.expectExit(0); run = s.run("dummy", "--email", "x", "-UD", "--changed"); - run.read('"x" 3000 true []\nurl\n\delete\n'); + run.read('"x" "3000" true []\nurl\n\delete\n'); run.expectEnd(); run.expectExit(0); From e4244003cf722f4e2182c492c87106fcb245c4e5 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:26:24 -0700 Subject: [PATCH 16/26] Use single quotes in 'packages with organizations' selftest --- tools/tests/package-tests.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 2c3af8602b..74a2a87bbc 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -361,7 +361,7 @@ var publishMostBasicPackage = function (s, fullPackageName) { s.cd(fullPackageName, function () { run = s.run("publish", "--create"); - run.waitSecs(15); + run.waitSecs(60); run.expectExit(0); run.match("Done"); }); @@ -711,14 +711,18 @@ selftest.define("talk to package server with expired or no accounts token", var changeVersionAndPublish = function (s, expectAuthorizationFailure) { var packageJs = s.read("package.js"); // XXX Hack - var version = packageJs.match(/version: \"(\d\.\d\.\d)\"/)[1]; + var versionMatch = packageJs.match(/version: \'(\d\.\d\.\d)\'/); + if (! versionMatch) { + selftest.fail("package.js does not match version field: " + packageJs); + } + var version = versionMatch[1]; var versionParts = version.split("."); versionParts[0] = parseInt(versionParts[0]) + 1; packageJs = packageJs.replace(version, versionParts.join(".")); s.write("package.js", packageJs); var run = s.run("publish"); - run.waitSecs(30); + run.waitSecs(60); if (expectAuthorizationFailure) { run.matchErr("not an authorized maintainer"); // XXX Why is this 3? Other unauthorized errors (e.g. maintainers From 2b280474cbcffa2fc0fc227aef29694d0c36ae04 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 17/26] Make icons/splashscreens options consistent with underscores --- examples/todos/mobile-config.js | 4 ++-- tools/commands-cordova.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js index b5f3952f19..ae73b56247 100644 --- a/examples/todos/mobile-config.js +++ b/examples/todos/mobile-config.js @@ -9,9 +9,9 @@ App.info({ App.icons({ // iOS 'iphone': 'resources/icons/icon-60.png', - 'iphone-2x': 'resources/icons/icon-60@2x.png', + 'iphone_2x': 'resources/icons/icon-60@2x.png', 'ipad': 'resources/icons/icon-72.png', - 'ipad-2x': 'resources/icons/icon-72@2x.png', + 'ipad_2x': 'resources/icons/icon-72@2x.png', // Android - XXX these are the same as iOS for now 'android_ldpi': 'resources/icons/icon-60.png', diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index 8fc8db6f22..76583e90e2 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -1160,10 +1160,10 @@ var requirePlatformReady = function (platform) { // Hard-coded constants var iconIosSizes = { 'iphone': '60x60', - 'iphone-2x': '120x120', - 'iphone-3x': '180x180', + 'iphone_2x': '120x120', + 'iphone_3x': '180x180', 'ipad': '76x76', - 'ipad-2x': '152x152' + 'ipad_2x': '152x152' }; var iconAndroidSizes = { @@ -1288,10 +1288,10 @@ var consumeControlFile = function (controlFilePath, cordovaPath) { * * Valid key values: * - `iphone` - * - `iphone-2x` - * - `iphone-3x` + * - `iphone_2x` + * - `iphone_3x` * - `ipad` - * - `ipad-2x` + * - `ipad_2x` * - `android_ldpi` * - `android_mdpi` * - `android_hdpi` From a10b52549406a1388a7ad2a6673dfeaf6eeff04e Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:38:21 -0700 Subject: [PATCH 18/26] Clone __meteor_runtime_config__ before extending it --- packages/webapp/webapp_server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 7f44489abf..b4c7d9053a 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -318,7 +318,8 @@ var getBoilerplate = function (request, arch) { var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { additionalOptions = additionalOptions || {}; - var runtimeConfig = _.extend(__meteor_runtime_config__, + var runtimeConfig = _.extend( + _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} ); From d612b4e14c85edbd1a9aa9d0772197d8291defd2 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:10 -0700 Subject: [PATCH 19/26] Stop 'meteor run' process in cordova hcp selftest --- tools/tests/cordova-hcp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/cordova-hcp.js b/tools/tests/cordova-hcp.js index 0a71927b9a..ae18a39092 100644 --- a/tools/tests/cordova-hcp.js +++ b/tools/tests/cordova-hcp.js @@ -39,4 +39,6 @@ selftest.define( if (! result.match(rootUrlRegExp)) { selftest.fail("Incorrect ROOT_URL"); } + + run.stop(); }); From aaa9bfb04860c3c97e48f4cf5ae78f8dd55f65b3 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 13:53:30 -0700 Subject: [PATCH 20/26] Add regression test for edbf05db --- tools/tests/run.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tools/tests/run.js b/tools/tests/run.js index a37370c761..59c7775501 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -5,6 +5,7 @@ var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); var files = require('../files.js'); +var httpHelpers = require('../http-helpers.js'); var MONGO_LISTENING = { stdout: " [initandlisten] waiting for connections on port" }; @@ -408,3 +409,51 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); + +// Regression test: previously, if ROOT_URL was set, then the process of +// generating the cordova boilerplate would change +// __meteor_runtime_config__, resulting in an incorrect browser +// boilerplate being generated the next time boilerplate generation +// occurs. +selftest.define("generating boilerplate does not change runtime config", function () { + var s = new Sandbox(); + var run; + + s.createApp("myapp", "standard-app"); + s.cd("myapp"); + + // Add 'android' to the .meteor/platforms file, just so that the + // Cordova boilerplate will be generated and served, without having + // to download the whole Android sdk. + var platforms = s.read(".meteor/platforms"); + s.write(".meteor/platforms", platforms + "\nandroid\n"); + + s.set("ROOT_URL", "http://127.0.0.1:3000"); + run = s.run(); + run.waitSecs(30); + run.match("Started your app"); + + var body = httpHelpers.getUrl("http://localhost:3000"); + var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL"); + } + + s.mkdir("client"); + s.cd("client"); + s.write("foo.js", "console.log(1);\n"); + + run.waitSecs(30); + // We don't expect the server to restart; we're testing that + // __meteor_runtime_config__ does not get modified over the life of + // a single server process. + run.forbidAll("restarted"); + run.match("Client modified"); + + body = httpHelpers.getUrl("http://localhost:3000"); + if (! body.match(rootUrlRegExp)) { + selftest.fail("Incorrect ROOT_URL after modifying client"); + } + + run.stop(); +}); From 89ea5afa83f363ca0fe492ea2b141f4cf18a7e66 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 13:29:43 -0700 Subject: [PATCH 21/26] Make icons/splashscreens options consistent with underscores --- docs/client/api.html | 2 +- docs/client/data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index d0e893f0ed..f6a9270538 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -3638,7 +3638,7 @@ App.info({ // Set up resources such as icons and launch screens. App.icons({ 'iphone': 'icons/icon-60.png', - 'iphone-2x': 'icons/icon-60@2x.png', + 'iphone_2x': 'icons/icon-60@2x.png', // ... more screen sizes and platforms ... }); diff --git a/docs/client/data.js b/docs/client/data.js index f1a4b28f20..17358be291 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -1,2 +1,2 @@ // This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh -DocsData = {"Accounts":{"kind":"namespace","name":"Accounts","summary":"The namespace for all accounts-related methods.","longname":"Accounts","ui":{"summary":"Accounts UI","kind":"namespace","memberof":"Accounts","name":"ui","longname":"Accounts.ui","scope":"static","config":{"summary":"Configure the behavior of [`{{> loginButtons}}`](#accountsui).","params":[{"type":{"names":["Object"]},"name":"options"}],"name":"config","longname":"Accounts.ui.config","kind":"function","memberof":"Accounts.ui","scope":"static","options":[{"type":{"names":["Object"]},"description":"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The callback to be called when login is successful.

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

The callback to be called after the login has failed.

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

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

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

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

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

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

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

A unique name for this user.

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

The user's email address.

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

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

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

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

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

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

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

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

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

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

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

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

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

The email address to send a password reset link.

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

The token retrieved from the reset password URL.

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

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

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

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

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

The token retrieved from the verification URL.

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

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

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

The id of the user to update.

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

A new password for the user.

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

The id of the user to send email to.

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

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

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

The id of the user to send email to.

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

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

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

The id of the user to send email to.

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

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

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

The number of bytes of binary data to allocate.

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

Another object to compare this to.

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

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

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

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

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

A value to serialize to plain JSON.

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

A value to deserialize into EJSON.

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

A value to stringify.

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

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

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

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

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

A string to parse into an EJSON value.

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

The variable to check.

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

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

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

A value to copy.

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

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

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

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

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

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

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

A list of permissions to request from the user.

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

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

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

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

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

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

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

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

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

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

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

The user's password.

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

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

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

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

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

Optional arguments passed to publisher function on server.

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

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

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

Name of method to invoke

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

Optional method arguments

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

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

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

Name of method to invoke

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

Method arguments

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

Optional callback; same semantics as in Meteor.call.

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

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

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

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

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

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

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

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

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

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

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

Dictionary whose keys are method names and values are functions.

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

A function that takes a callback as its final parameter

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

Optional this object against which the original function will be invoked

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

A function to run on startup.

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

The function to run

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

Number of milliseconds to wait before calling function

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

The function to run

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

Number of milliseconds to wait between each function call.

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

The handle returned by Meteor.setInterval

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

The handle returned by Meteor.setTimeout

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

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

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

Create an HTTPS URL.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Functions to call to deliver the result set as it changes

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

Functions to call to deliver the result set as it changes

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

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

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

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

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

Specifies which documents to modify

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

Specifies how to modify the documents

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

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

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

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

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

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

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

A query describing the documents to find

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

Sort order (default: natural order)

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

Number of results to skip at the beginning

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

Maximum number of results to return

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

Dictionary of fields to return or exclude.

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

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

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

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

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

A query describing the documents to find

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

Sort order (default: natural order)

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

Number of results to skip at the beginning

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

Dictionary of fields to return or exclude.

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

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

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

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

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

Specifies which documents to remove

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

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

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

Specifies which documents to modify

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

Specifies how to modify the documents

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\n\n

The default id generation technique is 'STRING'.

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

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

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

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

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

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

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

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

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

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

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

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

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

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

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

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

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone-2x
  • \n
  • iphone-3x
  • \n
  • ipad
  • \n
  • ipad-2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

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

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

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

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

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

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

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

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

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

Optional Git URL to the source repository.

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

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

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

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

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

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

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

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

The source files that make up the\nbuild plugin, independent from api.addFiles.

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

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

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

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

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

The name of the package to require.

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

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

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

Alternatively, with a GitHub URL:

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

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

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

A Function that returns renderable content.

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

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

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

A Function that returns renderable content.

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

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

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

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

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

A Function that returns renderable content.

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

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

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

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

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

A Function that returns renderable content.

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

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

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

The value to test.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The name of the helper function you are defining.

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

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

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

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

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

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

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

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

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

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

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

A function to call immediately.

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

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

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

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

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

Event handlers to associate with this template.

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

The value to check

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

The pattern to match\nvalue against

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

The value to check

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

The pattern to match value against

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

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

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

The URL of another Meteor application.

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

The error to pass to the client.

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

The callback function

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

The name of the collection that contains the new document.

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

The new document's ID.

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

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

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

The name of the collection that contains the changed document.

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

The changed document's ID.

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

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

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

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

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

The ID of the document that has been removed.

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

"From:" address (required)

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

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

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

"Subject:" line

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

Mail body (in plain text or HTML)

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

Dictionary of custom headers

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

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

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

The URL to retrieve.

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

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

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

String to use as the HTTP request body.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The URL to which the request should be sent.

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

Options passed on to HTTP.call.

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

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

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

The URL to which the request should be sent.

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

Options passed on to HTTP.call.

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

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

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

The URL to which the request should be sent.

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

Options passed on to HTTP.call.

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

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

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

The URL to which the request should be sent.

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

Options passed on to HTTP.call.

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

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

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

The key to set, eg, selectedItem

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

The new value for key

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

The key to set, eg, selectedItem

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

The new value for key

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

The name of the session variable to return

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

The name of the session variable to test

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

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

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

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

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

The content of the stylesheet that should be\nadded.

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

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

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

The code to be added.

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

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

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

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

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

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

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

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

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

\n

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

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

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

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

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

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

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

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

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

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

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

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

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

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

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

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

Name of the object.

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

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

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

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

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

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

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The callback to be called when login is successful.

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

The callback to be called after the login has failed.

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

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

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

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

","name":"func"}],"name":"validateNewUser","longname":"Accounts.validateNewUser","kind":"function","memberof":"Accounts","scope":"static","options":[],"locus":"Server"},"onResetPasswordLink":{"summary":"Register a function to call when a reset password link is clicked\nin an email sent by\n[`Accounts.sendResetPasswordEmail`](#accounts_sendresetpasswordemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword.
  2. \n
  3. done: A function to call when the password reset UI flow is complete. The normal\nlogin process is suspended until this function is called, so that the\npassword for user A can be reset even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onResetPasswordLink","longname":"Accounts.onResetPasswordLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEmailVerificationLink":{"summary":"Register a function to call when an email verification link is\nclicked in an email sent by\n[`Accounts.sendVerificationEmail`](#accounts_sendverificationemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: An email verification token that can be passed to\nAccounts.verifyEmail.
  2. \n
  3. done: A function to call when the email verification UI flow is complete.\nThe normal login process is suspended until this function is called, so\nthat the user can be notified that they are verifying their email before\nbeing logged in.
  4. \n
","name":"callback"}],"name":"onEmailVerificationLink","longname":"Accounts.onEmailVerificationLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"onEnrollmentLink":{"summary":"Register a function to call when an account enrollment link is\nclicked in an email sent by\n[`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail).\nThis function should be called in top-level code, not inside\n`Meteor.startup()`.","params":[{"type":{"names":["function"]},"description":"

The function to call. It is given two arguments:

\n
    \n
  1. token: A password reset token that can be passed to\nAccounts.resetPassword to give the newly\nenrolled account a password.
  2. \n
  3. done: A function to call when the enrollment UI flow is complete.\nThe normal login process is suspended until this function is called, so that\nuser A can be enrolled even if user B was logged in.
  4. \n
","name":"callback"}],"name":"onEnrollmentLink","longname":"Accounts.onEnrollmentLink","kind":"function","memberof":"Accounts","scope":"static","options":[]},"createUser":{"summary":"Create a new user.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["function"]},"optional":true,"description":"

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

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

A unique name for this user.

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

The user's email address.

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

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

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

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

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

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

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

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

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

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

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

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

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

The email address to send a password reset link.

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

The token retrieved from the reset password URL.

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

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

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

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

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

The token retrieved from the verification URL.

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

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

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

The id of the user to update.

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

A new password for the user.

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

The id of the user to send email to.

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

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

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

The id of the user to send email to.

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

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

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

The id of the user to send email to.

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

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

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

The number of bytes of binary data to allocate.

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

Another object to compare this to.

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

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

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

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

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

A value to serialize to plain JSON.

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

A value to deserialize into EJSON.

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

A value to stringify.

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

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

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

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

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

A string to parse into an EJSON value.

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

The variable to check.

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

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

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

A value to copy.

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

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

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

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

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

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

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

A list of permissions to request from the user.

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

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

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

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

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

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

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

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

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

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

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

The user's password.

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

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

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

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

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

Optional arguments passed to publisher function on server.

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

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

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

Name of method to invoke

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

Optional method arguments

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

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

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

Name of method to invoke

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

Method arguments

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

Optional callback; same semantics as in Meteor.call.

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

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

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

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

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

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

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

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

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

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

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

Dictionary whose keys are method names and values are functions.

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

A function that takes a callback as its final parameter

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

Optional this object against which the original function will be invoked

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

A function to run on startup.

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

The function to run

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

Number of milliseconds to wait before calling function

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

The function to run

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

Number of milliseconds to wait between each function call.

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

The handle returned by Meteor.setInterval

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

The handle returned by Meteor.setTimeout

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

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

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

Create an HTTPS URL.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Functions to call to deliver the result set as it changes

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

Functions to call to deliver the result set as it changes

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

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

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

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

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

Specifies which documents to modify

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

Specifies how to modify the documents

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

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

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

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

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

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

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

A query describing the documents to find

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

Sort order (default: natural order)

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

Number of results to skip at the beginning

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

Maximum number of results to return

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

Dictionary of fields to return or exclude.

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

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

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

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

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

A query describing the documents to find

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

Sort order (default: natural order)

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

Number of results to skip at the beginning

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

Dictionary of fields to return or exclude.

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

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

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

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

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

Specifies which documents to remove

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

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

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

Specifies which documents to modify

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

Specifies how to modify the documents

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\n\n

The default id generation technique is 'STRING'.

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

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

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

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

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

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

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

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

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

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

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

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

","name":"asyncCallback"}],"name":"getBinary","longname":"Assets.getBinary","kind":"function","scope":"static","options":[],"locus":"Server"}},"App":{"kind":"namespace","name":"App","scope":"global","summary":"The App configuration object in mobile-config.js","longname":"App","info":{"summary":"Set your mobile app's core configuration information.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"App","name":"info","longname":"App.info","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"optional":true,"description":"

Each of the options correspond to a key in the app's core configuration\nas described in the PhoneGap documentation.

","name":"id, version, name, description, author, email, website"}]},"setPreference":{"summary":"Add a preference for your build as described in the\n[PhoneGap documentation](http://docs.phonegap.com/en/3.5.0/config_ref_index.md.html#The%20config.xml%20File_global_preferences).","params":[{"type":{"names":["String"]},"description":"

A preference name supported by Phonegap's\nconfig.xml.

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

The value for that preference.

","name":"value"}],"memberof":"App","name":"setPreference","longname":"App.setPreference","kind":"function","scope":"static","options":[]},"configurePlugin":{"summary":"Set the build-time configuration for a Phonegap plugin.","params":[{"type":{"names":["String"]},"description":"

The identifier of the plugin you want to\nconfigure.

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

A set of key-value pairs which will be passed\nat build-time to configure the specified plugin.

","name":"config"}],"memberof":"App","name":"configurePlugin","longname":"App.configurePlugin","kind":"function","scope":"static","options":[]},"icons":{"summary":"Set the icons for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

An Object where the keys are different\ndevices and screen sizes, and values are image paths\nrelative to the project root directory.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone_3x
  • \n
  • ipad
  • \n
  • ipad_2x
  • \n
  • android_ldpi
  • \n
  • android_mdpi
  • \n
  • android_hdpi
  • \n
  • android_xhdpi
  • \n
","name":"icons"}],"memberof":"App","name":"icons","longname":"App.icons","kind":"function","scope":"static","options":[]},"launchScreens":{"summary":"Set the launch screen images for your mobile app.","params":[{"type":{"names":["Object"]},"description":"

A dictionary where keys are different\ndevices, screen sizes, and orientations, and the values are image paths\nrelative to the project root directory.

\n

For Android, launch screen images should\nbe special "Nine-patch" image files that specify how they should be\nstretched. See the Android docs.

\n

Valid key values:

\n
    \n
  • iphone
  • \n
  • iphone_2x
  • \n
  • iphone5
  • \n
  • iphone6
  • \n
  • iphone6p_portrait
  • \n
  • iphone6p_landscape
  • \n
  • ipad_portrait
  • \n
  • ipad_portrait_2x
  • \n
  • ipad_landscape
  • \n
  • ipad_landscape_2x
  • \n
  • android_ldpi_portrait
  • \n
  • android_ldpi_landscape
  • \n
  • android_mdpi_portrait
  • \n
  • android_mdpi_landscape
  • \n
  • android_hdpi_portrait
  • \n
  • android_hdpi_landscape
  • \n
  • android_xhdpi_portrait
  • \n
  • android_xhdpi_landscape
  • \n
","name":"launchScreens"}],"memberof":"App","name":"launchScreens","longname":"App.launchScreens","kind":"function","scope":"static","options":[]}},"Plugin":{"scope":"global","kind":"namespace","name":"Plugin","summary":"The namespace that is exposed inside build plugin files.","longname":"Plugin","registerSourceHandler":{"summary":"Inside a build plugin source file specified in\n[Package.registerBuildPlugin](#Package-registerBuildPlugin),\nadd a handler to compile files with a certain file extension.","params":[{"type":{"names":["String"]},"description":"

The file extension that this plugin\nshould handle, without the first dot.\nExamples: "coffee", "coffee.md".

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

A function that takes one argument,\na CompileStep object.

\n

Documentation for CompileStep is available on the GitHub Wiki.

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

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

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

The (extended)\nsemver version for your package. Additionally,\nMeteor allows a wrap number: a positive integer that follows the version number. If you are\nporting another package that uses semver versioning, you may want to\nuse the original version, postfixed with _wrapnumber. For example,\n1.2.3_1 or 2.4.5-rc1_4. Wrap numbers sort after the original numbers:\n1.2.3 < 1.2.3_1 < 1.2.3_2 < 1.2.4-rc.0. If no version is specified,\nthis field defaults to 0.0.0. If you want to publish your package to\nthe package server, you must specify a version.

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

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

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

Optional Git URL to the source repository.

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

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

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

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

","name":"func"}],"name":"onTest","longname":"Package.onTest","kind":"function","scope":"static","options":[],"locus":"package.js"},"registerBuildPlugin":{"summary":"Define a build plugin. A build plugin extends the build\nprocess for apps and packages that use this package. For example,\nthe `coffeescript` package uses a build plugin to compile CoffeeScript\nsource files into JavaScript.","params":[{"type":{"names":["Object"]},"optional":true,"name":"options"}],"memberof":"Package","name":"registerBuildPlugin","longname":"Package.registerBuildPlugin","kind":"function","scope":"static","options":[{"type":{"names":["String"]},"description":"

A cosmetic name, must be unique in the\npackage.

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

Meteor packages that this\nplugin uses, independent of the packages specified in\napi.onUse.

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

The source files that make up the\nbuild plugin, independent from api.addFiles.

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

An object where the keys\nare NPM package names, and the keys are the version numbers of\nrequired NPM packages, just like in Npm.depends.

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

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

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

The name of the package to require.

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

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

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

Alternatively, with a GitHub URL:

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

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

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

A Function that returns renderable content.

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

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

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

A Function that returns renderable content.

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

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

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

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

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

A Function that returns renderable content.

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

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

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

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

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

A Function that returns renderable content.

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

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

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

The value to test.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The name of the helper function you are defining.

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

The helper function itself.

","name":"function"}],"name":"registerHelper","longname":"Template.registerHelper","memberof":"Template","scope":"static","options":[],"locus":"Client"},"dynamic":{"memberof":"Template","kind":"function","name":"dynamic","summary":"Choose a template to include dynamically, by name.","params":[{"type":{"names":["String"]},"description":"

The name of the template to include.

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

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

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

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

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

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

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

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

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

A function to call immediately.

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

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

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

A function to call at flush time.

","name":"callback"}],"name":"afterFlush","longname":"Tracker.afterFlush","kind":"function","memberof":"Tracker","scope":"static","options":[],"locus":"Client"},"Dependency":{"summary":"A Dependency represents an atomic unit of reactive data that a\ncomputation might depend on. Reactive data sources such as Session or\nMinimongo internally create different Dependency objects for different\npieces of data, each of which may be depended on by multiple computations.\nWhen the data changes, the computations are invalidated.","kind":"class","name":"Dependency","longname":"Tracker.Dependency","memberof":"Tracker","scope":"static","options":[],"params":[],"instancename":"dependency"}},"CompileStep#inputSize":{"summary":"The total number of bytes in the input file.","memberof":"CompileStep","scope":"instance","type":{"names":["Integer"]},"name":"inputSize","longname":"CompileStep#inputSize","kind":"member"},"CompileStep#inputPath":{"summary":"The filename and relative path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"inputPath","longname":"CompileStep#inputPath","kind":"member"},"CompileStep#fullInputPath":{"summary":"The filename and absolute path of the input file.\nPlease don't use this filename to read the file from disk, instead\nuse [compileStep.read](CompileStep-read).","type":{"names":["String"]},"scope":"instance","memberof":"CompileStep","name":"fullInputPath","longname":"CompileStep#fullInputPath","kind":"member"},"CompileStep#pathForSourceMap":{"summary":"If you are generating a sourcemap for the compiled file, use\nthis path for the original file in the sourcemap.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"pathForSourceMap","longname":"CompileStep#pathForSourceMap","kind":"member"},"CompileStep#packageName":{"summary":"The name of the package in which the file being built exists.","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"packageName","longname":"CompileStep#packageName","kind":"member"},"CompileStep#rootOutputPath":{"summary":"On web targets, this will be the root URL prepended\nto the paths you pick for your output files. For example,\nit could be \"/packages/my-package\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"rootOutputPath","longname":"CompileStep#rootOutputPath","kind":"member"},"CompileStep#arch":{"summary":"The architecture for which we are building. Can be \"os\",\n\"web.browser\", or \"web.cordova\".","type":{"names":["String"]},"memberof":"CompileStep","scope":"instance","name":"arch","longname":"CompileStep#arch","kind":"member"},"CompileStep#fileOptions":{"summary":"Any options passed to \"api.addFiles\".","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"fileOptions","longname":"CompileStep#fileOptions","kind":"member"},"CompileStep#declaredExports":{"summary":"The list of exports that the current package has defined.\nCan be used to treat those symbols differently during compilation.","type":{"names":["Object"]},"memberof":"CompileStep","scope":"instance","name":"declaredExports","longname":"CompileStep#declaredExports","kind":"member"},"Template#helpers":{"summary":"Specify template helpers available to this template.","params":[{"type":{"names":["Object"]},"description":"

Dictionary of helper functions by name.

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

Event handlers to associate with this template.

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

The value to check

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

The pattern to match\nvalue against

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

The value to check

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

The pattern to match value against

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

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

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

The URL of another Meteor application.

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

The error to pass to the client.

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

The callback function

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

The name of the collection that contains the new document.

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

The new document's ID.

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

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

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

The name of the collection that contains the changed document.

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

The changed document's ID.

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

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

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

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

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

The ID of the document that has been removed.

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

"From:" address (required)

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

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

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

"Subject:" line

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

Mail body (in plain text or HTML)

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

Dictionary of custom headers

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

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

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

The URL to retrieve.

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

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

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

String to use as the HTTP request body.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The URL to which the request should be sent.

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

Options passed on to HTTP.call.

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

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

","name":"asyncCallback"}],"name":"get","longname":"HTTP.get","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"post":{"summary":"Send an HTTP `POST` request. Equivalent to calling [`HTTP.call`](#http_call) with \"POST\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"post","longname":"HTTP.post","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"put":{"summary":"Send an HTTP `PUT` request. Equivalent to calling [`HTTP.call`](#http_call) with \"PUT\" as the first argument.","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"put","longname":"HTTP.put","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"},"del":{"summary":"Send an HTTP `DELETE` request. Equivalent to calling [`HTTP.call`](#http_call) with \"DELETE\" as the first argument. (Named `del` to avoid conflic with the Javascript keyword `delete`)","params":[{"type":{"names":["String"]},"description":"

The URL to which the request should be sent.

","name":"url"},{"type":{"names":["Object"]},"optional":true,"description":"

Options passed on to HTTP.call.

","name":"callOptions"},{"type":{"names":["function"]},"optional":true,"description":"

Callback that is called when the request is completed. Required on the client.

","name":"asyncCallback"}],"name":"del","longname":"HTTP.del","kind":"function","memberof":"HTTP","scope":"static","options":[],"locus":"Anywhere"}},"ReactiveVar#get":{"summary":"Returns the current value of the ReactiveVar, establishing a reactive dependency.","name":"get","longname":"ReactiveVar#get","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"params":[],"locus":"Client"},"ReactiveVar#set":{"summary":"Sets the current value of the ReactiveVar, invalidating the Computations that called `get` if `newValue` is different from the old value.","params":[{"type":{"names":["Any"]},"name":"newValue"}],"name":"set","longname":"ReactiveVar#set","kind":"function","memberof":"ReactiveVar","scope":"instance","options":[],"locus":"Client"},"Session":{"set":{"memberof":"Session","kind":"function","name":"set","summary":"Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any [`Tracker.autorun`](#tracker_autorun) computations, that called [`Session.get`](#session_get) on this `key`.)","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.set","options":[],"locus":"Client"},"setDefault":{"memberof":"Session","kind":"function","name":"setDefault","summary":"Set a variable in the session if it is undefined. Otherwise works exactly the same as [`Session.set`](#session_set).","params":[{"type":{"names":["String"]},"description":"

The key to set, eg, selectedItem

","name":"key"},{"type":{"names":["EJSONable","undefined"]},"description":"

The new value for key

","name":"value"}],"scope":"static","longname":"Session.setDefault","options":[],"locus":"Client"},"get":{"memberof":"Session","kind":"function","name":"get","summary":"Get the value of a session variable. If inside a [reactive computation](#reactivity), invalidate the computation the next time the value of the variable is changed by [`Session.set`](#session_set). This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to return

","name":"key"}],"scope":"static","longname":"Session.get","options":[],"locus":"Client"},"equals":{"memberof":"Session","kind":"function","name":"equals","summary":"Test if a session variable is equal to a value. If inside a [reactive computation](#reactivity), invalidate the computation the next time the variable changes to or from the value.","params":[{"type":{"names":["String"]},"description":"

The name of the session variable to test

","name":"key"},{"type":{"names":["String","Number","Boolean","null","undefined"]},"description":"

The value to test against

","name":"value"}],"scope":"static","longname":"Session.equals","options":[],"locus":"Client"}},"CompileStep#read":{"summary":"Read from the input file. If `n` is specified, returns the\nnext `n` bytes of the file as a Buffer. XXX not sure if this actually\nreturns a String sometimes...","params":[{"type":{"names":["Integer"]},"optional":true,"description":"

The number of bytes to return.

","name":"n"}],"scope":"instance","memberof":"CompileStep","name":"read","longname":"CompileStep#read","kind":"function","options":[]},"CompileStep#addHtml":{"summary":"Works in web targets only. Add markup to the `head` or `body`\nsection of the document.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addHtml","longname":"CompileStep#addHtml","kind":"function","options":[{"type":{"names":["String"]},"description":"

Which section of the document should\nbe appended to. Can only be "head" or "body".

","name":"section"},{"type":{"names":["String"]},"description":"

The content to append.

","name":"data"}]},"CompileStep#addStylesheet":{"summary":"Web targets only. Add a stylesheet to the document.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The requested path for the added CSS, may not be\nsatisfied if there are path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The content of the stylesheet that should be\nadded.

","name":"data"},{"type":{"names":["String"]},"description":"

A stringified JSON sourcemap, in case the\nstylesheet was generated from a different file.

","name":"sourceMap"}],"memberof":"CompileStep","scope":"instance","name":"addStylesheet","longname":"CompileStep#addStylesheet","kind":"function","options":[]},"CompileStep#addJavaScript":{"summary":"Add JavaScript code. The code added will only see the\nnamespaces imported by this package as runtime dependencies using\n['api.use'](#PackageAPI-use). If the file being compiled was added\nwith the bare flag, the resulting JavaScript won't be wrapped in a\nclosure.","params":[{"type":{"names":["Object"]},"name":"options"}],"memberof":"CompileStep","scope":"instance","name":"addJavaScript","longname":"CompileStep#addJavaScript","kind":"function","options":[{"type":{"names":["String"]},"description":"

The path at which the JavaScript file\nshould be inserted, may not be honored in case of path conflicts.

","name":"path"},{"type":{"names":["String"]},"description":"

The code to be added.

","name":"data"},{"type":{"names":["String"]},"description":"

The path that will be used in\nany error messages generated by this file, e.g. foo.js:4:1: error.

","name":"sourcePath"}]},"CompileStep#addAsset":{"summary":"Add a file to serve as-is to the browser or to include on\nthe browser, depending on the target. On the web, it will be served\nat the exact path requested. For server targets, it can be retrieved\nusing `Assets.getText` or `Assets.getBinary`.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The path at which to serve the asset.

","name":"path"},{"type":{"names":["Buffer","String"]},"description":"

The data that should be placed in\nthe file.

","name":"data"}],"memberof":"CompileStep","scope":"instance","name":"addAsset","longname":"CompileStep#addAsset","kind":"function","options":[]},"CompileStep#error":{"summary":"Display a build error.","params":[{"type":{"names":["Object"]},"name":"options"},{"type":{"names":["String"]},"description":"

The error message to display.

","name":"message"},{"type":{"names":["String"]},"optional":true,"description":"

The path to display in the error message.

","name":"sourcePath"},{"type":{"names":["Integer"]},"description":"

The line number to display in the error message.

","name":"line"},{"type":{"names":["String"]},"description":"

The function name to display in the error message.

","name":"func"}],"memberof":"CompileStep","scope":"instance","name":"error","longname":"CompileStep#error","kind":"function","options":[]},"PackageAPI#use":{"memberof":"PackageAPI","scope":"instance","summary":"Depend on package `packagename`.","params":[{"type":{"names":["String","Array."]},"description":"

Packages being depended on.\nPackage names may be suffixed with an @version tag.

\n

In general, you must specify a package's version (e.g.,\n'accounts@1.0.0' to use version 1.0.0 or a higher\ncompatible version (ex: 1.0.1, 1.5.0, etc.) of the\naccounts package). If you are sourcing core\npackages from a Meteor release with versionsFrom, you may leave\noff version names for core packages. You may also specify constraints,\nsuch as my:forms@=1.0.0 (this package demands my:forms at 1.0.0 exactly),\nor my:forms@1.0.0 || =2.0.1 (my:forms at 1.x.y, or exactly 2.0.1).

","name":"packageNames"},{"type":{"names":["String"]},"optional":true,"description":"

If you only use the package on the\nserver (or the client), you can pass in the second argument (e.g.,\n'server' or 'client') to specify what architecture the package is\nused with.

","name":"architecture"},{"type":{"names":["Object"]},"optional":true,"name":"options"}],"name":"use","longname":"PackageAPI#use","kind":"function","options":[{"type":{"names":["Boolean"]},"description":"

Establish a weak dependency on a\npackage. If package A has a weak dependency on package B, it means\nthat including A in an app does not force B to be included too — but,\nif B is included or by another package, then B will load before A.\nYou can use this to make packages that optionally integrate with or\nenhance other packages if those packages are present.\nWhen you weakly depend on a package you don't see its exports.\nYou can detect if the possibly-present weakly-depended-on package\nis there by seeing if Package.foo exists, and get its exports\nfrom the same place.

","name":"weak"},{"type":{"names":["Boolean"]},"description":"

It's okay to load this dependency\nafter your package. (In general, dependencies specified by api.use\nare loaded before your package.) You can use this option to break\ncircular dependencies.

","name":"unordered"}],"locus":"package.js"},"PackageAPI#imply":{"memberof":"PackageAPI","summary":"Give users of this package access to another package (by passing in the string `packagename`) or a collection of packages (by passing in an array of strings [`packagename1`, `packagename2`]","scope":"instance","params":[{"type":{"names":["String","Array."]},"description":"

Name of a package, or array of package names, with an optional @version component for each.

","name":"packageSpecs"}],"name":"imply","longname":"PackageAPI#imply","kind":"function","options":[],"locus":"package.js"},"PackageAPI#addFiles":{"memberof":"PackageAPI","scope":"instance","summary":"Specify the source code for your package.","params":[{"type":{"names":["String","Array."]},"description":"

Name of the source file, or array of strings of source file names.

","name":"filename"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the file on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the file is used with.

","name":"architecture"}],"name":"addFiles","longname":"PackageAPI#addFiles","kind":"function","options":[],"locus":"package.js"},"PackageAPI#versionsFrom":{"memberof":"PackageAPI","scope":"instance","summary":"Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with `meteorRelease`. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is `METEOR@0.9.0` and it includes `jquery@1.0.0`, you can write `api.versionsFrom('METEOR@0.9.0')` in your package, and when you later write `api.use('jquery')`, it will be equivalent to `api.use('jquery@1.0.0')`. You may specify an array of multiple releases, in which case the default value for constraints will be the \"or\" of the versions from each release: `api.versionsFrom(['METEOR@0.9.0', 'METEOR@0.9.5'])` may cause `api.use('jquery')` to be interpreted as `api.use('jquery@1.0.0 || 2.0.0')`.","params":[{"type":{"names":["String","Array."]},"description":"

Specification of a release: track@version. Just 'version' (e.g. "0.9.0") is sufficient if using the default release track METEOR.

","name":"meteorRelease"}],"name":"versionsFrom","longname":"PackageAPI#versionsFrom","kind":"function","options":[],"locus":"package.js"},"PackageAPI#export":{"memberof":"PackageAPI","scope":"instance","summary":"Export package-level variables in your package. The specified variables (declared without `var` in the source code) will be available to packages that use this package.","params":[{"type":{"names":["String"]},"description":"

Name of the object.

","name":"exportedObject"},{"type":{"names":["String"]},"optional":true,"description":"

If you only want to export the object on the server (or the client), you can pass in the second argument (e.g., 'server' or 'client') to specify what architecture the export is used with.

","name":"architecture"}],"name":"export","longname":"PackageAPI#export","kind":"function","options":[],"locus":"package.js"},"Subscription":{"summary":"The server's side of a subscription","kind":"class","name":"Subscription","longname":"Subscription","options":[],"params":[],"instancename":"this"},"ReactiveVar":{"kind":"class","summary":"Constructor for a ReactiveVar, which represents a single reactive variable.","params":[{"type":{"names":["Any"]},"description":"

The initial value to set. equalsFunc is ignored when setting the initial value.

","name":"initialValue"},{"type":{"names":["function"]},"optional":true,"description":"

Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default equalsFunc returns true if its arguments are === and are of type number, boolean, string, undefined, or null.

","name":"equalsFunc"}],"name":"ReactiveVar","longname":"ReactiveVar","scope":"global","options":[],"instancename":"reactiveVar","locus":"Client"},"CompileStep":{"description":"

The comments for this class aren't used to generate docs right now.\nThe docs live in the GitHub Wiki at: https://github.com/meteor/meteor/wiki/CompileStep-API-for-Build-Plugin-Source-Handlers

","kind":"class","name":"CompileStep","summary":"The object passed into Plugin.registerSourceHandler","scope":"global","longname":"CompileStep","options":[],"params":[]},"PackageAPI":{"kind":"class","name":"PackageAPI","scope":"global","summary":"The API object passed into the Packages.onUse function.","longname":"PackageAPI","options":[],"params":[],"instancename":"api"}}; \ No newline at end of file From bb29469856abe621275fe7bb520470a5ceb5edda Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Wed, 8 Oct 2014 14:26:38 -0700 Subject: [PATCH 22/26] Replace runtime config regression selftest with simpler unit test --- packages/webapp/webapp_server.js | 10 +++++-- packages/webapp/webapp_tests.js | 22 +++++++++++++++ tools/tests/run.js | 48 -------------------------------- 3 files changed, 29 insertions(+), 51 deletions(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index b4c7d9053a..694f07002f 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -316,8 +316,11 @@ var getBoilerplate = function (request, arch) { return memoizedBoilerplate[memHash]; }; -var generateBoilerplateInstance = function (arch, manifest, additionalOptions) { +WebAppInternals.generateBoilerplateInstance = function (arch, + manifest, + additionalOptions) { additionalOptions = additionalOptions || {}; + var runtimeConfig = _.extend( _.clone(__meteor_runtime_config__), additionalOptions.runtimeConfigOverrides || {} @@ -575,8 +578,9 @@ var runWebAppServer = function () { syncQueue.runTask(function() { _.each(WebApp.clientPrograms, function (program, archName) { boilerplateByArch[archName] = - generateBoilerplateInstance(archName, program.manifest, - defaultOptionsForArch[archName]); + WebAppInternals.generateBoilerplateInstance( + archName, program.manifest, + defaultOptionsForArch[archName]); }); // Clear the memoized boilerplate cache. diff --git a/packages/webapp/webapp_tests.js b/packages/webapp/webapp_tests.js index 358dcd563e..97df3a3dfc 100644 --- a/packages/webapp/webapp_tests.js +++ b/packages/webapp/webapp_tests.js @@ -144,3 +144,25 @@ Tinytest.add("webapp - valid pid check", function (test) { test.isFalse(WebAppInternals.validPid("foobar")); test.isFalse(WebAppInternals.validPid("123foo")); }); + +// Regression test: `generateBoilerplateInstance` should not change +// `__meteor_runtime_config__`. +Tinytest.add("webapp - generating boilerplate should not change runtime config", function (test) { + // Set a dummy key in the runtime config served in the + // boilerplate. Test that the dummy key appears in the boilerplate, + // but not in __meteor_runtime_config__ after generating the + // boilerplate. + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); + + var boilerplate = WebAppInternals.generateBoilerplateInstance( + "web.browser", + {}, // empty manifest + { runtimeConfigOverrides: { WEBAPP_TEST_KEY: true } } + ); + + var boilerplateHtml = boilerplate.toHTML(); + test.isFalse(boilerplateHtml.indexOf("WEBAPP_TEST_KEY") === -1); + + test.isFalse(__meteor_runtime_config__.WEBAPP_TEST_KEY); +}); diff --git a/tools/tests/run.js b/tools/tests/run.js index 59c7775501..5532ff2278 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -409,51 +409,3 @@ selftest.define("'meteor run --port' requires a port", function () { run.matchErr("--port must include a port"); run.expectExit(1); }); - -// Regression test: previously, if ROOT_URL was set, then the process of -// generating the cordova boilerplate would change -// __meteor_runtime_config__, resulting in an incorrect browser -// boilerplate being generated the next time boilerplate generation -// occurs. -selftest.define("generating boilerplate does not change runtime config", function () { - var s = new Sandbox(); - var run; - - s.createApp("myapp", "standard-app"); - s.cd("myapp"); - - // Add 'android' to the .meteor/platforms file, just so that the - // Cordova boilerplate will be generated and served, without having - // to download the whole Android sdk. - var platforms = s.read(".meteor/platforms"); - s.write(".meteor/platforms", platforms + "\nandroid\n"); - - s.set("ROOT_URL", "http://127.0.0.1:3000"); - run = s.run(); - run.waitSecs(30); - run.match("Started your app"); - - var body = httpHelpers.getUrl("http://localhost:3000"); - var rootUrlRegExp = /"ROOT_URL":"http:\/\/127.0.0.1:3000"/; - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL"); - } - - s.mkdir("client"); - s.cd("client"); - s.write("foo.js", "console.log(1);\n"); - - run.waitSecs(30); - // We don't expect the server to restart; we're testing that - // __meteor_runtime_config__ does not get modified over the life of - // a single server process. - run.forbidAll("restarted"); - run.match("Client modified"); - - body = httpHelpers.getUrl("http://localhost:3000"); - if (! body.match(rootUrlRegExp)) { - selftest.fail("Incorrect ROOT_URL after modifying client"); - } - - run.stop(); -}); From 299fde2be9a60644a0455d12fb401aee367df9de Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 8 Oct 2014 14:38:34 -0700 Subject: [PATCH 23/26] Check the new argument of clientVersions publications --- packages/autoupdate/autoupdate_server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index bdbbae2233..8a62571534 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -137,6 +137,8 @@ var updateVersions = function (shouldReloadClientProgram) { Meteor.publish( "meteor_autoupdate_clientVersions", function (appId) { + check(appId, Match.Optional(String)); + // Don't notify clients using wrong appId such as mobile apps built with a // different server but pointing at the same local url if (Autoupdate.appId && appId && Autoupdate.appId !== appId) From a200043285e40be61ed3a1defa2dab0ee1dcfa0e Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 30 Sep 2014 12:42:17 -0700 Subject: [PATCH 24/26] Log if phantomjs exits with error (e.g. missing libs) --- tools/selftest.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/selftest.js b/tools/selftest.js index 3b87098a5d..129544a44f 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -837,7 +837,12 @@ _.extend(PhantomClient.prototype, { '/bin/bash', ['-c', ("exec " + phantomPath + " --load-images=no /dev/stdin <<'END'\n" + - phantomScript + "\nEND\n")]); + phantomScript + "\nEND\n")], + {}, function (exitCode, stdout, stderr) { + if (exitCode != 0) { + console.log("PhantomJS exited with exitCode ", exitCode, "\nstdout:\n", stdout, "\nstderr:\n", stderr); + } + }); }, stop: function() { From d166119beb7738c75a8c815e2cf9f16be8f25970 Mon Sep 17 00:00:00 2001 From: ekatek Date: Wed, 8 Oct 2014 16:03:29 -0700 Subject: [PATCH 25/26] do not use clone since the catalog is backed by a real db --- tools/tests/package-tests.js | 74 +++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 74a2a87bbc..677c9dce3c 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -7,6 +7,7 @@ var _= require('underscore'); var fs = require("fs"); var path = require("path"); var packageClient = require("../package-client.js"); +var buildmessage = require("../buildmessage.js"); var username = "test"; var password = "testtest"; @@ -84,6 +85,76 @@ var checkVersions = function(sand, packages) { selftest.expectEqual(packages.length, i); }; +// Takes in a remote catalog. Returns an object that can sort of immitate the +// catalog. We don't bother to copy all of the information for memory/efficiency +// reasons; the new 'catalog' has the following methods, which correspond to the +// same methods on the normal catalog. +// +// getAllPackageNames () - list of package names +// getPackage (p) - given a package name, return its record +// getSortedVersions (p) - given a package name, return a sorted list of its versions +// getAllReleaseTracks () - list of release tracks +// getSortedRecommendedReleaseVersions (t) - given a track name, get (see method name) +// getReleaseVersion (t, v) - given track & version, return the document record +var DataStub = function (remoteCatalog) { + var self = this; + buildmessage.capture( + { title: "copying catalog data" }, + function () { + var packageNames = remoteCatalog.getAllPackageNames(); + self.packages = {}; + _.each(packageNames, function (p) { + var versions = remoteCatalog.getSortedVersions(p); + var record = remoteCatalog.getPackage(p); + self.packages[p] = { versions: versions, record: record }; + }); + var releaseTracks = remoteCatalog.getAllReleaseTracks(); + self.releases = {}; + _.each(releaseTracks, function (t) { + var versions = + remoteCatalog.getSortedRecommendedReleaseVersions(t); + var records = {}; + _.each(versions, function (v) { + records[v] = remoteCatalog.getReleaseVersion(t, v); + }); + self.releases[t] = { versions: versions, records: records }; + }); + }); +}; + +_.extend(DataStub.prototype, { + getAllPackageNames: function () { + return _.keys(this.packages); + }, + getSortedVersions: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.versions; + }, + getPackage: function (p) { + var self = this; + var rec = self.packages[p]; + if (!rec) return null; + return rec.record; + }, + getAllReleaseTracks: function () { + return _.keys(this.releases); + }, + getSortedRecommendedReleaseVersions: function (t) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.versions; + }, + getReleaseVersion: function (t, v) { + var self = this; + var rec = self.releases[t]; + if (!rec) return null; + return rec.records[v]; + } +}); + // Add packages to an app. Change the contents of the packages and their // dependencies, make sure that the app still refreshes. selftest.define("change packages during hot code push", [], function () { @@ -539,7 +610,6 @@ selftest.define("update server package data unit test", function () { var s = new Sandbox(); var run; - var buildmessage = require("../buildmessage.js"); var packageStorageFileDir = files.mkdtemp("update-server-package-data"); @@ -560,7 +630,7 @@ selftest.define("update server package data unit test", packageServerUrl: selftest.testPackageServerUrl }); - var oldStorage = _.clone(packageStorage); + var oldStorage = new DataStub(packageStorage); var newPackageNames = []; // Publish more than a (small) page worth of packages. When we pass the From 6bc2cff03a67ddade76a844b8c574be664b15832 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Thu, 9 Oct 2014 10:24:11 -0700 Subject: [PATCH 26/26] Pass --progress-bar to curl in ensure_android_bundle Alternatives (doing it all in node) were much more invasive. --- tools/cordova-scripts/ensure_android_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cordova-scripts/ensure_android_bundle.sh b/tools/cordova-scripts/ensure_android_bundle.sh index 31bbfd6df2..ba198142cb 100755 --- a/tools/cordova-scripts/ensure_android_bundle.sh +++ b/tools/cordova-scripts/ensure_android_bundle.sh @@ -40,7 +40,7 @@ install_android_bundle () { echo "Skipping download and installing kit from $DEST_DIR/$TARBALL" >&2 tar -xzf "$DEST_DIR/$TARBALL" -C "$BUNDLE_TMPDIR" else - curl "$ANDROID_BUNDLE_URL_ROOT$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR" + curl --progress-bar "$ANDROID_BUNDLE_URL_ROOT$TARBALL" | tar -xzf - -C "$BUNDLE_TMPDIR" fi # Delete old dev bundle and rename the new one on top of it.