From 96952dda2b8b2bd5df8cf4556ebd8da2a535203a Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Fri, 29 Aug 2014 10:11:21 -0700 Subject: [PATCH] Rename Meteor.Collection -> Mongo.Collection --- examples/leaderboard/leaderboard.js | 2 +- examples/other/client-info/client-info.js | 2 +- examples/other/login-demo/login-demo.js | 2 +- examples/other/quiescence/quiescence.js | 6 +- examples/other/template-demo/client/d3.v2.js | 2 +- .../template-demo/client/template-demo.js | 2 +- examples/other/template-demo/model.js | 2 +- examples/parties/model.js | 2 +- examples/todos/client/todos.js | 4 +- examples/todos/server/publish.js | 4 +- examples/unfinished/atoms/atoms.js | 2 +- examples/unfinished/azrael/model.js | 4 +- examples/unfinished/benchmark/benchmark.js | 2 +- .../unfinished/chat-benchmark/benchmark.js | 4 +- .../client/leaderboard-remote.js | 2 +- .../unfinished/reorderable-list/lib/items.js | 4 +- examples/unfinished/todos-backbone/common.js | 2 +- .../todos-underscore/client/client.js | 2 +- .../unfinished/todos-underscore/common.js | 6 +- examples/wordplay/model.js | 6 +- packages/accounts-base/accounts_common.js | 4 +- packages/application-configuration/config.js | 6 +- packages/autoupdate/autoupdate_client.js | 2 +- packages/autoupdate/autoupdate_server.js | 2 +- .../.npm/package/npm-shrinkwrap.json | 2 +- packages/ctl-helper/ctl-helper.js | 2 +- packages/ddp/.npm/package/npm-shrinkwrap.json | 2 +- packages/ddp/livedata_connection_tests.js | 20 +-- packages/ddp/livedata_test_service.js | 8 +- packages/ddp/livedata_tests.js | 14 +- .../email/.npm/package/npm-shrinkwrap.json | 2 +- packages/facts/facts.js | 2 +- .../http/.npm/package/npm-shrinkwrap.json | 2 +- .../.npm/package/npm-shrinkwrap.json | 2 +- .../plugin/compileLess/npm-shrinkwrap.json | 2 +- .../logging/.npm/package/npm-shrinkwrap.json | 2 +- .../.npm/package/npm-shrinkwrap.json | 4 +- packages/minimongo/minimongo.js | 18 +- packages/minimongo/selector.js | 2 +- packages/mongo/allow_tests.js | 12 +- packages/mongo/collection.js | 75 +++++---- packages/mongo/collection_tests.js | 6 +- packages/mongo/doc_fetcher_tests.js | 2 +- packages/mongo/mongo_driver.js | 10 +- packages/mongo/mongo_livedata_tests.js | 154 +++++++++--------- packages/mongo/observe_changes_tests.js | 6 +- packages/mongo/oplog_tests.js | 8 +- packages/mongo/package.js | 2 + packages/oauth/pending_credentials.js | 2 +- .../oauth1/oauth1_pending_request_tokens.js | 2 +- packages/oauth1/package.js | 1 + .../observe_sequence_tests.js | 22 +-- packages/reactive-dict/reactive-dict.js | 4 +- .../service_configuration_common.js | 2 +- packages/session/session_tests.js | 8 +- packages/spacebars-tests/template_tests.js | 14 +- .../star-translate/.npm/package/.gitignore | 1 - packages/star-translate/.npm/package/README | 7 - .../.npm/package/npm-shrinkwrap.json | 7 - .../plugin/compileStylus/npm-shrinkwrap.json | 9 +- .../webapp/.npm/package/npm-shrinkwrap.json | 41 ++++- tools/auth.js | 2 +- .../failover-test/server/failover-test.js | 2 +- .../hot-code-push-test/hot-code-push-test.js | 2 +- tools/tests/apps/once/once.js | 2 +- 65 files changed, 299 insertions(+), 264 deletions(-) delete mode 100644 packages/star-translate/.npm/package/.gitignore delete mode 100644 packages/star-translate/.npm/package/README delete mode 100644 packages/star-translate/.npm/package/npm-shrinkwrap.json diff --git a/examples/leaderboard/leaderboard.js b/examples/leaderboard/leaderboard.js index 1013e28189..c1a4bce6c1 100644 --- a/examples/leaderboard/leaderboard.js +++ b/examples/leaderboard/leaderboard.js @@ -1,7 +1,7 @@ // Set up a collection to contain player information. On the server, // it is backed by a MongoDB collection named "players". -Players = new Meteor.Collection("players"); +Players = new Mongo.Collection("players"); if (Meteor.isClient) { Template.leaderboard.players = function () { diff --git a/examples/other/client-info/client-info.js b/examples/other/client-info/client-info.js index 4d47c62117..506b5588af 100644 --- a/examples/other/client-info/client-info.js +++ b/examples/other/client-info/client-info.js @@ -11,7 +11,7 @@ if (Meteor.isServer) { if (Meteor.isClient) { Meteor.subscribe("clientInfo"); - var ClientInfo = new Meteor.Collection("clientInfo"); + var ClientInfo = new Mongo.Collection("clientInfo"); Template.info.info = function () { return EJSON.stringify(ClientInfo.findOne("info"), {indent: true}); diff --git a/examples/other/login-demo/login-demo.js b/examples/other/login-demo/login-demo.js index f42cdcc176..8a1e21e30e 100644 --- a/examples/other/login-demo/login-demo.js +++ b/examples/other/login-demo/login-demo.js @@ -1,4 +1,4 @@ -Gizmos = new Meteor.Collection("gizmos"); +Gizmos = new Mongo.Collection("gizmos"); if (Meteor.isClient) { diff --git a/examples/other/quiescence/quiescence.js b/examples/other/quiescence/quiescence.js index a24cbebb33..c150291028 100644 --- a/examples/other/quiescence/quiescence.js +++ b/examples/other/quiescence/quiescence.js @@ -1,6 +1,6 @@ -Time = new Meteor.Collection("time"); -Results = new Meteor.Collection("results"); -Magic = new Meteor.Collection("magic"); +Time = new Mongo.Collection("time"); +Results = new Mongo.Collection("results"); +Magic = new Mongo.Collection("magic"); if (Meteor.isServer) { Meteor.publish("time", function () { diff --git a/examples/other/template-demo/client/d3.v2.js b/examples/other/template-demo/client/d3.v2.js index 6216978cce..651da6bd99 100644 --- a/examples/other/template-demo/client/d3.v2.js +++ b/examples/other/template-demo/client/d3.v2.js @@ -7031,4 +7031,4 @@ d3.time.scale.utc = function() { return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat); }; -})(); \ No newline at end of file +})(); diff --git a/examples/other/template-demo/client/template-demo.js b/examples/other/template-demo/client/template-demo.js index 3147a137c0..9545a3ae15 100644 --- a/examples/other/template-demo/client/template-demo.js +++ b/examples/other/template-demo/client/template-demo.js @@ -1,4 +1,4 @@ -Timers = new Meteor.Collection(null); +Timers = new Mongo.Collection(null); /////////////////////////////////////////////////////////////////////////////// diff --git a/examples/other/template-demo/model.js b/examples/other/template-demo/model.js index ff5a32e480..b0ef00b4aa 100644 --- a/examples/other/template-demo/model.js +++ b/examples/other/template-demo/model.js @@ -1 +1 @@ -Circles = new Meteor.Collection("circles"); +Circles = new Mongo.Collection("circles"); diff --git a/examples/parties/model.js b/examples/parties/model.js index 14fe2f7945..e17b81c971 100644 --- a/examples/parties/model.js +++ b/examples/parties/model.js @@ -13,7 +13,7 @@ invited: Array of user id's that are invited (only if !public) rsvps: Array of objects like {user: userId, rsvp: "yes"} (or "no"/"maybe") */ -Parties = new Meteor.Collection("parties"); +Parties = new Mongo.Collection("parties"); Parties.allow({ insert: function (userId, party) { diff --git a/examples/todos/client/todos.js b/examples/todos/client/todos.js index f2eb89bec2..be2967fe82 100644 --- a/examples/todos/client/todos.js +++ b/examples/todos/client/todos.js @@ -1,8 +1,8 @@ // Client-side JavaScript, bundled and sent to client. // Define Minimongo collections to match server/publish.js. -Lists = new Meteor.Collection("lists"); -Todos = new Meteor.Collection("todos"); +Lists = new Mongo.Collection("lists"); +Todos = new Mongo.Collection("todos"); // ID of currently selected list Session.setDefault('list_id', null); diff --git a/examples/todos/server/publish.js b/examples/todos/server/publish.js index 6b8cf1c43b..d1aa27e272 100644 --- a/examples/todos/server/publish.js +++ b/examples/todos/server/publish.js @@ -1,5 +1,5 @@ // Lists -- {name: String} -Lists = new Meteor.Collection("lists"); +Lists = new Mongo.Collection("lists"); // Publish complete set of lists to all clients. Meteor.publish('lists', function () { @@ -12,7 +12,7 @@ Meteor.publish('lists', function () { // tags: [String, ...], // list_id: String, // timestamp: Number} -Todos = new Meteor.Collection("todos"); +Todos = new Mongo.Collection("todos"); // Publish all items for requested list_id. Meteor.publish('todos', function (list_id) { diff --git a/examples/unfinished/atoms/atoms.js b/examples/unfinished/atoms/atoms.js index d6cbcb9c39..55b01a57c0 100644 --- a/examples/unfinished/atoms/atoms.js +++ b/examples/unfinished/atoms/atoms.js @@ -2,4 +2,4 @@ if (Meteor.isClient) { Template.atom.textY = function () { return this.y + 8; }; -} \ No newline at end of file +} diff --git a/examples/unfinished/azrael/model.js b/examples/unfinished/azrael/model.js index 1bf0ff33c9..8a1ac86732 100644 --- a/examples/unfinished/azrael/model.js +++ b/examples/unfinished/azrael/model.js @@ -1,9 +1,9 @@ // XXX it is actually very dangerous to store times as Number. use // Date type once it's implemented in minimongo -Rooms = new Meteor.Collection("rooms"); +Rooms = new Mongo.Collection("rooms"); //Rooms.schema({name: String, created: Number}); -Chat = new Meteor.Collection("chat"); +Chat = new Mongo.Collection("chat"); /* Chat.schema({room: String, message: String, username: String, created: Number}); diff --git a/examples/unfinished/benchmark/benchmark.js b/examples/unfinished/benchmark/benchmark.js index 1a206ea094..bf91196e1c 100644 --- a/examples/unfinished/benchmark/benchmark.js +++ b/examples/unfinished/benchmark/benchmark.js @@ -67,7 +67,7 @@ var generateDoc = function () { var Collections = []; _.times(PARAMS.numCollections, function (n) { - Collections.push(new Meteor.Collection("Collection" + n)); + Collections.push(new Mongo.Collection("Collection" + n)); }); diff --git a/examples/unfinished/chat-benchmark/benchmark.js b/examples/unfinished/chat-benchmark/benchmark.js index 06c62bc810..5428147452 100644 --- a/examples/unfinished/chat-benchmark/benchmark.js +++ b/examples/unfinished/chat-benchmark/benchmark.js @@ -42,8 +42,8 @@ var randomString = function (length) { ////////////////////////////// -Rooms = new Meteor.Collection("rooms"); -Messages = new Meteor.Collection("messages"); +Rooms = new Mongo.Collection("rooms"); +Messages = new Mongo.Collection("messages"); if (Meteor.isServer) { diff --git a/examples/unfinished/leaderboard-remote/client/leaderboard-remote.js b/examples/unfinished/leaderboard-remote/client/leaderboard-remote.js index 81c4ca9c96..ff1693759d 100644 --- a/examples/unfinished/leaderboard-remote/client/leaderboard-remote.js +++ b/examples/unfinished/leaderboard-remote/client/leaderboard-remote.js @@ -1,7 +1,7 @@ Leaderboard = DDP.connect("http://leader2.meteor.com/sockjs"); // XXX I'd rather this be Leaderboard.Players.. can this API be easier? -Players = new Meteor.Collection("players", {manager: Leaderboard}); +Players = new Mongo.Collection("players", {manager: Leaderboard}); Template.main.events = { 'keydown': function () { diff --git a/examples/unfinished/reorderable-list/lib/items.js b/examples/unfinished/reorderable-list/lib/items.js index 11b6f7951c..91c12feea6 100644 --- a/examples/unfinished/reorderable-list/lib/items.js +++ b/examples/unfinished/reorderable-list/lib/items.js @@ -1,4 +1,4 @@ -Items = new Meteor.Collection("items"); +Items = new Mongo.Collection("items"); if (Meteor.isServer) { if (Items.find().count() === 0) { @@ -6,4 +6,4 @@ if (Meteor.isServer) { ["violet", "unicorn", "flask", "jar", "leitmotif", "rearrange", "right", "ethereal"], function (text, index) { Items.insert({text: text, rank: index}); }); } -} \ No newline at end of file +} diff --git a/examples/unfinished/todos-backbone/common.js b/examples/unfinished/todos-backbone/common.js index 6e714203c4..a12c5d85e5 100644 --- a/examples/unfinished/todos-backbone/common.js +++ b/examples/unfinished/todos-backbone/common.js @@ -1,4 +1,4 @@ -Todos = new Meteor.Collection("todos"); +Todos = new Mongo.Collection("todos"); //Todos.schema({text: String, done: Boolean, order: Number}); if (Meteor.isServer) { diff --git a/examples/unfinished/todos-underscore/client/client.js b/examples/unfinished/todos-underscore/client/client.js index 67c9a748ee..1ccb0c4f06 100644 --- a/examples/unfinished/todos-underscore/client/client.js +++ b/examples/unfinished/todos-underscore/client/client.js @@ -174,7 +174,7 @@ $(function () { // support aggregate queries, construct a local collection to serve // the same purpose, and drive the renderList() off of it. - var LocalTags = new Meteor.Collection; + var LocalTags = new Mongo.Collection; (function () { function updateLocalTags() { var real = _(Todos.find()).chain().pluck('tags').compact().flatten().uniq().value(); diff --git a/examples/unfinished/todos-underscore/common.js b/examples/unfinished/todos-underscore/common.js index 1d0c3579be..3c18676a60 100644 --- a/examples/unfinished/todos-underscore/common.js +++ b/examples/unfinished/todos-underscore/common.js @@ -1,6 +1,6 @@ -Lists = new Meteor.Collection("lists"); +Lists = new Mongo.Collection("lists"); -Todos = new Meteor.Collection("todos"); +Todos = new Mongo.Collection("todos"); /* Schema support coming soon! @@ -19,4 +19,4 @@ if (Meteor.isServer) { Meteor.publish('todos', function () { return Todos.find(); }); -} \ No newline at end of file +} diff --git a/examples/wordplay/model.js b/examples/wordplay/model.js index 5b2912eaae..94d89cfc92 100644 --- a/examples/wordplay/model.js +++ b/examples/wordplay/model.js @@ -1,13 +1,13 @@ ////////// Shared code (client and server) ////////// -Games = new Meteor.Collection('games'); +Games = new Mongo.Collection('games'); // { board: ['A','I',...], clock: 60, // players: [{player_id, name}], winners: [player_id] } -Words = new Meteor.Collection('words'); +Words = new Mongo.Collection('words'); // {player_id: 10, game_id: 123, word: 'hello', state: 'good', score: 4} -Players = new Meteor.Collection('players'); +Players = new Mongo.Collection('players'); // {name: 'matt', game_id: 123} // 6 faces per die, 16 dice. Q really means Qu. diff --git a/packages/accounts-base/accounts_common.js b/packages/accounts-base/accounts_common.js index e079d6097e..21a8d88ebb 100644 --- a/packages/accounts-base/accounts_common.js +++ b/packages/accounts-base/accounts_common.js @@ -134,10 +134,10 @@ if (Meteor.isClient) { // XXX Allow users to configure this collection name. /** - * @summary A [Meteor.Collection](#collections) containing user documents. + * @summary A [Mongo.Collection](#collections) containing user documents. * @locus Anywhere */ -Meteor.users = new Meteor.Collection("users", { +Meteor.users = new Mongo.Collection("users", { _preventAutopublish: true, connection: Meteor.isClient ? Accounts.connection : Meteor.connection }); diff --git a/packages/application-configuration/config.js b/packages/application-configuration/config.js index 25c3c19a27..ad1d54f02a 100644 --- a/packages/application-configuration/config.js +++ b/packages/application-configuration/config.js @@ -26,13 +26,13 @@ var collectionFuture = new Future(); Meteor.startup(function () { if (ultra) { - Apps = new Meteor.Collection("apps", { + Apps = new Mongo.Collection("apps", { connection: ultra }); - Jobs = new Meteor.Collection("jobs", { + Jobs = new Mongo.Collection("jobs", { connection: ultra }); - Services = new Meteor.Collection('services', { + Services = new Mongo.Collection('services', { connection: ultra }); // allow us to block on the collections being ready diff --git a/packages/autoupdate/autoupdate_client.js b/packages/autoupdate/autoupdate_client.js index 8fe72c5a8b..d780df1c85 100644 --- a/packages/autoupdate/autoupdate_client.js +++ b/packages/autoupdate/autoupdate_client.js @@ -29,7 +29,7 @@ var autoupdateVersionRefreshable = __meteor_runtime_config__.autoupdateVersionRefreshable || "unknown"; // The collection of acceptable client versions. -ClientVersions = new Meteor.Collection("meteor_autoupdate_clientVersions"); +ClientVersions = new Mongo.Collection("meteor_autoupdate_clientVersions"); Autoupdate = {}; diff --git a/packages/autoupdate/autoupdate_server.js b/packages/autoupdate/autoupdate_server.js index 7277c047e2..8edd8358c5 100644 --- a/packages/autoupdate/autoupdate_server.js +++ b/packages/autoupdate/autoupdate_server.js @@ -39,7 +39,7 @@ var Future = Npm.require("fibers/future"); Autoupdate = {}; // The collection of acceptable client versions. -ClientVersions = new Meteor.Collection("meteor_autoupdate_clientVersions", +ClientVersions = new Mongo.Collection("meteor_autoupdate_clientVersions", { connection: null }); // The client hash includes __meteor_runtime_config__, so wait until diff --git a/packages/ctl-helper/.npm/package/npm-shrinkwrap.json b/packages/ctl-helper/.npm/package/npm-shrinkwrap.json index 18e7c137ad..38e731e729 100644 --- a/packages/ctl-helper/.npm/package/npm-shrinkwrap.json +++ b/packages/ctl-helper/.npm/package/npm-shrinkwrap.json @@ -7,7 +7,7 @@ "version": "0.0.2" }, "minimist": { - "version": "0.0.5" + "version": "0.0.10" } } } diff --git a/packages/ctl-helper/ctl-helper.js b/packages/ctl-helper/ctl-helper.js index c852a3d344..a5904a08a5 100644 --- a/packages/ctl-helper/ctl-helper.js +++ b/packages/ctl-helper/ctl-helper.js @@ -187,7 +187,7 @@ _.extend(Ctl, { }, jobsCollection: _.once(function () { - return new Meteor.Collection("jobs", {manager: Ctl.findGalaxy()}); + return new Mongo.Collection("jobs", {manager: Ctl.findGalaxy()}); }), // use _.memoize so that this is called only once per app. diff --git a/packages/ddp/.npm/package/npm-shrinkwrap.json b/packages/ddp/.npm/package/npm-shrinkwrap.json index 3c44970ac2..2e48d4005a 100644 --- a/packages/ddp/.npm/package/npm-shrinkwrap.json +++ b/packages/ddp/.npm/package/npm-shrinkwrap.json @@ -4,7 +4,7 @@ "version": "https://github.com/meteor/faye-websocket-node/tarball/ccc180998b1396093c24d0df7ebc1d199c276552", "dependencies": { "websocket-driver": { - "version": "0.3.4" + "version": "git+https://github.com/meteor/websocket-driver-node#dcd7c278b6661ec27b0960198185295e1aa81f33" } } }, diff --git a/packages/ddp/livedata_connection_tests.js b/packages/ddp/livedata_connection_tests.js index dcee7378f7..9b526d0286 100644 --- a/packages/ddp/livedata_connection_tests.js +++ b/packages/ddp/livedata_connection_tests.js @@ -79,7 +79,7 @@ Tinytest.add("livedata stub - receive data", function (test) { // XXX: Test that the old signature of passing manager directly instead of in // options works. - var coll = new Meteor.Collection(coll_name, conn); + var coll = new Mongo.Collection(coll_name, conn); // queue has been emptied and doc is in db. test.isUndefined(conn._updatesForUnknownStores[coll_name]); @@ -386,7 +386,7 @@ if (Meteor.isClient) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); // setup method conn.methods({do_something: function (x) { @@ -533,7 +533,7 @@ if (Meteor.isClient) { startAndConnect(test, stream); var coll_name = Random.id(); - var coll = new Meteor.Collection(coll_name, {connection: conn}); + var coll = new Mongo.Collection(coll_name, {connection: conn}); // setup methods conn.methods({ @@ -619,7 +619,7 @@ Tinytest.add("livedata stub - reconnect", function (test) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); var o = observeCursor(test, coll.find()); @@ -750,7 +750,7 @@ if (Meteor.isClient) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); var o = observeCursor(test, coll.find()); conn.methods({writeSomething: function () { @@ -923,7 +923,7 @@ Tinytest.add("livedata stub - reconnect method which only got data", function (t startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); var o = observeCursor(test, coll.find()); // Call a method. We'll get the data-done message but not the result before @@ -1009,7 +1009,7 @@ if (Meteor.isClient) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); var o = observeCursor(test, coll.find()); conn.methods({ @@ -1096,7 +1096,7 @@ if (Meteor.isClient) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); conn.methods({ insertSomething: function () { @@ -1238,7 +1238,7 @@ Tinytest.add("livedata connection - two wait methods", function (test) { startAndConnect(test, stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); // setup method conn.methods({do_something: function (x) {}}); @@ -1682,7 +1682,7 @@ if (Meteor.isClient) { var conn = newConnection(stream); var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var coll = new Mongo.Collection(collName, {connection: conn}); // Start and send "connect", but DON'T get 'connected' quite yet. stream.reset(); // initial connection start. diff --git a/packages/ddp/livedata_test_service.js b/packages/ddp/livedata_test_service.js index 52d0ff53de..3dc2d10a87 100644 --- a/packages/ddp/livedata_test_service.js +++ b/packages/ddp/livedata_test_service.js @@ -95,7 +95,7 @@ if (Meteor.isServer) { /*****/ -Ledger = new Meteor.Collection("ledger"); +Ledger = new Mongo.Collection("ledger"); Ledger.allow({ insert: function() { return true; }, update: function() { return true; }, @@ -147,7 +147,7 @@ Meteor.methods({ /// Helpers for "livedata - changing userid reruns subscriptions..." -objectsWithUsers = new Meteor.Collection("objectsWithUsers"); +objectsWithUsers = new Mongo.Collection("objectsWithUsers"); if (Meteor.isServer) { objectsWithUsers.remove({}); @@ -313,8 +313,8 @@ if (Meteor.isServer) { /*****/ /// Helpers for "livedata - publish multiple cursors" -One = new Meteor.Collection("collectionOne"); -Two = new Meteor.Collection("collectionTwo"); +One = new Mongo.Collection("collectionOne"); +Two = new Mongo.Collection("collectionTwo"); if (Meteor.isServer) { One.remove({}); diff --git a/packages/ddp/livedata_tests.js b/packages/ddp/livedata_tests.js index 6cf075a703..f18544b493 100644 --- a/packages/ddp/livedata_tests.js +++ b/packages/ddp/livedata_tests.js @@ -119,8 +119,8 @@ testAsyncMulti("livedata - basic method invocation", [ echoTest(new Date()), echoTest({d: new Date(), s: "foobarbaz"}), echoTest([new Date(), "foobarbaz"]), - echoTest(new Meteor.Collection.ObjectID()), - echoTest({o: new Meteor.Collection.ObjectID()}), + echoTest(new Mongo.Collection.ObjectID()), + echoTest({o: new Mongo.Collection.ObjectID()}), echoTest({$date: 30}), // literal echoTest({$literal: {$date: 30}}), echoTest(12), @@ -471,7 +471,7 @@ if (Meteor.isClient) { Meteor.call('livedata/setup', id, expect(function () {})); }, function (test, expect) { - MultiPub = new Meteor.Collection("MultiPubCollection" + id); + MultiPub = new Mongo.Collection("MultiPubCollection" + id); var sub1 = Meteor.subscribe("pub1"+id, expect(function () {})); var sub2 = Meteor.subscribe("pub2"+id, expect(function () {})); }, @@ -494,7 +494,7 @@ if (Meteor.isClient) { if (Meteor.isClient) { testAsyncMulti("livedata - overlapping universal subs", [ function (test, expect) { - var coll = new Meteor.Collection("overlappingUniversalSubs"); + var coll = new Mongo.Collection("overlappingUniversalSubs"); var token = Random.id(); test.isFalse(coll.findOne(token)); Meteor.call("testOverlappingSubs", token, expect(function (err) { @@ -506,7 +506,7 @@ if (Meteor.isClient) { testAsyncMulti("livedata - runtime universal sub creation", [ function (test, expect) { - var coll = new Meteor.Collection("runtimeSubCreation"); + var coll = new Mongo.Collection("runtimeSubCreation"); var token = Random.id(); test.isFalse(coll.findOne(token)); Meteor.call("runtimeUniversalSubCreation", token, expect(function (err) { @@ -536,7 +536,7 @@ if (Meteor.isClient) { conn = new LivedataTest.Connection('/', {reloadWithOutstanding: true}); collName = Random.id(); - coll = new Meteor.Collection(collName, {connection: conn}); + coll = new Mongo.Collection(collName, {connection: conn}); var testSubError = function (options) { conn.subscribe("publisherErrors", collName, options, { @@ -704,7 +704,7 @@ if (Meteor.isServer) { self.ready(); }); } else { - var PublisherCloningCollection = new Meteor.Collection("publisherCloning"); + var PublisherCloningCollection = new Mongo.Collection("publisherCloning"); testAsyncMulti("livedata - publish callbacks clone", [ function (test, expect) { Meteor.subscribe("publisherCloning", {normal: 1}, { diff --git a/packages/email/.npm/package/npm-shrinkwrap.json b/packages/email/.npm/package/npm-shrinkwrap.json index 3d84231100..4817761b05 100644 --- a/packages/email/.npm/package/npm-shrinkwrap.json +++ b/packages/email/.npm/package/npm-shrinkwrap.json @@ -12,7 +12,7 @@ "version": "0.3.10", "dependencies": { "rai": { - "version": "0.1.7" + "version": "0.1.11" }, "xoauth2": { "version": "0.1.8" diff --git a/packages/facts/facts.js b/packages/facts/facts.js index d2f8d3f979..12a3c7324f 100644 --- a/packages/facts/facts.js +++ b/packages/facts/facts.js @@ -65,7 +65,7 @@ if (Meteor.isServer) { }, {is_auto: true}); }); } else { - Facts.server = new Meteor.Collection(serverFactsCollection); + Facts.server = new Mongo.Collection(serverFactsCollection); Template.serverFacts.factsByPackage = function () { return Facts.server.find(); diff --git a/packages/http/.npm/package/npm-shrinkwrap.json b/packages/http/.npm/package/npm-shrinkwrap.json index 769091aa01..9fbedfd4f5 100644 --- a/packages/http/.npm/package/npm-shrinkwrap.json +++ b/packages/http/.npm/package/npm-shrinkwrap.json @@ -22,7 +22,7 @@ "version": "0.12.1", "dependencies": { "punycode": { - "version": "1.2.4" + "version": "1.3.1" } } }, diff --git a/packages/js-analyze/.npm/package/npm-shrinkwrap.json b/packages/js-analyze/.npm/package/npm-shrinkwrap.json index d0887e7f77..25327f180e 100644 --- a/packages/js-analyze/.npm/package/npm-shrinkwrap.json +++ b/packages/js-analyze/.npm/package/npm-shrinkwrap.json @@ -4,7 +4,7 @@ "version": "1.0.0", "dependencies": { "estraverse": { - "version": "1.3.1" + "version": "1.5.1" } } }, diff --git a/packages/less/.npm/plugin/compileLess/npm-shrinkwrap.json b/packages/less/.npm/plugin/compileLess/npm-shrinkwrap.json index ca0017eca7..a9abd2d873 100644 --- a/packages/less/.npm/plugin/compileLess/npm-shrinkwrap.json +++ b/packages/less/.npm/plugin/compileLess/npm-shrinkwrap.json @@ -28,7 +28,7 @@ "version": "0.12.1", "dependencies": { "punycode": { - "version": "1.3.0" + "version": "1.3.1" } } }, diff --git a/packages/logging/.npm/package/npm-shrinkwrap.json b/packages/logging/.npm/package/npm-shrinkwrap.json index 7bbbfcf6bb..48e1f964eb 100644 --- a/packages/logging/.npm/package/npm-shrinkwrap.json +++ b/packages/logging/.npm/package/npm-shrinkwrap.json @@ -7,7 +7,7 @@ "version": "0.9.2" }, "memoizee": { - "version": "0.2.5", + "version": "0.2.6", "dependencies": { "event-emitter": { "version": "0.2.2" diff --git a/packages/minifiers/.npm/package/npm-shrinkwrap.json b/packages/minifiers/.npm/package/npm-shrinkwrap.json index fbe29a32ed..0afd49764d 100644 --- a/packages/minifiers/.npm/package/npm-shrinkwrap.json +++ b/packages/minifiers/.npm/package/npm-shrinkwrap.json @@ -7,7 +7,7 @@ "version": "https://github.com/reworkcss/css-stringify/tarball/a7fe6de82e055d41d1c5923ec2ccef06f2a45efa", "dependencies": { "source-map": { - "version": "0.1.33", + "version": "0.1.38", "dependencies": { "amdefine": { "version": "0.1.0" @@ -23,7 +23,7 @@ "version": "0.2.10" }, "source-map": { - "version": "0.1.33", + "version": "0.1.38", "dependencies": { "amdefine": { "version": "0.1.0" diff --git a/packages/minimongo/minimongo.js b/packages/minimongo/minimongo.js index 81f8aa22fd..9b1864b004 100644 --- a/packages/minimongo/minimongo.js +++ b/packages/minimongo/minimongo.js @@ -89,7 +89,7 @@ LocalCollection.prototype.find = function (selector, options) { /** * @summary To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch. * @class Cursor - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instanceName cursor */ LocalCollection.Cursor = function (collection, selector, options) { @@ -155,7 +155,7 @@ LocalCollection.prototype.findOne = function (selector, options) { * @locus Anywhere * @method forEach * @instance - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @param {Function} callback Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself. * @param {Any} [thisArg] An object which will be the value of `this` inside `callback`. */ @@ -196,7 +196,7 @@ LocalCollection.Cursor.prototype.getTransform = function () { * @locus Anywhere * @method map * @instance - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @param {Function} callback Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself. * @param {Any} [thisArg] An object which will be the value of `this` inside `callback`. */ @@ -211,7 +211,7 @@ LocalCollection.Cursor.prototype.map = function (callback, thisArg) { /** * @summary Return all matching documents as an Array. - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @method fetch * @instance * @locus Anywhere @@ -227,7 +227,7 @@ LocalCollection.Cursor.prototype.fetch = function () { /** * @summary Returns the number of documents that match a query. - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @method count * @instance * @locus Anywhere @@ -249,7 +249,7 @@ LocalCollection.Cursor.prototype._publishCursor = function (sub) { var collection = self.collection.name; // XXX minimongo should not depend on mongo-livedata! - return Meteor.Collection._publishCursor(self, sub, collection); + return Mongo.Collection._publishCursor(self, sub, collection); }; LocalCollection.Cursor.prototype._getCollectionName = function () { @@ -303,7 +303,7 @@ _.extend(LocalCollection.Cursor.prototype, { /** * @summary Watch a query. Receive callbacks as the result set changes. * @locus Anywhere - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @instance * @param {Object} callbacks Functions to call to deliver the result set as it changes */ @@ -315,7 +315,7 @@ _.extend(LocalCollection.Cursor.prototype, { /** * @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. * @locus Anywhere - * @memberOf Meteor.Collection.Cursor + * @memberOf Mongo.Collection.Cursor * @instance * @param {Object} callbacks Functions to call to deliver the result set as it changes */ @@ -558,7 +558,7 @@ LocalCollection.prototype.insert = function (doc, callback) { if (!_.has(doc, '_id')) { // if you really want to use ObjectIDs, set this global. - // Meteor.Collection specifies its own ids and does not use this code. + // Mongo.Collection specifies its own ids and does not use this code. doc._id = LocalCollection._useOID ? new LocalCollection._ObjectID() : Random.id(); } diff --git a/packages/minimongo/selector.js b/packages/minimongo/selector.js index 437d0c366d..ddc38c80a0 100644 --- a/packages/minimongo/selector.js +++ b/packages/minimongo/selector.js @@ -648,7 +648,7 @@ ELEMENT_OPERATORS = { if (valueSelector.$options !== undefined) { // Options passed in $options (even the empty string) always overrides // options in the RegExp object itself. (See also - // Meteor.Collection._rewriteSelector.) + // Mongo.Collection._rewriteSelector.) // Be clear that we only support the JS-supported options, not extended // ones (eg, Mongo supports x and s). Ideally we would implement x and s diff --git a/packages/mongo/allow_tests.js b/packages/mongo/allow_tests.js index ca37a955fb..e432d466ac 100644 --- a/packages/mongo/allow_tests.js +++ b/packages/mongo/allow_tests.js @@ -16,7 +16,7 @@ if (Meteor.isServer) { var needToConfigure = undefined; // helper for defining a collection. we are careful to create just one - // Meteor.Collection even if the sub body is rerun, by caching them. + // Mongo.Collection even if the sub body is rerun, by caching them. var defineCollection = function(name, insecure, transform) { var fullName = name + idGeneration + nonce; @@ -27,7 +27,7 @@ if (Meteor.isServer) { throw new Error("collections inconsistently exist"); needToConfigure = false; } else { - collection = new Meteor.Collection( + collection = new Mongo.Collection( fullName, {idGeneration: idGeneration, transform: transform}); allowCollections[fullName] = collection; if (needToConfigure === false) @@ -232,7 +232,7 @@ if (Meteor.isClient) { // a method to clear it var defineCollection = function(name, transform) { var fullName = name + idGeneration + nonce; - var collection = new Meteor.Collection( + var collection = new Mongo.Collection( fullName, {idGeneration: idGeneration, transform: transform}); collection.callClearMethod = function (callback) { @@ -790,7 +790,7 @@ if (Meteor.isClient) { // with the client.. if (Meteor.isServer) { Tinytest.add("collection - allow and deny validate options", function (test) { - var collection = new Meteor.Collection(null); + var collection = new Mongo.Collection(null); test.throws(function () { collection.allow({invalidOption: true}); @@ -827,7 +827,7 @@ if (Meteor.isServer) { }); Tinytest.add("collection - calling allow restricts", function (test) { - var collection = new Meteor.Collection(null); + var collection = new Mongo.Collection(null); test.equal(collection._restricted, false); collection.allow({ insert: function() {} @@ -841,7 +841,7 @@ if (Meteor.isServer) { var insecurePackage = Package.insecure; Package.insecure = {}; - var collection = new Meteor.Collection(null); + var collection = new Mongo.Collection(null); test.equal(collection._isInsecure(), true); Package.insecure = undefined; diff --git a/packages/mongo/collection.js b/packages/mongo/collection.js index fc7be2bd5a..43f706fd0d 100644 --- a/packages/mongo/collection.js +++ b/packages/mongo/collection.js @@ -1,8 +1,10 @@ // options.connection, if given, is a LivedataClient or LivedataServer // XXX presently there is no way to destroy/clean up a Collection +Mongo = {}; + /** - * @summary Constructor for a Collection + * @summary Constructor for a MongoDB Collection * @locus Anywhere * @instancename collection * @class @@ -12,15 +14,15 @@ * @param {String} options.idGeneration The method of generating the `_id` fields of new documents in this collection. Possible values: - **`'STRING'`**: random strings - - **`'MONGO'`**: random [`Meteor.Collection.ObjectID`](#collection_object_id) values + - **`'MONGO'`**: random [`Mongo.Collection.ObjectID`](#collection_object_id) values The default id generation technique is `'STRING'`. * @param {Function} options.transform 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. */ -Meteor.Collection = function (name, options) { +Mongo.Collection = function (name, options) { var self = this; - if (! (self instanceof Meteor.Collection)) - throw new Error('use "new" to construct a Meteor.Collection'); + if (! (self instanceof Mongo.Collection)) + throw new Error('use "new" to construct a Mongo.Collection'); if (!name && (name !== null)) { Meteor._debug("Warning: creating anonymous collection. It will not be " + @@ -31,7 +33,7 @@ Meteor.Collection = function (name, options) { if (name !== null && typeof name !== "string") { throw new Error( - "First argument to new Meteor.Collection must be a string or null"); + "First argument to new Mongo.Collection must be a string or null"); } if (options && options.methods) { @@ -57,7 +59,7 @@ Meteor.Collection = function (name, options) { case 'MONGO': self._makeNewID = function () { var src = name ? DDP.randomStream('/collection/' + name) : Random; - return new Meteor.Collection.ObjectID(src.hexString(24)); + return new Mongo.Collection.ObjectID(src.hexString(24)); }; break; case 'STRING': @@ -215,7 +217,7 @@ Meteor.Collection = function (name, options) { /// -_.extend(Meteor.Collection.prototype, { +_.extend(Mongo.Collection.prototype, { _getFindSelector: function (args) { if (args.length == 0) @@ -246,7 +248,7 @@ _.extend(Meteor.Collection.prototype, { * @summary Find the documents in a collection that match the selector. * @locus Anywhere * @method find - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instance * @param {MongoSelector} [selector] A query describing the documents to find * @param {Object} [options] @@ -271,7 +273,7 @@ _.extend(Meteor.Collection.prototype, { * @summary Finds the first document that matches the selector, as ordered by sort and skip options. * @locus Anywhere * @method findOne - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instance * @param {MongoSelector} [selector] A query describing the documents to find * @param {Object} [options] @@ -290,7 +292,7 @@ _.extend(Meteor.Collection.prototype, { }); -Meteor.Collection._publishCursor = function (cursor, sub, collection) { +Mongo.Collection._publishCursor = function (cursor, sub, collection) { var observeHandle = cursor.observeChanges({ added: function (id, fields) { sub.added(collection, id, fields); @@ -314,7 +316,7 @@ Meteor.Collection._publishCursor = function (cursor, sub, collection) { // likely programmer error, and not what you want, particularly for destructive // operations. JS regexps don't serialize over DDP but can be trivially // replaced by $regex. -Meteor.Collection._rewriteSelector = function (selector) { +Mongo.Collection._rewriteSelector = function (selector) { // shorthand -- scalars match _id if (LocalCollection._selectorIsId(selector)) selector = {_id: selector}; @@ -338,7 +340,7 @@ Meteor.Collection._rewriteSelector = function (selector) { else if (_.contains(['$or','$and','$nor'], key)) { // Translate lower levels of $and/$or/$nor ret[key] = _.map(value, function (v) { - return Meteor.Collection._rewriteSelector(v); + return Mongo.Collection._rewriteSelector(v); }); } else { ret[key] = value; @@ -408,7 +410,7 @@ var throwIfSelectorIsNotId = function (selector, methodName) { * @summary Insert a document in the collection. Returns its unique _id. * @locus Anywhere * @method insert - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instance * @param {Object} doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you. * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the _id as the second. @@ -418,7 +420,7 @@ var throwIfSelectorIsNotId = function (selector, methodName) { * @summary Modify one or more documents in the collection. Returns the number of affected documents. * @locus Anywhere * @method update - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instance * @param {MongoSelector} selector Specifies which documents to modify * @param {MongoModifier} modifier Specifies how to modify the documents @@ -432,14 +434,14 @@ var throwIfSelectorIsNotId = function (selector, methodName) { * @summary Remove documents from the collection * @locus Anywhere * @method remove - * @memberOf Meteor.Collection + * @memberOf Mongo.Collection * @instance * @param {MongoSelector} selector Specifies which documents to remove * @param {Function} [callback] Optional. If present, called with an error object as its argument. */ _.each(["insert", "update", "remove"], function (name) { - Meteor.Collection.prototype[name] = function (/* arguments */) { + Mongo.Collection.prototype[name] = function (/* arguments */) { var self = this; var args = _.toArray(arguments); var callback; @@ -462,7 +464,7 @@ _.each(["insert", "update", "remove"], function (name) { if ('_id' in args[0]) { insertId = args[0]._id; if (!insertId || !(typeof insertId === 'string' - || insertId instanceof Meteor.Collection.ObjectID)) + || insertId instanceof Mongo.Collection.ObjectID)) throw new Error("Meteor requires document _id fields to be non-empty strings or ObjectIDs"); } else { var generateId = true; @@ -480,7 +482,7 @@ _.each(["insert", "update", "remove"], function (name) { } } } else { - args[0] = Meteor.Collection._rewriteSelector(args[0]); + args[0] = Mongo.Collection._rewriteSelector(args[0]); if (name === "update") { // Mutate args but copy the original options object. We need to add @@ -492,7 +494,7 @@ _.each(["insert", "update", "remove"], function (name) { // set `insertedId` if absent. `insertedId` is a Meteor extension. if (options.insertedId) { if (!(typeof options.insertedId === 'string' - || options.insertedId instanceof Meteor.Collection.ObjectID)) + || options.insertedId instanceof Mongo.Collection.ObjectID)) throw new Error("insertedId must be string or ObjectID"); } else { options.insertedId = self._makeNewID(); @@ -590,7 +592,7 @@ _.each(["insert", "update", "remove"], function (name) { * @param {Boolean} options.multi True to modify all matching documents; false to only modify one of the matching documents (the default). * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second. */ -Meteor.Collection.prototype.upsert = function (selector, modifier, +Mongo.Collection.prototype.upsert = function (selector, modifier, options, callback) { var self = this; if (! callback && typeof options === "function") { @@ -604,25 +606,25 @@ Meteor.Collection.prototype.upsert = function (selector, modifier, // We'll actually design an index API later. For now, we just pass through to // Mongo's, but make it synchronous. -Meteor.Collection.prototype._ensureIndex = function (index, options) { +Mongo.Collection.prototype._ensureIndex = function (index, options) { var self = this; if (!self._collection._ensureIndex) throw new Error("Can only call _ensureIndex on server collections"); self._collection._ensureIndex(index, options); }; -Meteor.Collection.prototype._dropIndex = function (index) { +Mongo.Collection.prototype._dropIndex = function (index) { var self = this; if (!self._collection._dropIndex) throw new Error("Can only call _dropIndex on server collections"); self._collection._dropIndex(index); }; -Meteor.Collection.prototype._dropCollection = function () { +Mongo.Collection.prototype._dropCollection = function () { var self = this; if (!self._collection.dropCollection) throw new Error("Can only call _dropCollection on server collections"); self._collection.dropCollection(); }; -Meteor.Collection.prototype._createCappedCollection = function (byteSize) { +Mongo.Collection.prototype._createCappedCollection = function (byteSize) { var self = this; if (!self._collection._createCappedCollection) throw new Error("Can only call _createCappedCollection on server collections"); @@ -635,7 +637,7 @@ Meteor.Collection.prototype._createCappedCollection = function (byteSize) { * @class * @param {String} hexString Optional. The 24-character hexadecimal contents of the ObjectID to create */ -Meteor.Collection.ObjectID = LocalCollection._ObjectID; +Mongo.Collection.ObjectID = LocalCollection._ObjectID; /// /// Remote methods and access control. @@ -724,7 +726,7 @@ Meteor.Collection.ObjectID = LocalCollection._ObjectID; * @param {String[]} options.fetch Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your `update` and `remove` functions. * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections). Pass `null` to disable transformation. */ - Meteor.Collection.prototype.allow = function(options) { + Mongo.Collection.prototype.allow = function(options) { addValidator.call(this, 'allow', options); }; @@ -738,13 +740,13 @@ Meteor.Collection.ObjectID = LocalCollection._ObjectID; * @param {String[]} options.fetch Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your `update` and `remove` functions. * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections). Pass `null` to disable transformation. */ - Meteor.Collection.prototype.deny = function(options) { + Mongo.Collection.prototype.deny = function(options) { addValidator.call(this, 'deny', options); }; })(); -Meteor.Collection.prototype._defineMutationMethods = function() { +Mongo.Collection.prototype._defineMutationMethods = function() { var self = this; // set to true once we call any allow or deny methods. If true, use @@ -867,7 +869,7 @@ Meteor.Collection.prototype._defineMutationMethods = function() { }; -Meteor.Collection.prototype._updateFetch = function (fields) { +Mongo.Collection.prototype._updateFetch = function (fields) { var self = this; if (!self._validators.fetchAllFields) { @@ -881,7 +883,7 @@ Meteor.Collection.prototype._updateFetch = function (fields) { } }; -Meteor.Collection.prototype._isInsecure = function () { +Mongo.Collection.prototype._isInsecure = function () { var self = this; if (self._insecure === undefined) return !!Package.insecure; @@ -905,7 +907,7 @@ var docToValidate = function (validator, doc, generatedId) { return ret; }; -Meteor.Collection.prototype._validatedInsert = function (userId, doc, +Mongo.Collection.prototype._validatedInsert = function (userId, doc, generatedId) { var self = this; @@ -941,7 +943,7 @@ var transformDoc = function (validator, doc) { // control rules set by calls to `allow/deny` are satisfied. If all // pass, rewrite the mongo operation to use $in to set the list of // document ids to change ##ValidatedChange -Meteor.Collection.prototype._validatedUpdate = function( +Mongo.Collection.prototype._validatedUpdate = function( userId, selector, mutator, options) { var self = this; @@ -1039,7 +1041,7 @@ var ALLOWED_UPDATE_OPERATIONS = { // Simulate a mongo `remove` operation while validating access control // rules. See #ValidatedChange -Meteor.Collection.prototype._validatedRemove = function(userId, selector) { +Mongo.Collection.prototype._validatedRemove = function(userId, selector) { var self = this; var findOptions = {transform: null}; @@ -1075,3 +1077,8 @@ Meteor.Collection.prototype._validatedRemove = function(userId, selector) { return self._collection.remove.call(self._collection, selector); }; + +/** + * @deprecated in 0.9.1 + */ +Meteor.Collection = Mongo.Collection; diff --git a/packages/mongo/collection_tests.js b/packages/mongo/collection_tests.js index f903e7c3db..2e10e449d8 100644 --- a/packages/mongo/collection_tests.js +++ b/packages/mongo/collection_tests.js @@ -1,11 +1,11 @@ Tinytest.add( - 'collection - call Meteor.Collection without new', + 'collection - call Mongo.Collection without new', function (test) { test.throws( function () { - Meteor.Collection(null); + Mongo.Collection(null); }, - /use "new" to construct a Meteor\.Collection/ + /use "new" to construct a Mongo\.Collection/ ); } ); diff --git a/packages/mongo/doc_fetcher_tests.js b/packages/mongo/doc_fetcher_tests.js index c2affe7b17..6637ed9bca 100644 --- a/packages/mongo/doc_fetcher_tests.js +++ b/packages/mongo/doc_fetcher_tests.js @@ -5,7 +5,7 @@ testAsyncMulti("mongo-livedata - doc fetcher", [ function (test, expect) { var self = this; var collName = "docfetcher-" + Random.id(); - var collection = new Meteor.Collection(collName); + var collection = new Mongo.Collection(collName); var id1 = collection.insert({x: 1}); var id2 = collection.insert({y: 2}); diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index cd36cf8559..f346319e33 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -48,7 +48,7 @@ var replaceMongoAtomWithMeteor = function (document) { return new Uint8Array(buffer); } if (document instanceof MongoDB.ObjectID) { - return new Meteor.Collection.ObjectID(document.toHexString()); + return new Mongo.Collection.ObjectID(document.toHexString()); } if (document["EJSON$type"] && document["EJSON$value"] && _.size(document) === 2) { @@ -71,7 +71,7 @@ var replaceMeteorAtomWithMongo = function (document) { // serialize it correctly). return new MongoDB.Binary(new Buffer(document)); } - if (document instanceof Meteor.Collection.ObjectID) { + if (document instanceof Mongo.Collection.ObjectID) { return new MongoDB.ObjectID(document.toHexString()); } if (document instanceof MongoDB.Timestamp) { @@ -686,7 +686,7 @@ MongoConnection.prototype._dropIndex = function (collectionName, index) { // which includes fully-synchronous versions of forEach, etc. // // Cursor is the cursor object returned from find(), which implements the -// documented Meteor.Collection cursor API. It wraps a CursorDescription and a +// documented Mongo.Collection cursor API. It wraps a CursorDescription and a // SynchronousCursor (lazily: it doesn't contact Mongo until you call a method // like fetch or forEach on it). // @@ -708,7 +708,7 @@ MongoConnection.prototype._dropIndex = function (collectionName, index) { CursorDescription = function (collectionName, selector, options) { var self = this; self.collectionName = collectionName; - self.selector = Meteor.Collection._rewriteSelector(selector); + self.selector = Mongo.Collection._rewriteSelector(selector); self.options = options || {}; }; @@ -761,7 +761,7 @@ Cursor.prototype.getTransform = function () { Cursor.prototype._publishCursor = function (sub) { var self = this; var collection = self._cursorDescription.collectionName; - return Meteor.Collection._publishCursor(self, sub, collection); + return Mongo.Collection._publishCursor(self, sub, collection); }; // Used to guarantee that publish functions return at most one cursor per diff --git a/packages/mongo/mongo_livedata_tests.js b/packages/mongo/mongo_livedata_tests.js index eadd3f7176..0d255ee477 100644 --- a/packages/mongo/mongo_livedata_tests.js +++ b/packages/mongo/mongo_livedata_tests.js @@ -18,7 +18,7 @@ if (Meteor.isServer) { if (options && options.transformName) { options.transform = TRANSFORMS[options.transformName]; } - var c = new Meteor.Collection(name, options); + var c = new Mongo.Collection(name, options); COLLECTIONS[name] = c; c._insecure = true; Meteor.publish('c-' + name, function () { @@ -163,14 +163,14 @@ if (Meteor.isServer) { m[upsertTestMethod] = function (run, useUpdate, options) { check(run, String); check(useUpdate, Boolean); - upsertTestMethodColl = new Meteor.Collection(upsertTestMethod + "_collection_" + run, options); + upsertTestMethodColl = new Mongo.Collection(upsertTestMethod + "_collection_" + run, options); upsertTestMethodImpl(upsertTestMethodColl, useUpdate); }; Meteor.methods(m); } Meteor._FailureTestCollection = - new Meteor.Collection("___meteor_failure_test_collection"); + new Mongo.Collection("___meteor_failure_test_collection"); // For test "document with a custom type" var Dog = function (name, color, actions) { @@ -242,11 +242,11 @@ Tinytest.addAsync("mongo-livedata - basics, " + idGeneration, function (test, on var run = test.runId(); var coll, coll2; if (Meteor.isClient) { - coll = new Meteor.Collection(null, collectionOptions) ; // local, unmanaged - coll2 = new Meteor.Collection(null, collectionOptions); // local, unmanaged + coll = new Mongo.Collection(null, collectionOptions) ; // local, unmanaged + coll2 = new Mongo.Collection(null, collectionOptions); // local, unmanaged } else { - coll = new Meteor.Collection("livedata_test_collection_"+run, collectionOptions); - coll2 = new Meteor.Collection("livedata_test_collection_2_"+run, collectionOptions); + coll = new Mongo.Collection("livedata_test_collection_"+run, collectionOptions); + coll2 = new Mongo.Collection("livedata_test_collection_2_"+run, collectionOptions); } var log = ''; @@ -392,9 +392,9 @@ Tinytest.addAsync("mongo-livedata - fuzz test, " + idGeneration, function(test, var run = Random.id(); var coll; if (Meteor.isClient) { - coll = new Meteor.Collection(null, collectionOptions); // local, unmanaged + coll = new Mongo.Collection(null, collectionOptions); // local, unmanaged } else { - coll = new Meteor.Collection("livedata_test_collection_"+run, collectionOptions); + coll = new Mongo.Collection("livedata_test_collection_"+run, collectionOptions); } // fuzz test of observe(), especially the server-side diffing @@ -521,9 +521,9 @@ Tinytest.addAsync("mongo-livedata - scribbling, " + idGeneration, function (test var run = test.runId(); var coll; if (Meteor.isClient) { - coll = new Meteor.Collection(null, collectionOptions); // local, unmanaged + coll = new Mongo.Collection(null, collectionOptions); // local, unmanaged } else { - coll = new Meteor.Collection("livedata_test_collection_"+run, collectionOptions); + coll = new Mongo.Collection("livedata_test_collection_"+run, collectionOptions); } var numAddeds = 0; @@ -551,9 +551,9 @@ Tinytest.addAsync("mongo-livedata - stop handle in callback, " + idGeneration, f var run = Random.id(); var coll; if (Meteor.isClient) { - coll = new Meteor.Collection(null, collectionOptions); // local, unmanaged + coll = new Mongo.Collection(null, collectionOptions); // local, unmanaged } else { - coll = new Meteor.Collection("stopHandleInCallback-"+run, collectionOptions); + coll = new Mongo.Collection("stopHandleInCallback-"+run, collectionOptions); } var output = []; @@ -604,7 +604,7 @@ Tinytest.addAsync("mongo-livedata - stop handle in callback, " + idGeneration, f if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - recursive observe throws, " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("observeInCallback-"+run, collectionOptions); + var coll = new Mongo.Collection("observeInCallback-"+run, collectionOptions); var callbackCalled = false; var handle = coll.find({}).observe({ @@ -629,7 +629,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - cursor dedup, " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("cursorDedup-"+run, collectionOptions); + var coll = new Mongo.Collection("cursorDedup-"+run, collectionOptions); var observer = function (noAdded) { var output = []; @@ -737,7 +737,7 @@ if (Meteor.isServer) { // Tests that insert returns before the callback runs. Relies on the fact // that mongo does not run the callback before spinning off the event loop. var cname = Random.id(); - var coll = new Meteor.Collection(cname); + var coll = new Mongo.Collection(cname); var doc = { foo: "bar" }; var x = 0; coll.insert(doc, function (err, result) { @@ -751,7 +751,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - async server-side update, " + idGeneration, function (test, onComplete) { // Tests that update returns before the callback runs. var cname = Random.id(); - var coll = new Meteor.Collection(cname); + var coll = new Mongo.Collection(cname); var doc = { foo: "bar" }; var x = 0; var id = coll.insert(doc); @@ -767,7 +767,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - async server-side remove, " + idGeneration, function (test, onComplete) { // Tests that remove returns before the callback runs. var cname = Random.id(); - var coll = new Meteor.Collection(cname); + var coll = new Mongo.Collection(cname); var doc = { foo: "bar" }; var x = 0; var id = coll.insert(doc); @@ -791,7 +791,7 @@ if (Meteor.isServer) { // queries. Compitablity with poll-diff is added as well. Tinytest.addAsync("mongo-livedata - observe sorted, limited " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("observeLimit-"+run, collectionOptions); + var coll = new Mongo.Collection("observeLimit-"+run, collectionOptions); var observer = function () { var state = {}; @@ -1061,7 +1061,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - observe sorted, limited, sort fields " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("observeLimit-"+run, collectionOptions); + var coll = new Mongo.Collection("observeLimit-"+run, collectionOptions); var observer = function () { var state = {}; @@ -1137,7 +1137,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - observe sorted, limited, big initial set" + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("observeLimit-"+run, collectionOptions); + var coll = new Mongo.Collection("observeLimit-"+run, collectionOptions); var observer = function () { var state = {}; @@ -1256,7 +1256,7 @@ testAsyncMulti('mongo-livedata - empty documents, ' + idGeneration, [ Meteor.subscribe('c-' + this.collectionName, expect()); } }, function (test, expect) { - var coll = new Meteor.Collection(this.collectionName, collectionOptions); + var coll = new Mongo.Collection(this.collectionName, collectionOptions); coll.insert({}, expect(function (err, id) { test.isFalse(err); @@ -1276,7 +1276,7 @@ testAsyncMulti('mongo-livedata - upsert without callback, ' + idGeneration, [ Meteor.subscribe('c-' + this.collectionName, expect()); } }, function (test, expect) { - var coll = new Meteor.Collection(this.collectionName, collectionOptions); + var coll = new Mongo.Collection(this.collectionName, collectionOptions); // No callback! Before fixing #2413, this method never returned and // so no future DDP methods worked either. @@ -1297,7 +1297,7 @@ testAsyncMulti('mongo-livedata - document with length, ' + idGeneration, [ } }, function (test, expect) { var self = this; - var coll = self.coll = new Meteor.Collection(self.collectionName, collectionOptions); + var coll = self.coll = new Mongo.Collection(self.collectionName, collectionOptions); coll.insert({foo: 'x', length: 0}, expect(function (err, id) { test.isFalse(err); @@ -1327,7 +1327,7 @@ testAsyncMulti('mongo-livedata - document with a date, ' + idGeneration, [ } }, function (test, expect) { - var coll = new Meteor.Collection(this.collectionName, collectionOptions); + var coll = new Mongo.Collection(this.collectionName, collectionOptions); var docId; coll.insert({d: new Date(1356152390004)}, expect(function (err, id) { test.isFalse(err); @@ -1360,7 +1360,7 @@ testAsyncMulti('mongo-livedata - document goes through a transform, ' + idGenera } }, function (test, expect) { var self = this; - self.coll = new Meteor.Collection(self.collectionName, self.collectionOptions); + self.coll = new Mongo.Collection(self.collectionName, self.collectionOptions); var obs; var expectAdd = expect(function (doc) { test.equal(doc.seconds(), 50); @@ -1421,7 +1421,7 @@ testAsyncMulti('mongo-livedata - transform sets _id if not present, ' + idGenera } }, function (test, expect) { var self = this; - self.coll = new Meteor.Collection(this.collectionName, collectionOptions); + self.coll = new Mongo.Collection(this.collectionName, collectionOptions); self.coll.insert({}, expect(function (err, id) { test.isFalse(err); test.isTrue(id); @@ -1448,7 +1448,7 @@ testAsyncMulti('mongo-livedata - document with binary data, ' + idGeneration, [ Meteor.subscribe('c-' + this.collectionName, expect()); } }, function (test, expect) { - var coll = new Meteor.Collection(this.collectionName, collectionOptions); + var coll = new Mongo.Collection(this.collectionName, collectionOptions); var docId; coll.insert({b: bin}, expect(function (err, id) { test.isFalse(err); @@ -1472,7 +1472,7 @@ testAsyncMulti('mongo-livedata - document with a custom type, ' + idGeneration, } }, function (test, expect) { var self = this; - self.coll = new Meteor.Collection(this.collectionName, collectionOptions); + self.coll = new Mongo.Collection(this.collectionName, collectionOptions); var docId; // Dog is implemented at the top of the file, outside of the idGeneration // loop (so that we only call EJSON.addType once). @@ -1499,7 +1499,7 @@ testAsyncMulti('mongo-livedata - document with a custom type, ' + idGeneration, if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - update return values, " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("livedata_update_result_"+run, collectionOptions); + var coll = new Mongo.Collection("livedata_update_result_"+run, collectionOptions); coll.insert({ foo: "bar" }); coll.insert({ foo: "baz" }); @@ -1514,7 +1514,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - remove return values, " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("livedata_update_result_"+run, collectionOptions); + var coll = new Mongo.Collection("livedata_update_result_"+run, collectionOptions); coll.insert({ foo: "bar" }); coll.insert({ foo: "baz" }); @@ -1531,7 +1531,7 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - id-based invalidation, " + idGeneration, function (test, onComplete) { var run = test.runId(); - var coll = new Meteor.Collection("livedata_invalidation_collection_"+run, collectionOptions); + var coll = new Mongo.Collection("livedata_invalidation_collection_"+run, collectionOptions); coll.allow({ update: function () {return true;}, @@ -1600,7 +1600,7 @@ if (Meteor.isServer) { Tinytest.add("mongo-livedata - upsert error parse, " + idGeneration, function (test) { var run = test.runId(); - var coll = new Meteor.Collection("livedata_upsert_errorparse_collection_"+run, collectionOptions); + var coll = new Mongo.Collection("livedata_upsert_errorparse_collection_"+run, collectionOptions); coll.insert({_id: 'foobar'}); var err; @@ -1637,7 +1637,7 @@ _.each(Meteor.isServer ? [true, false] : [true], function (minimongo) { var skipIds = useUpdate || (! minimongo && useDirectCollection); if (minimongo) options = _.extend({}, collectionOptions, { connection: null }); - var coll = new Meteor.Collection( + var coll = new Mongo.Collection( "livedata_upsert_collection_"+run+ (useUpdate ? "_update_" : "") + (minimongo ? "_minimongo_" : "") + @@ -1663,8 +1663,8 @@ _.each(Meteor.isServer ? [true, false] : [true], function (minimongo) { // Test values that require transformation to go into Mongo: - var t1 = new Meteor.Collection.ObjectID(); - var t2 = new Meteor.Collection.ObjectID(); + var t1 = new Mongo.Collection.ObjectID(); + var t2 = new Mongo.Collection.ObjectID(); var result3 = upsert(coll, useUpdate, {foo: t1}, {foo: t1}); test.equal(result3.numberAffected, 1); if (! skipIds) @@ -1791,9 +1791,9 @@ var asyncUpsertTestName = function (useNetwork, useDirectCollection, // This is a duplicate of the test above, with some changes to make it work for // callback style. On the client, we test server-backed and in-memory -// collections, and run the tests for both the Meteor.Collection and the +// collections, and run the tests for both the Mongo.Collection and the // LocalCollection. On the server, we test mongo-backed collections, for both -// the Meteor.Collection and the MongoConnection. +// the Mongo.Collection and the MongoConnection. // // XXX Rewrite with testAsyncMulti, that would simplify things a lot! _.each(Meteor.isServer ? [false] : [true, false], function (useNetwork) { @@ -1814,13 +1814,13 @@ _.each(Meteor.isServer ? [false] : [true, false], function (useNetwork) { if (useNetwork) { Meteor.call("createInsecureCollection", collName, collectionOptions); - coll = new Meteor.Collection(collName, collectionOptions); + coll = new Mongo.Collection(collName, collectionOptions); Meteor.subscribe("c-" + collName, next0); } else { var opts = _.clone(collectionOptions); if (Meteor.isClient) opts.connection = null; - coll = new Meteor.Collection(collName, opts); + coll = new Mongo.Collection(collName, opts); if (useDirectCollection) coll = coll._collection; } @@ -1853,8 +1853,8 @@ _.each(Meteor.isServer ? [false] : [true, false], function (useNetwork) { // Test values that require transformation to go into Mongo: - t1 = new Meteor.Collection.ObjectID(); - t2 = new Meteor.Collection.ObjectID(); + t1 = new Mongo.Collection.ObjectID(); + t2 = new Mongo.Collection.ObjectID(); upsert(coll, useUpdate, {_id: t1}, {_id: t1, foo: 'bar'}, next3); }; @@ -1979,7 +1979,7 @@ if (Meteor.isClient) { var run = test.runId(); var collName = "livedata_upsert_collection_"+run; Meteor.call("createInsecureCollection", collName, collectionOptions); - coll = new Meteor.Collection(collName, collectionOptions); + coll = new Mongo.Collection(collName, collectionOptions); Meteor.subscribe("c-" + collName, function () { coll.insert({ _id: "foo" }); coll.insert({ _id: "bar" }); @@ -2012,7 +2012,7 @@ if (Meteor.isClient) { _.each([true, false], function (useUpdate) { Tinytest.addAsync("mongo-livedata - " + (useUpdate ? "update " : "") + "upsert in method, " + idGeneration, function (test, onComplete) { var run = test.runId(); - upsertTestMethodColl = new Meteor.Collection(upsertTestMethod + "_collection_" + run, collectionOptions); + upsertTestMethodColl = new Mongo.Collection(upsertTestMethod + "_collection_" + run, collectionOptions); var m = {}; delete Meteor.connection._methodHandlers[upsertTestMethod]; m[upsertTestMethod] = function (run, useUpdate, options) { @@ -2034,7 +2034,7 @@ _.each(Meteor.isServer ? [true, false] : [true], function (minimongo) { var options = collectionOptions; if (minimongo) options = _.extend({}, collectionOptions, { connection: null }); - var coll = new Meteor.Collection("livedata_upsert_by_id_collection_"+run, options); + var coll = new Mongo.Collection("livedata_upsert_by_id_collection_"+run, options); var ret; ret = upsert(coll, useUpdate, {_id: 'foo'}, {$set: {x: 1}}); @@ -2107,19 +2107,19 @@ _.each(Meteor.isServer ? [true, false] : [true], function (minimongo) { }); // end idGeneration parametrization Tinytest.add('mongo-livedata - rewrite selector', function (test) { - test.equal(Meteor.Collection._rewriteSelector({x: /^o+B/im}), + test.equal(Mongo.Collection._rewriteSelector({x: /^o+B/im}), {x: {$regex: '^o+B', $options: 'im'}}); - test.equal(Meteor.Collection._rewriteSelector({x: {$regex: /^o+B/im}}), + test.equal(Mongo.Collection._rewriteSelector({x: {$regex: /^o+B/im}}), {x: {$regex: '^o+B', $options: 'im'}}); - test.equal(Meteor.Collection._rewriteSelector({x: /^o+B/}), + test.equal(Mongo.Collection._rewriteSelector({x: /^o+B/}), {x: {$regex: '^o+B'}}); - test.equal(Meteor.Collection._rewriteSelector({x: {$regex: /^o+B/}}), + test.equal(Mongo.Collection._rewriteSelector({x: {$regex: /^o+B/}}), {x: {$regex: '^o+B'}}); - test.equal(Meteor.Collection._rewriteSelector('foo'), + test.equal(Mongo.Collection._rewriteSelector('foo'), {_id: 'foo'}); test.equal( - Meteor.Collection._rewriteSelector( + Mongo.Collection._rewriteSelector( {'$or': [ {x: /^o/}, {y: /^p/}, @@ -2136,7 +2136,7 @@ Tinytest.add('mongo-livedata - rewrite selector', function (test) { ); test.equal( - Meteor.Collection._rewriteSelector( + Mongo.Collection._rewriteSelector( {'$or': [ {'$and': [ {x: /^a/i}, @@ -2173,8 +2173,8 @@ Tinytest.add('mongo-livedata - rewrite selector', function (test) { ]} ); - var oid = new Meteor.Collection.ObjectID(); - test.equal(Meteor.Collection._rewriteSelector(oid), + var oid = new Mongo.Collection.ObjectID(); + test.equal(Mongo.Collection._rewriteSelector(oid), {_id: oid}); }); @@ -2191,7 +2191,7 @@ testAsyncMulti('mongo-livedata - specified _id', [ var doc = coll.findOne(); test.equal(doc.name, "foo"); }); - var coll = new Meteor.Collection(this.collectionName); + var coll = new Mongo.Collection(this.collectionName); coll.insert({_id: "foo", name: "foo"}, expect(function (err1, id) { test.equal(id, "foo"); var doc = coll.findOne(); @@ -2370,7 +2370,7 @@ _.each( ['STRING', 'MONGO'], function (idGeneration) { cleanups.push(function (expect) { Meteor.call('dropInsecureCollection', collectionName, expect(function () {})); }); } - var collection = new Meteor.Collection(collectionName, collectionOptions); + var collection = new Mongo.Collection(collectionName, collectionOptions); if (Meteor.isServer) { cleanups.push(function () { collection._dropCollection(); }); } @@ -2406,7 +2406,7 @@ testAsyncMulti('mongo-livedata - empty string _id', [ Meteor.call('createInsecureCollection', self.collectionName); Meteor.subscribe('c-' + self.collectionName, expect()); } - self.coll = new Meteor.Collection(self.collectionName); + self.coll = new Mongo.Collection(self.collectionName); try { self.coll.insert({_id: "", f: "foo"}); test.fail("Insert with an empty _id should fail"); @@ -2439,7 +2439,7 @@ if (Meteor.isServer) { var self = this; Meteor._debug("connection setup"); self.id = Random.id(); - var C = self.C = new Meteor.Collection("ServerMinimongo_" + self.id); + var C = self.C = new Mongo.Collection("ServerMinimongo_" + self.id); C.allow({ insert: function () {return true;}, update: function () {return true;}, @@ -2461,7 +2461,7 @@ if (Meteor.isServer) { function (test, expect) { var self = this; if (self.conn.status().connected) { - self.miniC = new Meteor.Collection("ServerMinimongo_" + self.id, { + self.miniC = new Mongo.Collection("ServerMinimongo_" + self.id, { connection: self.conn }); var exp = expect(function (err) { @@ -2498,7 +2498,7 @@ if (Meteor.isServer) { function (test, expect) { var self = this; self.id = Random.id(); - self.C = new Meteor.Collection("ServerMinimongoObserve_" + self.id); + self.C = new Mongo.Collection("ServerMinimongoObserve_" + self.id); self.events = []; Meteor.publish(self.id, function () { @@ -2514,7 +2514,7 @@ if (Meteor.isServer) { function (test, expect) { var self = this; if (self.conn.status().connected) { - self.miniC = new Meteor.Collection("ServerMinimongoObserve_" + self.id, { + self.miniC = new Mongo.Collection("ServerMinimongoObserve_" + self.id, { connection: self.conn }); var exp = expect(function (err) { @@ -2563,9 +2563,9 @@ if (Meteor.isServer) { Tinytest.addAsync("mongo-livedata - local collections with different connections", function (test, onComplete) { var cname = Random.id(); var cname2 = Random.id(); - var coll1 = new Meteor.Collection(cname); + var coll1 = new Mongo.Collection(cname); var doc = { foo: "bar" }; - var coll2 = new Meteor.Collection(cname2, { connection: null }); + var coll2 = new Mongo.Collection(cname2, { connection: null }); coll2.insert(doc, function (err, id) { test.equal(coll1.find(doc).count(), 0); test.equal(coll2.find(doc).count(), 1); @@ -2575,7 +2575,7 @@ Tinytest.addAsync("mongo-livedata - local collections with different connections Tinytest.addAsync("mongo-livedata - local collection with null connection, w/ callback", function (test, onComplete) { var cname = Random.id(); - var coll1 = new Meteor.Collection(cname, { connection: null }); + var coll1 = new Mongo.Collection(cname, { connection: null }); var doc = { foo: "bar" }; var docId = coll1.insert(doc, function (err, id) { test.equal(docId, id); @@ -2586,7 +2586,7 @@ Tinytest.addAsync("mongo-livedata - local collection with null connection, w/ ca Tinytest.addAsync("mongo-livedata - local collection with null connection, w/o callback", function (test, onComplete) { var cname = Random.id(); - var coll1 = new Meteor.Collection(cname, { connection: null }); + var coll1 = new Mongo.Collection(cname, { connection: null }); var doc = { foo: "bar" }; var docId = coll1.insert(doc); test.equal(coll1.findOne(doc)._id, docId); @@ -2602,7 +2602,7 @@ testAsyncMulti("mongo-livedata - update handles $push with $each correctly", [ Meteor.subscribe('c-' + collectionName, expect()); } - self.collection = new Meteor.Collection(collectionName); + self.collection = new Mongo.Collection(collectionName); self.id = self.collection.insert( {name: 'jens', elements: ['X', 'Y']}, expect(function (err, res) { @@ -2628,7 +2628,7 @@ testAsyncMulti("mongo-livedata - update handles $push with $each correctly", [ if (Meteor.isServer) { Tinytest.add("mongo-livedata - upsert handles $push with $each correctly", function (test) { - var collection = new Meteor.Collection(Random.id()); + var collection = new Mongo.Collection(Random.id()); var result = collection.upsert( {name: 'jens'}, @@ -2662,7 +2662,7 @@ if (Meteor.isServer) { // This is a VERY white-box test. Meteor.isServer && Tinytest.add("mongo-livedata - oplog - _disableOplog", function (test) { var collName = Random.id(); - var coll = new Meteor.Collection(collName); + var coll = new Mongo.Collection(collName); if (MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle) { var observeWithOplog = coll.find({x: 5}) .observeChanges({added: function () {}}); @@ -2677,7 +2677,7 @@ Meteor.isServer && Tinytest.add("mongo-livedata - oplog - _disableOplog", functi Meteor.isServer && Tinytest.add("mongo-livedata - oplog - include selector fields", function (test) { var collName = "includeSelector" + Random.id(); - var coll = new Meteor.Collection(collName); + var coll = new Mongo.Collection(collName); var docId = coll.insert({a: 1, b: [3, 2], c: 'foo'}); test.isTrue(docId); @@ -2719,7 +2719,7 @@ Meteor.isServer && Tinytest.add("mongo-livedata - oplog - include selector field Meteor.isServer && Tinytest.add("mongo-livedata - oplog - transform", function (test) { var collName = "oplogTransform" + Random.id(); - var coll = new Meteor.Collection(collName); + var coll = new Mongo.Collection(collName); var docId = coll.insert({a: 25, x: {x: 5, y: 9}}); test.isTrue(docId); @@ -2759,7 +2759,7 @@ Meteor.isServer && Tinytest.add("mongo-livedata - oplog - transform", function ( Meteor.isServer && Tinytest.add("mongo-livedata - oplog - drop collection", function (test) { var collName = "dropCollection" + Random.id(); - var coll = new Meteor.Collection(collName); + var coll = new Mongo.Collection(collName); var doc1Id = coll.insert({a: 'foo', c: 1}); var doc2Id = coll.insert({b: 'bar'}); @@ -2855,9 +2855,9 @@ testAsyncMulti("mongo-livedata - oplog - update EJSON", [ Meteor.subscribe('c-' + collectionName, expect()); } - self.collection = new Meteor.Collection(collectionName); + self.collection = new Mongo.Collection(collectionName); self.date = new Date; - self.objId = new Meteor.Collection.ObjectID; + self.objId = new Mongo.Collection.ObjectID; self.id = self.collection.insert( {d: self.date, oi: self.objId, @@ -2922,7 +2922,7 @@ testAsyncMulti("mongo-livedata - oplog - update EJSON", [ // Update a date and an ObjectID too. self.date2 = new Date(self.date.valueOf() + 1000); - self.objId2 = new Meteor.Collection.ObjectID; + self.objId2 = new Mongo.Collection.ObjectID; runInFence(function () { self.collection.update( self.id, {$set: {d: self.date2, oi: self.objId2}}, @@ -2951,7 +2951,7 @@ var waitUntilOplogCaughtUp = function () { Meteor.isServer && Tinytest.add("mongo-livedata - cursor dedup stop", function (test) { - var coll = new Meteor.Collection(Random.id()); + var coll = new Mongo.Collection(Random.id()); _.times(100, function () { coll.insert({foo: 'baz'}); }); @@ -2979,7 +2979,7 @@ testAsyncMulti("mongo-livedata - undefined find options", [ }, function (test, expect) { var self = this; - self.coll = new Meteor.Collection(self.collName); + self.coll = new Mongo.Collection(self.collName); self.doc = { foo: 1, bar: 2, _id: "foobar" }; self.coll.insert(self.doc, expect(function (err, id) { test.isFalse(err); @@ -3001,7 +3001,7 @@ testAsyncMulti("mongo-livedata - undefined find options", [ Meteor.isServer && testAsyncMulti("mongo-livedata - observe limit bug", [ function (test, expect) { var self = this; - self.coll = new Meteor.Collection(Random.id()); + self.coll = new Mongo.Collection(Random.id()); var state = {}; var callbacks = { changed: function (newDoc) { diff --git a/packages/mongo/observe_changes_tests.js b/packages/mongo/observe_changes_tests.js index db6d54d4c2..6d64fcb8ba 100644 --- a/packages/mongo/observe_changes_tests.js +++ b/packages/mongo/observe_changes_tests.js @@ -1,8 +1,8 @@ var makeCollection = function () { if (Meteor.isServer) - return new Meteor.Collection(Random.id()); + return new Mongo.Collection(Random.id()); else - return new Meteor.Collection(null); + return new Mongo.Collection(null); }; _.each ([{added:'added', forceOrdered: true}, @@ -265,7 +265,7 @@ if (Meteor.isServer) { function (test, expect) { var self = this; var collName = "cap_" + Random.id(); - var coll = new Meteor.Collection(collName); + var coll = new Mongo.Collection(collName); coll._createCappedCollection(1000000); self.xs = []; self.expects = []; diff --git a/packages/mongo/oplog_tests.js b/packages/mongo/oplog_tests.js index 554df3fe6c..62cc8b3292 100644 --- a/packages/mongo/oplog_tests.js +++ b/packages/mongo/oplog_tests.js @@ -1,4 +1,4 @@ -var OplogCollection = new Meteor.Collection("oplog-" + Random.id()); +var OplogCollection = new Mongo.Collection("oplog-" + Random.id()); Tinytest.add("mongo-livedata - oplog - cursorSupported", function (test) { var oplogEnabled = @@ -16,15 +16,15 @@ Tinytest.add("mongo-livedata - oplog - cursorSupported", function (test) { supported(true, "asdf"); supported(true, 1234); - supported(true, new Meteor.Collection.ObjectID()); + supported(true, new Mongo.Collection.ObjectID()); supported(true, {_id: "asdf"}); supported(true, {_id: 1234}); - supported(true, {_id: new Meteor.Collection.ObjectID()}); + supported(true, {_id: new Mongo.Collection.ObjectID()}); supported(true, {foo: "asdf", bar: 1234, - baz: new Meteor.Collection.ObjectID(), + baz: new Mongo.Collection.ObjectID(), eeney: true, miney: false, moe: null}); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 246b77bc43..99c7a08047 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -51,6 +51,8 @@ Package.on_use(function (api) { // For tests only. api.export('MongoTest', 'server', {testOnly: true}); + api.export("Mongo"); + api.add_files(['mongo_driver.js', 'oplog_tailing.js', 'observe_multiplex.js', 'doc_fetcher.js', 'polling_observe_driver.js','oplog_observe_driver.js'], diff --git a/packages/oauth/pending_credentials.js b/packages/oauth/pending_credentials.js index 54c24f0572..9122a54dec 100644 --- a/packages/oauth/pending_credentials.js +++ b/packages/oauth/pending_credentials.js @@ -11,7 +11,7 @@ // Collection containing pending credentials of oauth credential requests // Has key, credential, and createdAt fields. -OAuth._pendingCredentials = new Meteor.Collection( +OAuth._pendingCredentials = new Mongo.Collection( "meteor_oauth_pendingCredentials", { _preventAutopublish: true }); diff --git a/packages/oauth1/oauth1_pending_request_tokens.js b/packages/oauth1/oauth1_pending_request_tokens.js index ff025a577f..a2ef28568d 100644 --- a/packages/oauth1/oauth1_pending_request_tokens.js +++ b/packages/oauth1/oauth1_pending_request_tokens.js @@ -20,7 +20,7 @@ // Collection containing pending request tokens // Has key, requestToken, requestTokenSecret, and createdAt fields. -OAuth._pendingRequestTokens = new Meteor.Collection( +OAuth._pendingRequestTokens = new Mongo.Collection( "meteor_oauth_pendingRequestTokens", { _preventAutopublish: true }); diff --git a/packages/oauth1/package.js b/packages/oauth1/package.js index 537a0f13be..c057a49d71 100644 --- a/packages/oauth1/package.js +++ b/packages/oauth1/package.js @@ -9,6 +9,7 @@ Package.on_use(function (api) { api.use('oauth', ['client', 'server']); api.use('underscore', 'server'); api.use('http', 'server'); + api.use('mongo', 'server'); api.export('OAuth1Binding', 'server'); api.export('OAuth1Test', 'server', {testOnly: true}); diff --git a/packages/observe-sequence/observe_sequence_tests.js b/packages/observe-sequence/observe_sequence_tests.js index aa168c7a52..7d2837a7ea 100644 --- a/packages/observe-sequence/observe_sequence_tests.js +++ b/packages/observe-sequence/observe_sequence_tests.js @@ -117,7 +117,7 @@ Tinytest.add('observe-sequence - initial data for all sequence types', function ]); runOneObserveSequenceTestCase(test, function () { - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); coll.insert({_id: "37", bar: 2}); var cursor = coll.find({}, {sort: {_id: 1}}); @@ -270,7 +270,7 @@ Tinytest.add('observe-sequence - array to cursor', function (test) { dep.depend(); return seq; }, function () { - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); coll.insert({_id: "38", bar: 2}); var cursor = coll.find({}, {sort: {_id: 1}}); @@ -288,7 +288,7 @@ Tinytest.add('observe-sequence - array to cursor', function (test) { Tinytest.add('observe-sequence - cursor to null', function (test) { var dep = new Tracker.Dependency; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); coll.insert({_id: "37", bar: 2}); var cursor = coll.find({}, {sort: {_id: 1}}); @@ -310,7 +310,7 @@ Tinytest.add('observe-sequence - cursor to null', function (test) { Tinytest.add('observe-sequence - cursor to array', function (test) { var dep = new Tracker.Dependency; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); var cursor = coll.find({}, {sort: {_id: 1}}); var seq = cursor; @@ -332,7 +332,7 @@ Tinytest.add('observe-sequence - cursor to array', function (test) { }); Tinytest.add('observe-sequence - cursor', function (test) { - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", rank: 1}); var cursor = coll.find({}, {sort: {rank: 1}}); var seq = cursor; @@ -363,7 +363,7 @@ Tinytest.add('observe-sequence - cursor', function (test) { Tinytest.add('observe-sequence - cursor to other cursor', function (test) { var dep = new Tracker.Dependency; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); var cursor = coll.find({}, {sort: {_id: 1}}); var seq = cursor; @@ -374,7 +374,7 @@ Tinytest.add('observe-sequence - cursor to other cursor', function (test) { }, function () { coll.insert({_id: "37", bar: 2}); - var newColl = new Meteor.Collection(null); + var newColl = new Mongo.Collection(null); newColl.insert({_id: "13", foo: 1}); newColl.insert({_id: "38", bar: 2}); var newCursor = newColl.find({}, {sort: {_id: 1}}); @@ -395,7 +395,7 @@ Tinytest.add('observe-sequence - cursor to other cursor with transform', functio return _.extend({idCopy: doc._id}, doc); }; - var coll = new Meteor.Collection(null, {transform: transform}); + var coll = new Mongo.Collection(null, {transform: transform}); coll.insert({_id: "13", foo: 1}); var cursor = coll.find({}, {sort: {_id: 1}}); var seq = cursor; @@ -406,7 +406,7 @@ Tinytest.add('observe-sequence - cursor to other cursor with transform', functio }, function () { coll.insert({_id: "37", bar: 2}); - var newColl = new Meteor.Collection(null, {transform: transform}); + var newColl = new Mongo.Collection(null, {transform: transform}); newColl.insert({_id: "13", foo: 1}); newColl.insert({_id: "38", bar: 2}); var newCursor = newColl.find({}, {sort: {_id: 1}}); @@ -422,7 +422,7 @@ Tinytest.add('observe-sequence - cursor to other cursor with transform', functio }); Tinytest.add('observe-sequence - cursor to same cursor', function (test) { - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", rank: 1}); var cursor = coll.find({}, {sort: {rank: 1}}); var seq = cursor; @@ -487,7 +487,7 @@ Tinytest.add('observe-sequence - number arrays', function (test) { Tinytest.add('observe-sequence - cursor to other cursor, same collection', function (test) { var dep = new Tracker.Dependency; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({_id: "13", foo: 1}); coll.insert({_id: "37", foo: 2}); var cursor = coll.find({foo: 1}); diff --git a/packages/reactive-dict/reactive-dict.js b/packages/reactive-dict/reactive-dict.js index bb23f90027..9f4823ba0d 100644 --- a/packages/reactive-dict/reactive-dict.js +++ b/packages/reactive-dict/reactive-dict.js @@ -62,8 +62,8 @@ _.extend(ReactiveDict.prototype, { equals: function (key, value) { var self = this; - // Meteor.Collection.ObjectID is in the 'mongo' package - var ObjectID = Meteor.Collection && Meteor.Collection.ObjectID; + // Mongo.Collection.ObjectID is in the 'mongo' package + var ObjectID = Mongo.Collection && Mongo.Collection.ObjectID; // We don't allow objects (or arrays that might include objects) for // .equals, because JSON.stringify doesn't canonicalize object key diff --git a/packages/service-configuration/service_configuration_common.js b/packages/service-configuration/service_configuration_common.js index a9f6cb64fe..a8318df1b9 100644 --- a/packages/service-configuration/service_configuration_common.js +++ b/packages/service-configuration/service_configuration_common.js @@ -5,7 +5,7 @@ if (typeof ServiceConfiguration === 'undefined') { // Table containing documents with configuration options for each // login service -ServiceConfiguration.configurations = new Meteor.Collection( +ServiceConfiguration.configurations = new Mongo.Collection( "meteor_accounts_loginServiceConfiguration", { _preventAutopublish: true, connection: Meteor.isClient ? Accounts.connection : Meteor.connection diff --git a/packages/session/session_tests.js b/packages/session/session_tests.js index c7c3beb5e1..90b5b484dc 100644 --- a/packages/session/session_tests.js +++ b/packages/session/session_tests.js @@ -85,10 +85,10 @@ Tinytest.add('session - get/set/equals types', function (test) { test.isFalse(Session.equals('date', new Date(3455))); test.isTrue(Session.equals('date', new Date(1234))); - Session.set('oid', new Meteor.Collection.ObjectID('ffffffffffffffffffffffff')); - test.equal(Session.get('oid'), new Meteor.Collection.ObjectID('ffffffffffffffffffffffff')); - test.isFalse(Session.equals('oid', new Meteor.Collection.ObjectID('fffffffffffffffffffffffa'))); - test.isTrue(Session.equals('oid', new Meteor.Collection.ObjectID('ffffffffffffffffffffffff'))); + Session.set('oid', new Mongo.Collection.ObjectID('ffffffffffffffffffffffff')); + test.equal(Session.get('oid'), new Mongo.Collection.ObjectID('ffffffffffffffffffffffff')); + test.isFalse(Session.equals('oid', new Mongo.Collection.ObjectID('fffffffffffffffffffffffa'))); + test.isTrue(Session.equals('oid', new Mongo.Collection.ObjectID('ffffffffffffffffffffffff'))); }); Tinytest.add('session - objects are cloned', function (test) { diff --git a/packages/spacebars-tests/template_tests.js b/packages/spacebars-tests/template_tests.js index 118dee0342..e3953f70c1 100644 --- a/packages/spacebars-tests/template_tests.js +++ b/packages/spacebars-tests/template_tests.js @@ -494,7 +494,7 @@ Tinytest.add("spacebars-tests - template_tests - if in with", function (test) { Tinytest.add("spacebars-tests - template_tests - each on cursor", function (test) { var tmpl = Template.spacebars_template_test_each; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); tmpl.items = function () { return coll.find({}, {sort: {pos: 1}}); }; @@ -566,10 +566,10 @@ Tinytest.add("spacebars-tests - template_tests - select tags", function (test) { var tmpl = Template.spacebars_template_test_select_tag; // {label: (string)} - var optgroups = new Meteor.Collection(null); + var optgroups = new Mongo.Collection(null); // {optgroup: (id), value: (string), selected: (boolean), label: (string)} - var options = new Meteor.Collection(null); + var options = new Mongo.Collection(null); tmpl.optgroups = function () { return optgroups.find(); }; tmpl.options = function () { return options.find({optgroup: this._id}); }; @@ -802,7 +802,7 @@ Tinytest.add('spacebars-tests - template_tests - textarea each', function (test) // callbacks don't fire synchronously as part of a method stub. testAsyncMulti('spacebars-tests - template_tests - defer in rendered callbacks', [function (test, expect) { var tmpl = Template.spacebars_template_test_defer_in_rendered; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); Meteor.methods({ spacebarsTestInsertEmptyObject: function () { @@ -887,7 +887,7 @@ Tinytest.add('spacebars-tests - template_tests - with someData', function (test) Tinytest.add('spacebars-tests - template_tests - #each stops when rendered element is removed', function (test) { var tmpl = Template.spacebars_template_test_each_stops; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); coll.insert({}); tmpl.items = function () { return coll.find(); }; @@ -906,7 +906,7 @@ Tinytest.add('spacebars-tests - template_tests - #each stops when rendered eleme Tinytest.add('spacebars-tests - template_tests - block helpers in attribute', function (test) { var tmpl = Template.spacebars_template_test_block_helpers_in_attribute; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); tmpl.classes = function () { return coll.find({}, {sort: {name: 1}}); }; @@ -2050,7 +2050,7 @@ Tinytest.add( "spacebars-tests - template_tests - each with inserts inside autorun", function (test) { var tmpl = Template.spacebars_test_each_with_autorun_insert; - var coll = new Meteor.Collection(null); + var coll = new Mongo.Collection(null); var rv = new ReactiveVar; tmpl.items = function () { diff --git a/packages/star-translate/.npm/package/.gitignore b/packages/star-translate/.npm/package/.gitignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/packages/star-translate/.npm/package/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/packages/star-translate/.npm/package/README b/packages/star-translate/.npm/package/README deleted file mode 100644 index 3d492553a4..0000000000 --- a/packages/star-translate/.npm/package/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory and the files immediately inside it are automatically generated -when you change this package's NPM dependencies. Commit the files in this -directory (npm-shrinkwrap.json, .gitignore, and this README) to source control -so that others run the same versions of sub-dependencies. - -You should NOT check in the node_modules directory that Meteor automatically -creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/star-translate/.npm/package/npm-shrinkwrap.json b/packages/star-translate/.npm/package/npm-shrinkwrap.json deleted file mode 100644 index 070620ecc8..0000000000 --- a/packages/star-translate/.npm/package/npm-shrinkwrap.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": { - "ncp": { - "version": "0.4.2" - } - } -} diff --git a/packages/stylus/.npm/plugin/compileStylus/npm-shrinkwrap.json b/packages/stylus/.npm/plugin/compileStylus/npm-shrinkwrap.json index b04c343ccb..8cedd574f8 100644 --- a/packages/stylus/.npm/plugin/compileStylus/npm-shrinkwrap.json +++ b/packages/stylus/.npm/plugin/compileStylus/npm-shrinkwrap.json @@ -13,7 +13,12 @@ "version": "0.3.5" }, "debug": { - "version": "0.7.4" + "version": "1.0.4", + "dependencies": { + "ms": { + "version": "0.6.2" + } + } }, "sax": { "version": "0.5.8" @@ -32,7 +37,7 @@ "version": "0.3.5" }, "debug": { - "version": "1.0.1", + "version": "1.0.4", "dependencies": { "ms": { "version": "0.6.2" diff --git a/packages/webapp/.npm/package/npm-shrinkwrap.json b/packages/webapp/.npm/package/npm-shrinkwrap.json index dc8dc414d6..1c39d6e392 100644 --- a/packages/webapp/.npm/package/npm-shrinkwrap.json +++ b/packages/webapp/.npm/package/npm-shrinkwrap.json @@ -15,6 +15,17 @@ "cookie": { "version": "0.1.0" }, + "send": { + "version": "0.1.4", + "dependencies": { + "mime": { + "version": "1.2.11" + }, + "range-parser": { + "version": "0.0.4" + } + } + }, "bytes": { "version": "0.2.0" }, @@ -28,7 +39,12 @@ "version": "0.0.2" }, "debug": { - "version": "0.7.2" + "version": "1.0.4", + "dependencies": { + "ms": { + "version": "0.6.2" + } + } }, "methods": { "version": "0.0.1" @@ -37,7 +53,21 @@ "version": "2.1.8", "dependencies": { "readable-stream": { - "version": "1.0.17" + "version": "1.0.31", + "dependencies": { + "core-util-is": { + "version": "1.0.1" + }, + "isarray": { + "version": "0.0.1" + }, + "string_decoder": { + "version": "0.10.31" + }, + "inherits": { + "version": "2.0.1" + } + } }, "stream-counter": { "version": "0.1.0" @@ -50,7 +80,12 @@ "version": "0.1.4", "dependencies": { "debug": { - "version": "0.7.2" + "version": "1.0.4", + "dependencies": { + "ms": { + "version": "0.6.2" + } + } }, "mime": { "version": "1.2.11" diff --git a/tools/auth.js b/tools/auth.js index fad3c40619..80b90d501d 100644 --- a/tools/auth.js +++ b/tools/auth.js @@ -1049,7 +1049,7 @@ exports.getAccountsConfiguration = function (conn) { // Subscribe to the package server's service configurations so that we // can get the OAuth client ID to kick off the OAuth flow. var Package = getLoadedPackages(); - var serviceConfigurations = new Package.meteor.Meteor.Collection( + var serviceConfigurations = new Package.meteor.Mongo.Collection( 'meteor_accounts_loginServiceConfiguration', { connection: conn.connection } ); diff --git a/tools/tests/apps/failover-test/server/failover-test.js b/tools/tests/apps/failover-test/server/failover-test.js index 1b704d1e12..fe485a7d09 100644 --- a/tools/tests/apps/failover-test/server/failover-test.js +++ b/tools/tests/apps/failover-test/server/failover-test.js @@ -6,7 +6,7 @@ // Prints various things. On success, prints SUCCESS and exits 0. On failure, // exits non-0. -var C = new Meteor.Collection(Random.id()); +var C = new Mongo.Collection(Random.id()); var steps = {}; var nextStepTimeout = null; diff --git a/tools/tests/apps/hot-code-push-test/hot-code-push-test.js b/tools/tests/apps/hot-code-push-test/hot-code-push-test.js index e9e66d2631..792b563d6f 100644 --- a/tools/tests/apps/hot-code-push-test/hot-code-push-test.js +++ b/tools/tests/apps/hot-code-push-test/hot-code-push-test.js @@ -15,4 +15,4 @@ if (Meteor.isServer) { console.log("jsVar: " + jsVar); } }); -} \ No newline at end of file +} diff --git a/tools/tests/apps/once/once.js b/tools/tests/apps/once/once.js index 8791c8d171..dcc357aca0 100644 --- a/tools/tests/apps/once/once.js +++ b/tools/tests/apps/once/once.js @@ -13,7 +13,7 @@ if (process.env.RUN_ONCE_OUTCOME === "hang") { } if (process.env.RUN_ONCE_OUTCOME === "mongo") { - var test = new Meteor.Collection('test'); + var test = new Mongo.Collection('test'); test.insert({ value: 86 }); process.exit(test.findOne().value); }