Commit Graph

5010 Commits

Author SHA1 Message Date
Sashko Stubailo
33440ebd7a Add geolocation package 2014-08-11 16:11:06 -07:00
Sashko Stubailo
f481e66ff1 Merge branch 'bundle-android' into cordova-hcp
Conflicts:
	tools/commands.js
	tools/utils.js
2014-08-11 11:04:25 -07:00
Slava Kim
ac9aebe077 Android-specific boilerplate changes 2014-08-07 17:06:37 -07:00
Sashko Stubailo
522bcd81f6 Merge branch 'devel' into bundle-android
Conflicts:
	tools/utils.js
2014-08-07 11:32:07 -07:00
Slava Kim
2feef6ec9f fix tests for webapp after merge 2014-08-06 14:56:36 -07:00
Matthew Arbesfeld
3c7ed69f6b Fix client.* -> web.* 2014-08-06 13:51:31 -07:00
Matthew Arbesfeld
9f2ee36e60 Merge branch 'packaging' into cordova-hcp
Conflicts:
	packages/constraint-solver/constraint-solver-tests.js
	packages/constraint-solver/constraint-solver.js
	packages/less/plugin/compile-less.js
	packages/meteor/plugin/basic-file-types.js
	packages/star-translate/translator.js
	packages/stylus/plugin/compile-stylus.js
	packages/templating/plugin/compile-templates.js
	packages/webapp/webapp_server.js
	tools/bundler.js
	tools/commands.js
	tools/compiler.js
	tools/package-source.js
	tools/run-app.js
	tools/selftest.js
	tools/tests/old/test-bundler-assets.js
	tools/tests/old/test-bundler-options.js
	tools/unipackage.js
2014-08-06 13:43:56 -07:00
David Glasser
3d75f53149 Client sync queue: better logic around setTimeout
In the old code, if you queued a task, did something which flushes the
queue (runTask, flush, or drain), and then queued another task, you'd
end up with two pending timeouts, rather than zero. With this change,
we're careful to never have two pending timeouts, and also to clear the
timeout if we're about to run all current tasks.
2014-08-05 14:50:21 -07:00
David Glasser
845286b925 Merge branch 'devel' into packaging 2014-08-05 13:13:27 -07:00
David Glasser
835eb66377 a tiny bit more info to help debug an error 2014-08-05 12:56:07 -07:00
David Glasser
ddc3657e4f Watch files which fail before emitting a resource
Regression introduced by the CSS watching code (specifically, f230eba62)
by the sourceIsWatched check. We need to be able to tell the difference
between "source handler didn't do anything because there was an error"
and "source handler didn't do anything because it's web-specific and
this is an os arch".

A simple fix would have been to interpret compileStep.error as
"sourceIsWatched = true", but I didn't think of that until after doing
it the slightly more complicated but more precise way :)

Also, ensure that if the runner rebuilds the client and there's an
error, it properly kills the app process (and the watchers and the
keepalive interval, etc).
2014-08-04 21:32:22 -07:00
David Greenspan
5ff8117310 Update comments after looking into e7250a0
It seems that when ObserveSequence observed a Cursor, it used to stop() the observe when the main autorun was invalidated, creating a “gap” during which no callbacks would be received (or fired).  This was before we used Deps.nonreactive in the main autorun (shielding the cursor.observe from being stopped).  Now the observe is only stopped upon re-run or when the ObserveSequence is stopped, and there is no gap.

Removed references to this gap from comments.

I believe the current code is correct, and in addition, we could now optimize the cursor-to-same-cursor case (and basically not do anything if seq===lastSeq and is a Cursor, i.e. not stop the old handle, create a new handle, or diff).
2014-08-04 19:06:15 -07:00
MaximDubrovin
6345d92f07 move phantom_script.js setInterval into page.open callback
Until I made this I always got only ```<head/>``` with it's content, ```<body>``` was empty.

It seems setInterval script was finished earlier then url content was loaded to the page. Maybe because I have subscriptions with response time lower then 100ms so they were ready very quickly — database server in the same data center.

http://phantomjs.org/api/webpage/method/open.html
2014-08-01 16:44:04 -07:00
Avital Oliver
e7250a045f Eliminate _fetch on handles returned from cursor.observe()
This was originally introduced with
f1b77fec96, but it looks
like all of our tests now pass. (Maybe eliminating `rewind` in
b5a0613f85 made this no
longer necessary?)

If we find that this commit did break something, let's make sure to
add a failing test before reverting.
2014-08-01 15:01:26 -07:00
Avital Oliver
6166abde14 Reorg observe-sequence
(in preparation for {{#each}} over objects)
2014-08-01 14:59:48 -07:00
Avital Oliver
80b0973507 rename bindToCurrentDataIfIsfunction to bindDataContext
(for clarity)
2014-08-01 14:58:11 -07:00
Matthew Arbesfeld
8bcbd65344 Separate "browser" target into web.browser/cordova
Cordova projects often have a different set of files than web targets,
so we would like to be able to target different client architectures in
our bundles. Ideally, we allow the user to use arbitrary client
architectures - but this patch is a step in the right direction by
abstracting out more of the hard coded "browser"/"os" lines.

We accomplish this separation in a backwards compatible way by allowing
api.___ commands to target a "client" architecture. For example,
api.addFiles('a.js', 'client') adds 'a.js' to both the 'client.browser'
and 'client.cordova' targets.

Effects on 0.9 packaging stuff: packages don't have to change, but the
"data.json" file in ".meteor0" has "browser" in some places. We think we
have to fix the troposphere code where this data.json is created.

Some plugins will also be backwards-incompatible with this change, since
many have a "clientArch.matches("browser")" line in the plugin
code. Ideally, we fix plugins so that this stops being an issue, but for
now package authors can just patch that line.

At the compiled (unipackage) level the new names are 'web.browser' and
'web.cordova', replacing 'browser'. In package.js, the new names are
'client.browser' and 'client.cordova', serving as an adjunct to 'client'.
2014-07-31 14:12:15 -07:00
David Glasser
e59fb948b5 fix tests broken by 6850b679e9 2014-07-30 19:24:55 -07:00
David Glasser
c5acfdf8c1 add missing underscore dep 2014-07-30 19:24:47 -07:00
David Glasser
26006d53dc Merge branch 'devel' into packaging
Conflicts:
	tools/utils.js
2014-07-30 17:40:44 -07:00
Avital Oliver
30e02600b4 Add guard I forgot to add in 693b78001c
(Thanks @justinsb for noticing this!)
2014-07-30 16:55:49 -07:00
Avital Oliver
7c4af8d12f Add guard I forgot to add in 693b78001c
(Thanks @justinsb for noticing this!)
2014-07-30 16:51:12 -07:00
Avital Oliver
d8e28eb74b Also log sanitized error in server logs (which gets sent to client) on match errors 2014-07-30 16:23:17 -07:00
Avital Oliver
135dd942aa Expose match failures in server logs 2014-07-30 16:23:17 -07:00
David Glasser
e76332b102 Make it more clear that the clone is for transform 2014-07-30 16:23:17 -07:00
Mitar
9fd2214d89 Assure that transform is not changing cached object. 2014-07-30 16:23:17 -07:00
Ryan Yeske
2658a18a01 recognize forceApprovalPrompt option in Accounts.ui.config
this option was originally added via #1226
2014-07-30 16:23:17 -07:00
Avital Oliver
6d57079bd0 Merge branch 'avital-expose-match-errors-on-server' into devel 2014-07-30 16:21:55 -07:00
Avital Oliver
693b78001c Also log sanitized error in server logs (which gets sent to client) on match errors 2014-07-30 16:21:13 -07:00
Justin SB
812a3af2cd By default, don't run server & client tests in parallel 2014-07-30 14:37:27 -07:00
Justin SB
4e6efe91a5 Output test results in xunit format when the path is 'xunit'
We output via console.log; to differentiate from normal output,
we prefix xunit output with 'XUNIT '.
2014-07-30 14:37:00 -07:00
Avital Oliver
47831e8744 Expose match failures in server logs 2014-07-30 12:00:51 -07:00
Matthew Arbesfeld
b14a3d1376 Also check for CSS changes 2014-07-30 02:04:42 -07:00
Matthew Arbesfeld
71f2798205 Add a DEFAULT_DDP_CONNECTION_URL and fix visible:hidden tag 2014-07-29 22:45:50 -07:00
Slava Kim
574d9398b2 Hide the initial page to prevent flicker 2014-07-29 17:22:37 -07:00
Matthew Arbesfeld
5e1c63b63b Only autoupdate once everything is loaded. 2014-07-29 17:19:35 -07:00
Matthew Arbesfeld
3ea5e6d033 Hot code push works! yay 2014-07-29 15:43:32 -07:00
Emily Stark
3ad5ff6c90 Merge branch 'master' into devel
Conflicts:
	packages/mongo-livedata/oplog_observe_driver.js
2014-07-29 14:40:44 -07:00
David Glasser
0f3b16f942 Add a lot of _noYieldsAllowed to oplog driver
Makes it easier to reason about where yields are (and ensure that
_stopped is checked after all yielding calls)
2014-07-29 11:01:42 -07:00
Emily Stark
1b9bb206cd Revert "shrinkwrap update"
This reverts commit abbf3c78fa.

Something probably got weird switching between the 'packaging' branch
and 'devel'; mongodb and bson are forked on packaging, but we didn't
intend to be using a normal mongodb release with a forked bson.
2014-07-29 10:54:21 -07:00
David Glasser
b4e02f345a Fix a few exceptions in the oplog observe driver
First exception: _runQuery didn't check to see if it was stopped after
running the query, which could lead to this harmless error:

Exception in defer callback: TypeError: Cannot call method 'clear' of null
    at _.extend._publishNewResults (packages/mongo-livedata/oplog_observe_driver.js:749)
    at _.extend._runQuery (packages/mongo-livedata/oplog_observe_driver.js:657)
    at packages/mongo-livedata/oplog_observe_driver.js:615
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
    at packages/meteor/timers.js:6
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)

Second exception: _fetchModifiedDocuments thought that it should only be
in FETCHING in a certain case, but QUERYING is also OK. This is also
harmless since the correct behavior is to end the deferred routine.

Exception in defer callback: Error: phase in fetchModifiedDocuments: QUERYING
    at packages/mongo-livedata/oplog_observe_driver.js:435
    at packages/mongo-livedata/oplog_observe_driver.js:16
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
    at packages/meteor/timers.js:6
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)
2014-07-29 10:23:38 -07:00
David Glasser
cd8bd67ff8 Fix a few exceptions in the oplog observe driver
First exception: _runQuery didn't check to see if it was stopped after
running the query, which could lead to this harmless error:

Exception in defer callback: TypeError: Cannot call method 'clear' of null
    at _.extend._publishNewResults (packages/mongo-livedata/oplog_observe_driver.js:749)
    at _.extend._runQuery (packages/mongo-livedata/oplog_observe_driver.js:657)
    at packages/mongo-livedata/oplog_observe_driver.js:615
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
    at packages/meteor/timers.js:6
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)

Second exception: _fetchModifiedDocuments thought that it should only be
in FETCHING in a certain case, but QUERYING is also OK. This is also
harmless since the correct behavior is to end the deferred routine.

Exception in defer callback: Error: phase in fetchModifiedDocuments: QUERYING
    at packages/mongo-livedata/oplog_observe_driver.js:435
    at packages/mongo-livedata/oplog_observe_driver.js:16
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
    at packages/meteor/timers.js:6
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)
2014-07-29 10:18:40 -07:00
Matthew Arbesfeld
71966f407a Turn off auto-reload. Still not able to remove initial script from page 2014-07-29 04:38:46 -07:00
Matthew Arbesfeld
2a74a004db Fix AJAX call for loading from local storage 2014-07-28 23:39:56 -07:00
Matthew Arbesfeld
610fcef388 Fix AJAX call for loading from local storage 2014-07-28 23:10:30 -07:00
Matthew Arbesfeld
43fc2be1b9 Something working, wip 2014-07-28 22:38:27 -07:00
Slava Kim
03fa26fc92 wip towards a hcp script 2014-07-28 18:03:05 -07:00
David Greenspan
452ae36c68 Change how Blaze.render,toHTML infer parentView
If you call UI.renderWithData, say, from an event handler, you may be unpleasantly surprised if it gets Blaze.currentView as its parentView (where Blaze.currentView is based on the template where the event handler is defined).  On the other hand, showdown/template-integration.js takes advantage of the fact that Blaze.toHTML in render() is infers the parentView from Blaze.currentView.  So only infer currentView as parent while in the view’s render().

This change should only affect apps and packages that use Blaze.render, Blaze.toHTML, UI.render, or UI.renderWithData.
2014-07-28 16:28:16 -07:00
Matthew Arbesfeld
7700d350b2 Change saved path for cordova files 2014-07-28 14:36:55 -07:00
Matthew Arbesfeld
2e3b9be131 Fix cordova plugins test 2014-07-28 14:17:38 -07:00