Commit Graph

22356 Commits

Author SHA1 Message Date
David Glasser
ed0e84c4c8 Don't allow stubs to mutate method parameters. Fixes #640. 2013-01-28 17:32:00 -08:00
Naomi Seyfer
3991827a9d Made a version of diffQuery ordered that uses the observeChanges callback structure 2013-01-28 17:23:39 -08:00
Naomi Seyfer
19849adbe4 Function for iteration over pairs of adjacent items 2013-01-28 15:26:04 -08:00
Naomi Seyfer
5e400d373b draft of a changes-enabled version of diff.js 2013-01-28 15:25:16 -08:00
Avital Oliver
b2cc217cfb Exit meteor run --once on bundler crash 2013-01-28 13:40:02 -08:00
Avital Oliver
1fa2006eb7 Fix standalone tests for the 'stream' package 2013-01-28 13:39:47 -08:00
Avital Oliver
6745745643 Fix #203: support less @import directives 2013-01-25 18:48:04 -08:00
Avital Oliver
d2319bc134 Wrap some CLI functions in a Fiber 2013-01-25 18:48:04 -08:00
Avital Oliver
2551d88014 minor rename 2013-01-25 16:29:30 -08:00
Naomi Seyfer
06c0d7b216 Undoing David comments to spark, probably not switching over to OC 2013-01-25 16:09:04 -08:00
Naomi Seyfer
f65b5c738d ordered dictionary, for eventual use in observeChanges->observe 2013-01-25 16:07:14 -08:00
Avital Oliver
06f1308b4b Reorg facebook_server.js 2013-01-25 15:57:34 -08:00
Morten N.O. Nørgaard Henriksen
a404490ceb Update packages/accounts-facebook/facebook_server.js - add expiresAt 2013-01-25 15:56:19 -08:00
Naomi Seyfer
c10c7f7c91 Binary support in BSON (dev bundle wise) and in Mongo
Unfortunately, the Node Mongo driver wants to use its own proprietary
Binary type for binary data.  We want to use Uint8Array, instead, so
we're going to be using a patched version of the BSON library that
allows this.

It allows us to install a handler for USER_DEFINED binary types, which
in our case we set up to recognize, accept, and provide Uint8Array
2013-01-24 14:47:37 -08:00
Naomi Seyfer
7b5d388746 Cleaning up and comment-documenting callback_logger.js
Specifically, cleaning & documenting the way that it can run either sync or
async (but only in node.js)
2013-01-22 14:26:43 -08:00
Naomi Seyfer
9506846da7 Switching cursor publishing to observeChanges 2013-01-22 11:53:27 -08:00
Naomi Seyfer
378e7c9fe5 Changes to observeChanges tests now actually work right 2013-01-22 11:05:52 -08:00
Naomi Seyfer
65bec10df5 Moving and rehashing tests for observeChanges.
Now that the tests exist on both client and server, they want to be
able to be asynchronous.  Sadly, the current idiom to do this is
somewhat lacking, so I kind of wrote another prototype idiom.

In this world, we use a callback expecter that has been woven in
to a fiber.  Calling a callback, or timeouts, can wake up the fiber
and make it check if it is time to expect a thing.
2013-01-21 22:59:16 -08:00
Mark van Straten
cb78d24ee3 Fix for allowing piping of password to deploy
When piping password from bash $echo MYPASSWD | meteor deploy MYSITE stdin.setRawMode() is not available. Check availability before calling.
2013-01-18 19:05:15 -08:00
xenolf
9e66735cec update bootstrap to 2.2.2 2013-01-18 19:05:02 -08:00
Andrew Wilcox
a8349f3973 Fix exclusion of favicon.ico and robots.txt on Windows.
The use of path.sep is incorrect because req.url is a URL, not a file
path, and so always contains forward slashes.

I verified that the original code does not work on Windows and that
the new code does.
2013-01-18 19:04:32 -08:00
Naomi Seyfer
89433b5924 Observe changes implemented on top of observe; light testing 2013-01-18 02:58:22 -05:00
David Glasser
f3d5ba81e7 Cleanup after a grand surgery that removed exploratory changes to minimongo from ddp-pre1.
(The exploratory work is captured on ddp-pre1-exploratory-minimongo-observe.)
2013-01-17 16:27:51 -05:00
David Glasser
86e4f9b00f EJSON: fix error in recursive EJSON.equals with keyOrderSensitive. removed-minimongo-changes 2013-01-17 15:56:14 -05:00
David Glasser
4f78080845 Update some recent devel changes to work on ddp-pre1. 2013-01-17 15:56:14 -05:00
Naomi Seyfer
deb06b627e Workshopping docs for EJSON and ObjectID w/ nim 2013-01-17 15:56:13 -05:00
Naomi Seyfer
20145a7f42 Docs for EJSON package 2013-01-17 15:56:13 -05:00
Naomi Seyfer
24c4b0615d Mostly switching over to using EJSON.equals 2013-01-17 15:56:12 -05:00
Naomi Seyfer
be8c94c899 Switch from LocalCollection._deepcopy to EJSON.clone 2013-01-17 15:55:41 -05:00
Naomi Seyfer
9fe782ab15 Move EJSON stuff to new ejson package. 2013-01-17 15:51:58 -05:00
Naomi Seyfer
950f1e0213 Preliminary binary-type commit
Note: Files will be moved around as much of the new type-handling stuff gets
mvoved into a new ejson package.

Testing to come
2013-01-17 15:51:58 -05:00
David Glasser
8ae6e71715 Make calling setUserId in a method body an error if the method already called
unblock.

This way, the subscription rerun code doesn't have to worry about SUB messages
being processed in parallel.
2013-01-17 15:51:58 -05:00
David Glasser
751fe0e144 Fixes to runtime universal sub creation and concurrency with re-running subs.
Meteor.publish(null, f) now starts universal subscriptions for all existing
sessions (as well as future sessions). Fixes #583. Care is taken when a session
is re-running its subs.

Re-running subs is now implemented by "deactivating" the _LivedataSubscription
object and re-creating a new one instead of "resetting" it in place. This allows
us to ensure that old publish handlers have no access to the merge
boxes (SessionCollectionViews) because deactivated _LivedataSubscriptions ignore
callbacks. Thus, we can be assured that after deactivating all subscription, the
merge box really cannot be affected by old publishers continuing to run.

Note: if a publish function has not even finished its original handler run (eg,
if running setUserId in parallel to a universal subscription, which runs in a
separate fiber from the message-handling loop), the old publish function *WILL*
continue to run (both before and after this commit). However, with this commit,
any attempt by the old publish function to call publisher methods will be
ignored instead of being perhaps-inconsistently interpreted. If a publisher
really needs to know if it has been stopped before it has finished running the
handler, it can set an onStop callback before it does anything that can yield.
2013-01-17 15:51:58 -05:00
David Glasser
258a64d751 Move _runHandler into _LivedataSubscription. Rename vars to camelcase. 2013-01-17 15:51:58 -05:00
David Glasser
ca0719b22d Concurrency improvements to livedata_server.
- If a subscription is stopped before it has fully started (eg, a universal
  publisher that has yielded, or a destroy()ed session), call the stop callback
  immediately in onStop, so as to not leak resources.

- In _setUserID, don't set _isSending to false until after running the stop
  callbacks for all subs; if a stop callback yielded, CollectionViews could have
  been mutated without sending messages.

- Annotate the collection-diffing code with _noYieldsAllowed.
2013-01-17 15:51:58 -05:00
David Glasser
3de2dbe4d9 Follow-up to d618b94: ignore completing universal subs without error.
Otherwise, _publishCursor has to know if it is publishing a universal sub or
not.
2013-01-17 15:51:58 -05:00
David Glasser
4740d17e1d Fix new merge box for overlapping universal subs.
We were using the subscription ID heavily inside the merge box, but universal
subs don't have one. Use a "subscription handle" instead.
2013-01-17 15:51:57 -05:00
David Glasser
7a75b8418a ObjectID detection: Use existence of Meteor.Collection, not isClient. 2013-01-17 15:51:57 -05:00
Naomi Seyfer
c99c816331 Fixing up docs, making ObjectID consistent with Node api 2013-01-17 15:51:56 -05:00
Naomi Seyfer
5b4910c965 First draft of docs for types. 2013-01-17 15:49:52 -05:00
Naomi Seyfer
3331e1f7d3 Glasser's comments on my diff
* Lots of small things like whitespace fixes
* change the way adding a custom type works
2013-01-17 15:49:48 -05:00
Naomi Seyfer
e1f15e7c7f Hacked objectid in there, though not ideally 2013-01-17 15:47:27 -05:00
Naomi Seyfer
c305ac8d22 Date now works in session var 2013-01-17 15:47:27 -05:00
Naomi Seyfer
2b7751fa5c Export idParse and idStringify in Meteor 2013-01-17 15:47:25 -05:00
Naomi Seyfer
e831608f86 Moving code around; renamed idToDDP etc to idStringify etc 2013-01-17 15:46:41 -05:00
Naomi Seyfer
76dba0150d Fix tinytest include to use _.isEqual 2013-01-17 15:42:34 -05:00
Naomi Seyfer
3068fd1a36 ObjectID collections now an option not the default 2013-01-17 15:42:34 -05:00
Naomi Seyfer
701d76fe61 Now switching actual collections over to using ObjectID
Previously, had only switched over the default for minimongo --
so there's lots of stuff that actually didn't work.

With this change, two tests are still failing; I will fix them and
then do some more cleanup tomorrow.
2013-01-17 15:42:33 -05:00
Naomi Seyfer
9e130bb398 Self-reviewing my code makes me want to fix problems 2013-01-17 15:42:05 -05:00
Naomi Seyfer
05d0e200ca Documented what methods custom types should have if they are going to work 2013-01-17 15:41:20 -05:00