Commit Graph

527 Commits

Author SHA1 Message Date
David Glasser
d1c481f714 Address EPIPE (etc) crashes from the runner http-proxy during hot code reload.
A better fix involves improving http-proxy itself but they're in the middle of a
giant Node 0.10 compatibility rewrite. This addresses the bug reported by Tim
Haines in a hacky but useful way.
2013-07-25 16:29:14 -07:00
Emily Stark
1ee45c4318 Strip trailing dots after adding .meteor.com to appnames.
This is a temporary fix while we sort out the difference between appnames and
sitenames.
2013-07-24 13:24:35 -07:00
David Glasser
e471549677 Refactor argument parsing and 'help' display.
argumentParser is now required, and it takes in an optimist object instead of
needing to create one.

The name of the command is automatically removed from argv._ between
argumentParser and func, instead of having to deal with it in func.

We no longer are able to cleverly show the "-f" in the help for logs -f only if
talking to Galaxy. The logic there is too complex.

(The motivation for this commit is that "meteor help logs" and "meteor logs
--help" were both broken, in different ways.)
2013-07-24 02:11:33 -07:00
Slava Kim
d65cf0307b Remove one letter option for --admin. 2013-07-23 17:58:44 -07:00
Slava Kim
095e81a0b6 Hide documentation to admin flag.
Shouldn't distract people who don't have Galaxy yet. (everyone outside MDG)
2013-07-23 12:35:57 -07:00
Slava Kim
f46d94cffd Option to deploy an app as 'admin app'.
So app binds to host.local/appName and is available in admin panel
2013-07-23 11:43:03 -07:00
Emily Stark
902d3b5f1c Don't try to add .meteor.com to an undefined sitename in galaxy configure. 2013-07-22 22:46:34 -07:00
Naomi Seyfer
2d2da146d9 Fix messages on timeout error 2013-07-22 18:24:31 -07:00
Naomi Seyfer
2d8b96c946 Fix timeout so that it gets cancelled when the connection is closed 2013-07-22 18:14:52 -07:00
David Glasser
d5ed4fd878 Don't try to read empty files.
Fixes #1237.
2013-07-22 16:58:44 -07:00
Naomi Seyfer
732847436b Time out if we dont connect to galaxy in 10s 2013-07-22 15:32:02 -07:00
Emily Stark
a27e6239b9 Validate certs on galaxy discovery requests. 2013-07-22 15:14:11 -07:00
Emily Stark
2e79a3145e Add .meteor.com to sitenames in meteor tool if no domain.
Commands that don't use galaxyCommand (logs and configure, for now) have to call
qualifySitename themselves, but I think this is okay for now because we're
mainly concerned with preventing deploys to non-fully-qualified domains.
2013-07-22 15:08:08 -07:00
David Glasser
96d5ce2fa4 Followup adding comment to d5a1295 fix. 2013-07-22 11:58:33 -07:00
Emily Stark
d5a1295977 Make galaxy discovery not follow redirects 2013-07-19 16:49:40 -07:00
David Glasser
237f6da87e Store runner.js in test-in-console as an asset; extract via env var.
Allow packages to specify that files are assets, overriding any handler defined
for them. (May be useful for web workers!)

Let Assets.getBinary work before global-imports.js is executed.
2013-07-19 11:27:55 -07:00
David Glasser
15c396b686 linker: Add a few newlines before the exports section. 2013-07-19 10:08:10 -07:00
Geoff Schmidt
ee60b7bcae If you @export Foo.Bar.Baz, define Foo.Bar for you
(if it wasn't already defined by an import.)
2013-07-18 23:46:31 -07:00
David Glasser
74da4b1adb Fix Meteor.release. 2013-07-18 12:40:16 -07:00
David Glasser
2f6a5b2193 "meteor rebuild-all" should not try to rebuild warehouse packages.
That's because warehouse packages are now pre-built and have no source tree.

(The existing code didn't work anyway. It iterated over self.releaseManifest
instead of self.releaseManifest.packages, and the "name" and "version" arguments
to the each were reversed. So it was trying to delete directories named ".build"
inside "/Users/glasser/.meteor/packages/de0d7206ad/tools" and
"/Users/glasser/.meteor/packages/packages". Since those directories never
existed, it didn't manage to try to rebuild any packages anyway.)
2013-07-18 11:40:13 -07:00
David Glasser
c1667c7d0c Move clean-css and uglify-js from dev bundle to a new minifiers package.
This will make it much easier to upgrade them and test new versions.

(They are still called from the bundler, so changes to how we access them (eg
source map support) will require modifying tools, but just "upgrade to new
version" now is much easier.)
2013-07-18 10:31:52 -07:00
Emily Stark
7da0561995 Print error body if we get one from meteor mongo.
This got lost when we refactored to have the same interface as deploy-galaxy.
2013-07-17 15:23:56 -07:00
David Glasser
ecf859e2a7 Don't advertise 'meteor galaxy' command until Galaxy support is official. 2013-07-17 14:10:26 -07:00
David Glasser
625aed5ea3 Upgrade fibers to 1.0.1. Specify the tested Node version in more places.
Dev bundle version not yet bumped.

Fixes #1153.
2013-07-17 11:48:10 -07:00
Emily Stark
4da6391ba5 Make galaxy configure command discover galaxy when a sitename is passed as an
argument.
2013-07-17 11:05:31 -07:00
Geoff Schmidt
058f883a35 Be more conservative about soft library reload.
Only reuse a package if we still intend to be loading
it from the same packageDir.
2013-07-17 00:30:48 -07:00
David Glasser
1e002707a2 Rename "build version" to "built by" in other places too. 2013-07-17 00:02:58 -07:00
David Glasser
9538bec685 Replace "asset directory" concept with manifest of assets.
We were partway here already: the client served assets from the manifest instead
of from a static directory (since 5b8e1c1), and we already generated the list of
assets in the slice JSON file. But on the server, we ignored that list and
re-walked the asset directory at bundle time.

Now, the idea of asset directory is solely a part of initFromAppDir.

This also fixes a bug where assets that weren't associated with on-disk files
wouldn't work properly if Asset.get* is called in a package loaded with
unipackage.load. Not really sure how dev-bundle-fetcher even worked...

Also fixes a bug in builder where generated filenames didn't actually avoid
duplicate files.

This does not bump BUILT_BY because the previous commit did, and this commit
will not be pushed without the previous commit.
2013-07-17 00:01:06 -07:00
David Glasser
869bc23c25 Rename "static" directory to "assets". 2013-07-17 00:01:05 -07:00
Geoff Schmidt
b3130558d2 During development, don't reload packages that didn't change.
Saves about 150ms off development reload.
2013-07-16 23:48:10 -07:00
Geoff Schmidt
83ab263a88 Adjust source maps more efficiently at link time.
(Saves more than a second off of linking a small app!)
2013-07-16 23:48:03 -07:00
Geoff Schmidt
f7fb9742b3 cache unipackage.load 2013-07-16 23:47:58 -07:00
David Glasser
6970a89ee0 Implement "api.imply". Make all accounts packages imply accounts-base.
If X uses Y and Y implies Z, then X is also treated as using Z. This can be used
to create umbrella packages, etc.
2013-07-16 18:45:56 -07:00
David Glasser
57f6d25ef2 Make api.add_files("f") default to ["client","server"]. 2013-07-16 18:43:58 -07:00
Emily Stark
1b4ee9c90f Look for galaxy discovery responses with special fields rather than treating the
body of any 200 response as a galaxy url.
2013-07-16 15:12:56 -07:00
David Glasser
e18e2435b3 Remove unused Package._require function.
It doesn't set dependencyInfo correctly and was no longer used (before linker,
it was used by the handlebars and templating packages).
2013-07-16 13:47:52 -07:00
David Glasser
575de93b1f Fix wrong field name in c37ed42b8. 2013-07-16 12:48:26 -07:00
Emily Stark
1597f3da82 Minor clean up on ssh tunnels
(addressing glasser's comments on 5c3b769)
2013-07-16 09:51:05 -07:00
David Glasser
c37ed42b80 Move buildVersion into buildinfo.json, and drop that file from built tarballs. 2013-07-16 09:16:32 -07:00
Emily Stark
5c3b769e44 Clean up galaxy command setup and ssh tunnel cleanup.
Uses cleanup.js to register an exit handler that cleans up the ssh tunnel,
instead of the try/finally. The galaxyCommand wrapper takes care of finding a
galaxy, opening a tunnel, and cleaning up the tunnel when the command
finishes. Commands that want to keep the tunnel open can just use
prepareForGalaxy and not galaxyCommand.

galaxyCommand required refactoring argument parsing a bit; now each command has
an optional argumentParser step that runs before the actual command, which
allows us to wrap the command function knowing that the arguments have already
been parsed (e.g. site is always in argv._[1]).

Also reverts c185b2be because that fix is no longer necessary.
2013-07-15 22:31:07 -07:00
Geoff Schmidt
096a6efddd Improve stack parsing 2013-07-15 18:23:54 -07:00
Slava Kim
c185b2bed6 Fix ssh-tunnel reconnect problem by keeping reference to Fiber we want to yield to.
For more info look here: https://github.com/laverdet/node-fibers/issues/131
2013-07-15 18:04:48 -07:00
Slava Kim
690da6a535 Close galaxy conn. as soon as we get mongo url.
Since we use it only on `meteor mongo ...` command, we usually don't need it afterwards but never close it.
2013-07-15 15:06:01 -07:00
David Glasser
a77932e34b fix typo 2013-07-15 13:29:18 -07:00
David Glasser
2b80e5b973 Generate a dummy package.js in unipackages, to make the downloader happy.
Change the downloader to no longer expect packages to contain package.js.

This actually requires us (already!) to bump BUILD_VERSION, since I've already
published packages without the package.js!
2013-07-15 13:25:26 -07:00
David Glasser
02a123a47c Introduce concept of "build version" to unipackages.
We bump the "build version" of the tools precisely when we want to rebuild all
packages.  This handles the "I ran meteor update, I may need to rebuild my
app/$PACKAGE_DIRS packages" case, as well as ensuring that warehouse package
version numbers are incremented when we need to rebuild all packages (but not on
EVERY tools directory change).
2013-07-15 12:36:02 -07:00
David Glasser
296ca6f0c0 Link to bug where we can't get syntax error line/column numbers. 2013-07-15 11:27:48 -07:00
Emily Stark
d2eb68c60b Update package name guess to account for no slash in front of path 2013-07-12 16:00:53 -07:00
Slava Kim
3311517ecf Logs continuation on ssh-tunnel reconnect. 2013-07-12 14:59:40 -07:00
David Glasser
cbda2bbae1 Make "meteor rebuild-all" in an app dir with programs also wipe the .build for
any programs.
2013-07-12 14:51:11 -07:00