Commit Graph

559 Commits

Author SHA1 Message Date
Slava Kim
c91bf26f70 New 'get-machine' architecture: os.windows.x86_32 2015-01-20 22:03:23 -08:00
Slava Kim
82ae2e3feb Add windows x64 arch to the list of accepted args
for meteor admin get-machine.
2015-01-20 22:03:22 -08:00
Ben Newman
1aba3a8e7a Eliminate the need for getAppDir in tools/server/shell.js.
Summary:
Instead of expecting the child process to figure out where the
`.meteor/local` directory is, we now tell it explicitly via the
`METEOR_SHELL_DIR` environment variable.

Fixes #3437.

Test Plan:
Run `meteor shell` in a separate terminal and see that it still connects
to an app running from the same app directory.

Reviewers: glasser

Reviewed By: glasser

Differential Revision: https://phabricator.meteor.io/D11
2015-01-20 13:56:57 -05:00
David Glasser
2aba1dce35 style cleanup 2015-01-13 16:35:39 -08:00
rissem
bfdad18487 support velocity when using test-packages command 2015-01-13 16:33:56 -08:00
Tom Freudenberg
6dc8d5a0a8 Add git info for 'meteor --version' 2015-01-09 15:18:46 -08:00
David Glasser
4381bb86ef add XXX about #3446 2015-01-08 17:25:41 -08:00
David Glasser
ddd2fe8e91 Make 'pretty: true' to the default for commands
It was already set for most common commands, and was unnecessarily not
set for others.

The following commands are remaining "pretty: false":

- Commands that just print machine-parseable text: --version, --arch,
  admin members (without --add or --remove), mongo --url,
  authorized (without --add or --remove), whoami, list-organizations, list-sites
- Commands that just switch over to another codebase's interactive
  command: mongo without --url, admin get-machine, shell

The following commands used to be implicitly "pretty: false" and now
will be pretty:

- A bunch of troposphere admin commands: set-banners, recommend-release,
  change-homepage, set-unmigrated, set-latest-readme
- A few accounts/deploy related commands: logs, claim, login, logout
- remove-platform, reset, self-test
- admin maintainers (which unlike admin members and authorized prints an
  English header before the user list; maybe this is a mistake)

It might make sense in the future to further separate "pretty means can
show progress bars if the output is a TTY" from "pretty means can use
chalk styling and unicode bullets".

Fixes #3162.
2015-01-05 13:56:47 -08:00
David Glasser
00a7da3dd0 Fix test-packages * if some packages lack tests
Fixes #3334.

This was an intentional but poorly thought through change in
1.0.2 (1a9536baa).
2014-12-20 20:38:25 -08:00
David Glasser
74bf18809c Drop browserstack support from built tool
We haven't really been trying to keep 'meteor self-test' passing from
built tool in a while, so why waste the bandwidth?
2014-12-16 21:09:29 -08:00
Ben Newman
f9b7fa19a6 Avoid unnecessary dynamic requires.
CommonJS module identifiers are specified always to use forward slashes,
even on Windows, so there's no value in using path.join or files.pathJoin
to construct module identifiers.
2014-12-16 19:24:58 -05:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
1e5b7437a5 Refresh catalog only on relevant errors
Fixes #2846.  Fixes #2847. Fixes #2979.

Errors in the build process that could be fixed by refreshing the
catalog now cause the catalog to refresh, assuming we have not already
refreshed it recently and that we are not offline.

These commands now don't need to refresh at startup: remove, run, debug,
create, build, bundle, deploy, test-packages, rebuild, and self-test

It should be OK for create to throw SpringboardToLatestRelease even
without refreshing, since release.latestKnown is still something we know
about.
2014-12-10 19:03:05 -08:00
ekatek
a79e69130f Merge pull request #3232 from meteor/word-wrap-final
Automatically line-wrap output
2014-12-09 12:23:30 -08:00
ekatek
42b0d9247d remove the extra Warning sign 2014-12-08 18:30:52 -08:00
ekatek
0b4cdc6e12 minor cleanup
- renamed an argument from 'opts' to 'options' in the comments as well.
- fixed some forgotten quotes.
2014-12-06 18:42:36 -08:00
ekatek
c9928d9c3a responding to minor fixes on 3232
- Wrapping URLs in Console.url. Making Console.url not word-wrap URLs,
on the off-chance that a URL could be wrapped.

- Creating a doNotWrap function on the Console. Call this on things that
are not commands or URLs, but still should not be wrapped.

- fixing minor mistypes, removing a comment about the dev bundle on the
Windows branch.
2014-12-06 18:32:40 -08:00
ekatek
25dfd39ef1 Everywhere that we call a raw function, add a new line 2014-12-06 17:38:41 -08:00
David Glasser
8c30bfbef4 Remove unused require
Fixes #3144.
2014-12-04 19:40:05 -08:00
ekatek
24a4ed9bdc Automatically line-wrap output
Includes the following changes to Console.js:

- Console.info, Console.warn, Console.debug and Console.error now automatically
  line-wrap the output to 80 characters, or the width of the terminal screen (if
  known). This is in line with our current style guide on how things should be wrapped!

- Sometimes, there are parts of text that we don't want to line-wrap. For example, if we are
  telling the user to run 'meteor long-command --with --options' we don't want to
  have a newline in the middle of that! Wrap those commands in Console.command, like
  this:
     Console.info("something and then run", Console.command(command), "and then");
  This also makes them bold if chalk is on, as a nice bonus. So, if we ever turn
  chalk back on, the bolding of commands will be more consistent.

- Sometimes, there is bulkier output that we don't want to format at all, including
  line-wrapping: log snippets, stack traces, JSON output, etc. In that case, we can use
  Console.rawInfo, Console.rawError, Console.rawWarn and Console.rawDebug. Don't use
  Console.command inside the raw* functions! It won't be processed (at all).

- There are fancier things that we can do, other than just simply wrapping things.
  We can indent:
  "  Start here and then when wrapping
     continue over here".

  We frequently do this for commands, for example. In the past, we did this manually --
  but we can't do this for long messages that might get wrapped, and anyway, it is
  good to codify this instead of counting spaces. Allows us to be better about consistency,
  for example.

- We can also add a bulletPoint, which is a small notice in the beginning that looks like
  this:
  " => Start here and then when wrapping
       continue below the bulletPoint".

  Since it is a elss intuitive option, I have wrapped most of the time that we use a
  bulletPoint into helper functions on the Console.js.

- Some common bulletpoints that we use are:
    ASCII Checkboxes (Console.success)
    ASCII X-s (Console.failWarn and Console.failInfo)
    =>  (Console.arrowError, Console.arrowWarn, Console.arrowInfo)
    WARNING (Console.labelWarn)

  The => are sometimes indented, so they take an optional indent argument, showing how
  many spaces to indent by.

The wrapper interface would be less complicated, if there was a more unified conceit behind our
terminal messages. If there is one, it is not documented. My hope is that, in many cases,
moving these to Console will make it easier for someone with great product sense to
clean up our terminal messages. It will also make it easier to write such messages, since
it will be easier to follow an accepted standard.

In the codebase outside of Console:

- Went through and looked at our use of Console.error/info/etc, replacing with rawError/etc
  whenever approporiate.

- Went through and modified most of 'stdout' and 'stderr' calls to use the new functions.
  I made an exception for stuff that doesn't want a new line at the end, or otherwise does
  weird things (ex: print user logs directly), on the basis that, at this juncture, it is
  better to be safe than to be sorry.

- Long messages no longer need to break the code style guide by ignoring indentation rules.
  Fixed that where approporiate.

- Fixed the tests! A number of our stock messages are actually longer than 80 chars.

- Personal favourite: The Android license agreement is now line wrapped! Much better experience.

- There is some more work to do on:
  - longform help (currently comes with built-in linebreaks, would have to change the entire
    mechanism for how that works)
  - Buildmessage sometimes has headers that start with =>, but they are short. I didn't want to
    pass wrapper options all the way to main.captureOrExit before merging the rest of this and
    making sure that we like it. Since these messages are fairly short, I don't think that's
    likely to be a serious problem.

I hope that this makes life easier for us in the future! No more counting chars, no more breaking
the style guide. Better experience for users with wider terminals (or even shorter terminals!).
Let's give this a try.
2014-12-04 17:56:04 -08:00
David Glasser
0011e00a7e rebuild now requires an app 2014-12-04 15:37:52 -08:00
David Glasser
050a01dcf2 Move tryRevokeOldTokens to background fiber
And increase the timeout while we're at it.
2014-12-01 18:38:39 -08:00
David Glasser
06fbe35d46 Support deploying to legacy Galaxy prototype 2014-12-01 17:42:13 -08:00
David Glasser
7d4757b3ac Show package changes and prerelease warnings
This reimplements functionality that had been removed as part of the
`isopack-cache` branch refactoring.

Information about package changes is encapsulated inside a
PackageMapDelta object on the ProjectContext.  It is the responsibility
of the command that prepares the ProjectContext to choose to call
projectContext.packageMapDelta.displayOnConsole at the appropriate time
if it wishes to display changes.

Part of #3006.
2014-12-01 01:26:35 -08:00
David Glasser
1d4c3e7387 comment tweaks 2014-11-25 09:35:34 -08:00
David Glasser
8deba5c9bb Last references to PackageLoader and catalog.complete are gone 2014-11-25 09:06:31 -08:00
David Glasser
02856bca84 restore some meteor add error-checking
get some parts of package-tests to pass
2014-11-25 09:06:28 -08:00
David Glasser
17bcac2b44 fix duplicate Meteor 2014-11-25 09:06:25 -08:00
David Glasser
7676e1d192 handlerConnectionError -> handleConnectionError 2014-11-25 09:06:24 -08:00
David Glasser
275456054f Drop test-runner-app from repo
ProjectContext now makes sure to turn the given directory into a project
directory if it isn't one yet.

Add --show-test-app-path to test-packages.
2014-11-25 09:06:23 -08:00
David Glasser
e88f588cfc Fix updating releases (not package update though)
Move run-upgrader command under 'admin'
2014-11-25 09:06:23 -08:00
David Glasser
e1572801d5 Revert "releaseFile.setRelease should be in-memory only"
This reverts commit 3735ff62d51af6c7e537d5c3fe35e79cebb68735.
2014-11-25 09:06:23 -08:00
David Glasser
11ab8edaa9 releaseFile.setRelease should be in-memory only
This will let us try several times for 'meteor update' and not write
until success.
2014-11-25 09:06:23 -08:00
David Glasser
a553048fe6 don't write .meteor/packages changes until ready
ie, don't update .meteor/packages unless we know the new constraints can
be resolved!

The current calls are from remove and test-packages, which should
generally succeed.  But add is different.
2014-11-25 09:06:22 -08:00
David Glasser
d38fbdf903 fix test-packages --deploy 2014-11-25 09:06:21 -08:00
David Glasser
6db0e3607a fix galaxy prototype deploy 2014-11-25 09:06:21 -08:00
David Glasser
1e7a4f3b08 Fix meteor deploy 2014-11-25 09:06:20 -08:00
David Glasser
5fcab5c42d fix 'meteor rebuild' 2014-11-25 09:06:20 -08:00
David Glasser
45cc54fb63 comment and require cleanup 2014-11-25 09:06:20 -08:00
David Glasser
f02336d0cd test-packages for cordova 2014-11-25 09:06:20 -08:00
David Glasser
1a9536baa2 Fix test-packages
See #3012, though.
2014-11-25 09:06:20 -08:00
David Glasser
637a3ec37b Fix remove-platform 2014-11-25 09:06:19 -08:00
David Glasser
2b818092ce 'meteor run ARGS' (cordova) works now 2014-11-25 09:06:19 -08:00
David Glasser
c344278b96 Fix up stats.
Satisfyingly delete a long comment explaining how somehow it is annoying
to work with a codebase that's full of singletons.
2014-11-25 09:06:18 -08:00
David Glasser
f0ff76a24b watch local package search dirs 2014-11-25 09:06:18 -08:00
David Glasser
4563258ec0 'meteor run' works once
restart crashes intentionally

(client-only changes to app code work; client-only changes to packages
don't get reloaded.)
2014-11-25 09:06:17 -08:00
David Glasser
a9a3411703 checkpoint on 'meteor run' 2014-11-25 09:06:17 -08:00
David Glasser
9f8b533fcc Write versions when app release matches current
This should take care of the special-casing that used to be in create
and update. (Will still need to confirm that it works properly for
update.)
2014-11-25 09:06:17 -08:00
David Glasser
7b952d50e9 write .meteor/.finished-upgraders in 'create' 2014-11-25 09:06:17 -08:00
David Glasser
ea7c60253f write .meteor/release on create 2014-11-25 09:06:16 -08:00