mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix docs and self-test
This commit is contained in:
@@ -40,7 +40,7 @@ Template.autoApiBox.helpers({
|
||||
} else if (name === "MongoSelector") {
|
||||
return [
|
||||
typeLink("Mongo Selector", "selectors"),
|
||||
typeLink("Object ID", "collection_object_id"),
|
||||
typeLink("Object ID", "mongo_object_id"),
|
||||
"String"
|
||||
];
|
||||
} else if (name === "MongoModifier") {
|
||||
|
||||
@@ -61,7 +61,7 @@ two parameters: the name of the record set, and a *publish function*
|
||||
that Meteor will call each time a client subscribes to the name.
|
||||
|
||||
Publish functions can return a
|
||||
[`Collection.Cursor`](#meteor_collection_cursor), in which case Meteor
|
||||
[`Collection.Cursor`](#mongo_cursor), in which case Meteor
|
||||
will publish that cursor's documents to each subscribed client. You can
|
||||
also return an array of `Collection.Cursor`s, in which case Meteor will
|
||||
publish all of the cursors.
|
||||
@@ -199,11 +199,11 @@ publish handler, this is the place to stop the observes.
|
||||
|
||||
When you subscribe to a record set, it tells the server to send records to the
|
||||
client. The client stores these records in local [Minimongo
|
||||
collections](#meteor_collection), with the same name as the `collection`
|
||||
collections](#mongo_collection), with the same name as the `collection`
|
||||
argument used in the publish handler's [`added`](#publish_added),
|
||||
[`changed`](#publish_changed), and [`removed`](#publish_removed)
|
||||
callbacks. Meteor will queue incoming records until you declare the
|
||||
[`Mongo.Collection`](#meteor_collection) on the client with the matching
|
||||
[`Mongo.Collection`](#mongo_collection) on the client with the matching
|
||||
collection name.
|
||||
|
||||
// okay to subscribe (and possibly receive data) before declaring
|
||||
@@ -1084,12 +1084,12 @@ it checks the collection's `allow` rules. Meteor allows the write only
|
||||
if no `deny` rules return `true` and at least one `allow` rule returns
|
||||
`true`.
|
||||
|
||||
<h2 id="meteor_collection_cursor"><span>Cursors</span></h2>
|
||||
<h2 id="mongo_cursor"><span>Cursors</span></h2>
|
||||
|
||||
To create a cursor, use [`find`](#find). To access the documents in a
|
||||
cursor, use [`forEach`](#foreach), [`map`](#map), or [`fetch`](#fetch).
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#forEach"}}
|
||||
{{> autoApiBox "Mongo.Cursor#forEach"}}
|
||||
|
||||
This interface is compatible with [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
|
||||
|
||||
@@ -1106,7 +1106,7 @@ Examples:
|
||||
count += 1;
|
||||
});
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#map"}}
|
||||
{{> autoApiBox "Mongo.Cursor#map"}}
|
||||
|
||||
This interface is compatible with [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
|
||||
|
||||
@@ -1119,18 +1119,18 @@ On the server, if `callback` yields, other calls to `callback` may occur while
|
||||
the first call is waiting. If strict sequential execution is necessary, use
|
||||
`forEach` instead.
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#fetch"}}
|
||||
{{> autoApiBox "Mongo.Cursor#fetch"}}
|
||||
|
||||
When called from a reactive computation, `fetch` registers dependencies on
|
||||
the matching documents.
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#count"}}
|
||||
{{> autoApiBox "Mongo.Cursor#count"}}
|
||||
|
||||
Unlike the other functions, `count` registers a dependency only on the
|
||||
number of matching documents. (Updates that just change or reorder the
|
||||
documents in the result set will not trigger a recomputation.)
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#observe"}}
|
||||
{{> autoApiBox "Mongo.Cursor#observe"}}
|
||||
|
||||
Establishes a *live query* that invokes callbacks when the result of
|
||||
the query changes. The callbacks receive the entire contents of the
|
||||
@@ -1195,7 +1195,7 @@ only deliver the initial results and will not call any further callbacks;
|
||||
it is not necessary to call `stop` on the handle.)
|
||||
|
||||
|
||||
{{> autoApiBox "Mongo.Collection.Cursor#observeChanges"}}
|
||||
{{> autoApiBox "Mongo.Cursor#observeChanges"}}
|
||||
|
||||
Establishes a *live query* that invokes callbacks when the result of
|
||||
the query changes. In contrast to [`observe`](#observe),
|
||||
@@ -1294,7 +1294,7 @@ that needs to deal with `_id` fields that may be either strings or `ObjectID`s,
|
||||
{{> apiBoxTitle name="Mongo-Style Selectors" id="selectors"}}
|
||||
|
||||
The simplest selectors are just a string or
|
||||
[`Mongo.ObjectID`](#collection_object_id). These selectors match the
|
||||
[`Mongo.ObjectID`](#mongo_object_id). These selectors match the
|
||||
document with that value in its `_id` field.
|
||||
|
||||
A slightly more complex form of selector is an object containing a set of keys
|
||||
@@ -3206,7 +3206,7 @@ types, as well as:
|
||||
- **Binary** (JavaScript `Uint8Array` or the
|
||||
result of [`EJSON.newBinary`](#ejson_new_binary))
|
||||
- **User-defined types** (see [`EJSON.addType`](#ejson_add_type). For example,
|
||||
[`Mongo.ObjectID`](#collection_object_id) is implemented this way.)
|
||||
[`Mongo.ObjectID`](#mongo_object_id) is implemented this way.)
|
||||
|
||||
All EJSON serializations are also valid JSON. For example an object with a date
|
||||
and a binary buffer would be serialized in EJSON as:
|
||||
@@ -3269,7 +3269,7 @@ default implementations are not sufficient.
|
||||
{{> api_box ejsonTypeToJSONValue}}
|
||||
|
||||
For example, the `toJSONValue` method for
|
||||
[`Mongo.ObjectID`](#collection_object_id) could be:
|
||||
[`Mongo.ObjectID`](#mongo_object_id) could be:
|
||||
|
||||
function () {
|
||||
return this.toHexString();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -176,7 +176,7 @@ var toc = [
|
||||
{instance: "collection", name: "deny"}
|
||||
],
|
||||
|
||||
"Mongo.Collection.Cursor", [
|
||||
"Mongo.Cursor", [
|
||||
{instance: "cursor", name: "forEach"},
|
||||
{instance: "cursor", name: "map"},
|
||||
{instance: "cursor", name: "fetch"},
|
||||
|
||||
@@ -11,8 +11,8 @@ nameToId = {
|
||||
"Meteor.user": "meteor_user",
|
||||
"Meteor.userId": "meteor_userid",
|
||||
"Meteor.loggingIn": "meteor_loggingin",
|
||||
"Mongo.Collection.Cursor#observe": "observe",
|
||||
"Mongo.Collection.Cursor#observeChanges": "observe_changes",
|
||||
"Mongo.Cursor#observe": "observe",
|
||||
"Mongo.Cursor#observeChanges": "observe_changes",
|
||||
"Subscription#added": "publish_added",
|
||||
"Subscription#changed": "publish_changed",
|
||||
"Subscription#removed": "publish_removed",
|
||||
@@ -32,9 +32,9 @@ nameToId = {
|
||||
"Meteor.publish": "meteor_publish",
|
||||
"Mongo.Collection#deny": "deny",
|
||||
"Mongo.Collection#upsert": "upsert",
|
||||
"Mongo.Collection.Cursor#forEach": "foreach",
|
||||
"Mongo.Collection.Cursor#map": "map",
|
||||
"Mongo.Collection.Cursor#fetch": "fetch",
|
||||
"Mongo.Cursor#forEach": "foreach",
|
||||
"Mongo.Cursor#map": "map",
|
||||
"Mongo.Cursor#fetch": "fetch",
|
||||
"EJSON.equals": "ejson_equals",
|
||||
"Mongo.Collection#findOne": "findone",
|
||||
"Session.get": "session_get",
|
||||
@@ -78,7 +78,7 @@ nameToId = {
|
||||
"MethodInvocation#setUserId": "method_setUserId",
|
||||
"MethodInvocation#isSimulation": "method_issimulation",
|
||||
"MethodInvocation#connection": "method_connection",
|
||||
"Mongo.Collection.Cursor#count": "count",
|
||||
"Mongo.Cursor#count": "count",
|
||||
"Session.setDefault": "session_set_default",
|
||||
"Meteor.logout": "meteor_logout",
|
||||
"Meteor.logoutOtherClients": "meteor_logoutotherclients",
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
"Mongo.Collection#remove",
|
||||
"Mongo.Collection#update",
|
||||
"Mongo.Collection#upsert",
|
||||
"Mongo.Collection.Cursor",
|
||||
"Mongo.Collection.Cursor#count",
|
||||
"Mongo.Collection.Cursor#fetch",
|
||||
"Mongo.Collection.Cursor#forEach",
|
||||
"Mongo.Collection.Cursor#map",
|
||||
"Mongo.Collection.Cursor#observe",
|
||||
"Mongo.Collection.Cursor#observeChanges",
|
||||
"Mongo.Cursor",
|
||||
"Mongo.Cursor#count",
|
||||
"Mongo.Cursor#fetch",
|
||||
"Mongo.Cursor#forEach",
|
||||
"Mongo.Cursor#map",
|
||||
"Mongo.Cursor#observe",
|
||||
"Mongo.Cursor#observeChanges",
|
||||
"Mongo.ObjectID",
|
||||
"Session.equals",
|
||||
"Session.get",
|
||||
|
||||
@@ -14,7 +14,7 @@ Mongo = {};
|
||||
* @param {String} options.idGeneration The method of generating the `_id` fields of new documents in this collection. Possible values:
|
||||
|
||||
- **`'STRING'`**: random strings
|
||||
- **`'MONGO'`**: random [`Mongo.ObjectID`](#collection_object_id) values
|
||||
- **`'MONGO'`**: random [`Mongo.ObjectID`](#mongo_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.
|
||||
|
||||
@@ -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.Mongo.Collection(
|
||||
var serviceConfigurations = new Package.mongo.Mongo.Collection(
|
||||
'meteor_accounts_loginServiceConfiguration',
|
||||
{ connection: conn.connection }
|
||||
);
|
||||
|
||||
@@ -710,7 +710,7 @@ _.extend(Sandbox.prototype, {
|
||||
catalog.official.refresh();
|
||||
});
|
||||
_.each(
|
||||
['autopublish', 'standard-app-packages', 'insecure'],
|
||||
['autopublish', 'meteor-platform', 'insecure'],
|
||||
function (name) {
|
||||
var versionRec = doOrThrow(function () {
|
||||
return catalog.official.getLatestMainlineVersion(name);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
autopublish
|
||||
insecure
|
||||
jquery
|
||||
jquery
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
underscore
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
npm-test
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
#
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
local-package
|
||||
local-package
|
||||
|
||||
@@ -1 +1 @@
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
meteor-platform
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
application-configuration@1.0.0
|
||||
autopublish@1.0.0
|
||||
autoupdate@1.0.4
|
||||
autoupdate@1.0.6-rc0
|
||||
binary-heap@1.0.0
|
||||
blaze-tools@1.0.0
|
||||
blaze@1.0.3
|
||||
blaze@2.0.0-rc0
|
||||
callback-hook@1.0.0
|
||||
check@1.0.0
|
||||
ctl-helper@1.0.2
|
||||
ctl@1.0.0
|
||||
deps@1.0.1
|
||||
ejson@1.0.0
|
||||
ddp@1.0.7
|
||||
ejson@1.0.1-rc0
|
||||
follower-livedata@1.0.0
|
||||
geojson-utils@1.0.0
|
||||
html-tools@1.0.0
|
||||
@@ -18,25 +18,26 @@ id-map@1.0.0
|
||||
insecure@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
meteor-platform@1.0.1-rc0
|
||||
meteor@1.0.3-rc0
|
||||
minifiers@1.0.2
|
||||
minimongo@1.0.1
|
||||
mongo-livedata@1.0.3
|
||||
observe-sequence@1.0.1
|
||||
minimongo@1.0.2-rc0
|
||||
mongo@1.0.3
|
||||
observe-sequence@1.0.2-rc0
|
||||
ordered-dict@1.0.0
|
||||
random@1.0.0
|
||||
reactive-dict@1.0.0
|
||||
reactive-dict@1.0.1-rc0
|
||||
reactive-var@1.0.1-rc0
|
||||
reload@1.0.0
|
||||
retry@1.0.0
|
||||
routepolicy@1.0.0
|
||||
session@1.0.0
|
||||
spacebars-compiler@1.0.1
|
||||
spacebars@1.0.0
|
||||
standard-app-packages@1.0.0
|
||||
templating@1.0.4
|
||||
session@1.0.1-rc0
|
||||
spacebars-compiler@1.0.2-rc0
|
||||
spacebars@1.0.1-rc0
|
||||
standard-app-packages@1.0.1-rc0
|
||||
templating@1.0.5-rc0
|
||||
test-package@1.0.0
|
||||
ui@1.0.0
|
||||
tracker@1.0.2-rc1
|
||||
underscore@1.0.0
|
||||
webapp@1.0.2
|
||||
webapp@1.0.3-rc0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"dependencies": [
|
||||
[
|
||||
"meteor",
|
||||
"1.0.2"
|
||||
"1.0.3-rc0"
|
||||
],
|
||||
[
|
||||
"underscore",
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
application-configuration@1.0.0
|
||||
autopublish@1.0.0
|
||||
autoupdate@1.0.4
|
||||
autoupdate@1.0.6-rc0
|
||||
binary-heap@1.0.0
|
||||
blaze-tools@1.0.0
|
||||
blaze@1.0.3
|
||||
blaze@2.0.0-rc0
|
||||
callback-hook@1.0.0
|
||||
check@1.0.0
|
||||
ctl-helper@1.0.2
|
||||
ctl@1.0.0
|
||||
deps@1.0.1
|
||||
ejson@1.0.0
|
||||
ddp@1.0.7
|
||||
ejson@1.0.1-rc0
|
||||
follower-livedata@1.0.0
|
||||
geojson-utils@1.0.0
|
||||
html-tools@1.0.0
|
||||
@@ -18,25 +18,26 @@ id-map@1.0.0
|
||||
insecure@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
meteor-platform@1.0.1-rc0
|
||||
meteor@1.0.3-rc0
|
||||
minifiers@1.0.2
|
||||
minimongo@1.0.1
|
||||
mongo-livedata@1.0.3
|
||||
observe-sequence@1.0.1
|
||||
minimongo@1.0.2-rc0
|
||||
mongo@1.0.3
|
||||
observe-sequence@1.0.2-rc0
|
||||
ordered-dict@1.0.0
|
||||
preserve-inputs@1.0.0
|
||||
random@1.0.0
|
||||
reactive-dict@1.0.0
|
||||
reactive-dict@1.0.1-rc0
|
||||
reactive-var@1.0.1-rc0
|
||||
reload@1.0.0
|
||||
retry@1.0.0
|
||||
routepolicy@1.0.0
|
||||
session@1.0.0
|
||||
spacebars-compiler@1.0.1
|
||||
spacebars@1.0.0
|
||||
standard-app-packages@1.0.0
|
||||
templating@1.0.4
|
||||
ui@1.0.0
|
||||
session@1.0.1-rc0
|
||||
spacebars-compiler@1.0.2-rc0
|
||||
spacebars@1.0.1-rc0
|
||||
standard-app-packages@1.0.1-rc0
|
||||
templating@1.0.5-rc0
|
||||
tracker@1.0.2-rc1
|
||||
underscore@1.0.0
|
||||
webapp@1.0.2
|
||||
webapp@1.0.3-rc0
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
application-configuration@1.0.0
|
||||
autoupdate@1.0.4
|
||||
autoupdate@1.0.6-rc0
|
||||
binary-heap@1.0.0
|
||||
blaze-tools@1.0.0
|
||||
blaze@1.0.3
|
||||
blaze@2.0.0-rc0
|
||||
callback-hook@1.0.0
|
||||
check@1.0.0
|
||||
ctl-helper@1.0.2
|
||||
ctl@1.0.0
|
||||
deps@1.0.1
|
||||
ejson@1.0.0
|
||||
ddp@1.0.7
|
||||
ejson@1.0.1-rc0
|
||||
follower-livedata@1.0.0
|
||||
geojson-utils@1.0.0
|
||||
html-tools@1.0.0
|
||||
@@ -16,24 +16,25 @@ htmljs@1.0.0
|
||||
id-map@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
meteor-platform@1.0.1-rc0
|
||||
meteor@1.0.3-rc0
|
||||
minifiers@1.0.2
|
||||
minimongo@1.0.1
|
||||
mongo-livedata@1.0.3
|
||||
observe-sequence@1.0.1
|
||||
minimongo@1.0.2-rc0
|
||||
mongo@1.0.3
|
||||
observe-sequence@1.0.2-rc0
|
||||
ordered-dict@1.0.0
|
||||
random@1.0.0
|
||||
reactive-dict@1.0.0
|
||||
reactive-dict@1.0.1-rc0
|
||||
reactive-var@1.0.1-rc0
|
||||
reload@1.0.0
|
||||
retry@1.0.0
|
||||
routepolicy@1.0.0
|
||||
session@1.0.0
|
||||
spacebars-compiler@1.0.1
|
||||
spacebars@1.0.0
|
||||
standard-app-packages@1.0.0
|
||||
templating@1.0.4
|
||||
ui@1.0.0
|
||||
session@1.0.1-rc0
|
||||
spacebars-compiler@1.0.2-rc0
|
||||
spacebars@1.0.1-rc0
|
||||
standard-app-packages@1.0.1-rc0
|
||||
templating@1.0.5-rc0
|
||||
tracker@1.0.2-rc1
|
||||
underscore@1.0.0
|
||||
webapp@1.0.2
|
||||
webapp@1.0.3-rc0
|
||||
|
||||
@@ -18,7 +18,7 @@ var password = "testtest";
|
||||
// sand: a sandbox, that has the main app directory as its cwd.
|
||||
// packages: an array of packages in order. Packages can be of the form:
|
||||
//
|
||||
// standard-app-packages (ie: name), in which case this will match any
|
||||
// meteor-platform (ie: name), in which case this will match any
|
||||
// version of that package as long as it is included.
|
||||
//
|
||||
// awesome-pack@1.0.0 (ie: name@version) to match that name at that
|
||||
@@ -50,7 +50,7 @@ var checkPackages = function(sand, packages) {
|
||||
// sand: a sandbox, that has the main app directory as its cwd.
|
||||
// packages: an array of packages in order. Packages can be of the form:
|
||||
//
|
||||
// standard-app-packages (ie: name), in which case this will match any
|
||||
// meteor-platform (ie: name), in which case this will match any
|
||||
// version of that package as long as it is included. This is for packages
|
||||
// external to the app, since we don't want this test to fail when we push a
|
||||
// new version.
|
||||
@@ -105,7 +105,7 @@ selftest.define("change packages during hot code push", [], function () {
|
||||
run.match("running at");
|
||||
run.match("localhost");
|
||||
// Add the local package 'say-something'. It should print a message.
|
||||
s.write(".meteor/packages", "standard-app-packages \n say-something");
|
||||
s.write(".meteor/packages", "meteor-platform \n say-something");
|
||||
run.waitSecs(3);
|
||||
run.match("initial");
|
||||
run.match("restarted");
|
||||
@@ -119,7 +119,7 @@ selftest.define("change packages during hot code push", [], function () {
|
||||
run.match("restarted");
|
||||
|
||||
// Add a local package depends-on-plugin.
|
||||
s.write(".meteor/packages", "standard-app-packages \n depends-on-plugin");
|
||||
s.write(".meteor/packages", "meteor-platform \n depends-on-plugin");
|
||||
run.waitSecs(2);
|
||||
run.match("foobar");
|
||||
run.match("restarted");
|
||||
@@ -151,14 +151,14 @@ selftest.define("change packages during hot code push", [], function () {
|
||||
run.match("restarted");
|
||||
|
||||
// Switch back to say-something for a moment.
|
||||
s.write(".meteor/packages", "standard-app-packages \n say-something");
|
||||
s.write(".meteor/packages", "meteor-platform \n say-something");
|
||||
run.waitSecs(3);
|
||||
run.match("another");
|
||||
run.match("restarted");
|
||||
run.stop();
|
||||
|
||||
s.rename('packages/say-something', 'packages/shout-something');
|
||||
s.write(".meteor/packages", "standard-app-packages \n shout-something");
|
||||
s.write(".meteor/packages", "meteor-platform \n shout-something");
|
||||
s.cd("packages/shout-something", function () {
|
||||
s.write("foo.js", "console.log(\"louder\");");
|
||||
});
|
||||
@@ -210,7 +210,7 @@ selftest.define("add packages to app", ["net"], function () {
|
||||
run.expectExit(0);
|
||||
|
||||
checkPackages(s,
|
||||
["standard-app-packages", "accounts-base"]);
|
||||
["meteor-platform", "accounts-base"]);
|
||||
|
||||
run = s.run("--once");
|
||||
|
||||
@@ -219,7 +219,7 @@ selftest.define("add packages to app", ["net"], function () {
|
||||
run.expectExit(0);
|
||||
|
||||
checkPackages(s,
|
||||
["standard-app-packages", "accounts-base", "say-something@1.0.0"]);
|
||||
["meteor-platform", "accounts-base", "say-something@1.0.0"]);
|
||||
|
||||
run = s.run("add", "depends-on-plugin");
|
||||
run.match(" added");
|
||||
@@ -227,19 +227,19 @@ selftest.define("add packages to app", ["net"], function () {
|
||||
run.expectExit(0);
|
||||
|
||||
checkPackages(s,
|
||||
["standard-app-packages", "accounts-base",
|
||||
["meteor-platform", "accounts-base",
|
||||
"say-something@1.0.0", "depends-on-plugin"]);
|
||||
|
||||
checkVersions(s,
|
||||
["accounts-base", "depends-on-plugin",
|
||||
"say-something", "standard-app-packages",
|
||||
"say-something", "meteor-platform",
|
||||
"contains-plugin@1.1.0"]);
|
||||
|
||||
run = s.run("remove", "say-something");
|
||||
run.match("Removed top-level dependency on say-something.");
|
||||
checkVersions(s,
|
||||
["accounts-base", "depends-on-plugin",
|
||||
"standard-app-packages",
|
||||
"meteor-platform",
|
||||
"contains-plugin"]);
|
||||
|
||||
run = s.run("remove", "depends-on-plugin");
|
||||
@@ -249,9 +249,9 @@ selftest.define("add packages to app", ["net"], function () {
|
||||
|
||||
checkVersions(s,
|
||||
["accounts-base",
|
||||
"standard-app-packages"]);
|
||||
"meteor-platform"]);
|
||||
run = s.run("list");
|
||||
run.match("standard-app-packages");
|
||||
run.match("meteor-platform");
|
||||
run.match("accounts-base");
|
||||
|
||||
// Add packages to sub-programs of an app. Make sure that the correct change
|
||||
@@ -260,13 +260,13 @@ selftest.define("add packages to app", ["net"], function () {
|
||||
|
||||
// Don't add the file to packages.
|
||||
run = s.run("list");
|
||||
run.match("standard-app-packages");
|
||||
run.match("meteor-platform");
|
||||
run.match("accounts-base");
|
||||
|
||||
// Do add the file to versions.
|
||||
checkVersions(s,
|
||||
["accounts-base", "depends-on-plugin",
|
||||
"standard-app-packages",
|
||||
"meteor-platform",
|
||||
"contains-plugin"]);
|
||||
|
||||
// Add a description-less package. Check that no weird things get
|
||||
@@ -609,7 +609,7 @@ selftest.define("talk to package server with expired or no accounts token", ['ne
|
||||
run.write("testtest\n");
|
||||
run.waitSecs(15);
|
||||
// The 'test' user should not be a maintainer of
|
||||
// standard-app-packages. So this command should fail.
|
||||
// meteor-platform. So this command should fail.
|
||||
run.matchErr("You are not an authorized maintainer");
|
||||
run.expectExit(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user