Commit Graph

576 Commits

Author SHA1 Message Date
Juan Cruz Viotti
7f4863da86 Upgrade Nplugm to v3.0.0
This new version supports promises and contains speed improvements.
2015-08-19 11:27:28 -04:00
Juan Cruz Viotti
a803d4f646 Remove plugins manipulation commands
Since we're now forcing users to rely on `npm` directly for updates, we
can also get rid of plugin commands that attempt to
install/update/remove using npm programatically and require users to use
`npm` directly as well.

This commit removes the following commands:

- `plugins`
- `plugin install`
- `plugin update`
- `plugin remove`

Despite plugin related commands being removed, *the functionality that
scans for plugins and registers them remains intact*.
2015-08-19 10:57:42 -04:00
Juan Cruz Viotti
85d940df66 Merge pull request #165 from resin-io/jviotti/feature/update-notifier
Notify the user if there is an available update
2015-08-19 07:56:40 -04:00
mike
019e2ac357 Display msg when app/device does not have env variables. Fix #166 2015-08-18 18:12:08 +03:00
Juan Cruz Viotti
f19588032f Notify the user if there is an available update
For this we use the `update-notifier` module with its default settings.

This module will print a nice banner prompting the user to run the
corresponding npm command to update.
2015-08-18 08:53:06 -04:00
mike
0595452c3d Add message informing the user about potential delay in system img initialization. Fix #90. 2015-08-18 15:43:52 +03:00
Michalis Korakakis
d6305df48e Merge pull request #163 from resin-io/issue-108
Reword ending message in quickstart. Fix #108
2015-08-18 15:00:38 +03:00
mike
3dd5f5858a Reword ending message in quickstart. Fix #108 2015-08-18 14:34:15 +03:00
mike
02a06e1e7c Reword output during download in device init. Fix #106. 2015-08-18 13:55:04 +03:00
Juan Cruz Viotti
fd5a34a1c4 Refactor env action module to use promises 2015-08-17 10:32:22 -04:00
Juan Cruz Viotti
a698b25fda Remove devices supported command
The command is not necessary and unused.
2015-08-17 10:05:36 -04:00
Juan Cruz Viotti
89bd861d8e Merge pull request #159 from resin-io/jviotti/refactor/device
Refactor device actions to use promises
2015-08-17 10:03:57 -04:00
Juan Cruz Viotti
e5b7aae4ae Refactor device actions to use promises 2015-08-17 09:49:59 -04:00
Juan Cruz Viotti
09a5788902 Refactor keys action to use promises 2015-08-17 09:32:05 -04:00
Juan Cruz Viotti
f63391acf9 Make use of projectsDirectory SDK setting in Quickstart
We were currently building this path ourselves, hardcoding the place of
the resin local per user directory instead of relying on the foundations
that `resin-settings-client` give us.
2015-08-17 09:06:27 -04:00
Juan Cruz Viotti
70c060b124 Refactor auth actions to use promises 2015-08-17 08:22:48 -04:00
Juan Cruz Viotti
7a8a3c851b Merge pull request #138 from resin-io/refactor/help
Refactor help module
2015-08-17 08:02:15 -04:00
Juan Cruz Viotti
1096b2d212 Merge pull request #143 from resin-io/jviotti/refactor/app
Refactor app actions to use promises
2015-08-17 08:02:04 -04:00
Juan Cruz Viotti
ee286c5690 Merge pull request #144 from resin-io/jviotti/refactor/note
Refactor note set command to use promises
2015-08-17 08:01:47 -04:00
Juan Cruz Viotti
1da1d2e6fc Merge pull request #152 from resin-io/jviotti/fix/151/ssh-key-list
Print ssh key separately from the information table
2015-08-17 08:01:32 -04:00
Juan Cruz Viotti
30f24333c0 Implement a spinner when awaiting for a device. Fix #107
Fixes:

- https://github.com/resin-io/resin-cli/issues/107
2015-08-14 14:35:38 -04:00
Juan Cruz Viotti
8c9a0e0ff1 Fix broken device await command
There were two issues that prevented this command from working
correctly:

1- `Promise.delay()` is used, but `Promise` was not imported.
2- The following line had incorrect indentation (spaces instead of
		tabs):

		poll().nodeify(done)

Therefore CoffeeScript interpreted that the line had to be executed at
the end of the `poll()` function, causing `poll()` to never be called.
2015-08-14 14:11:49 -04:00
Juan Cruz Viotti
e712e2f266 Print ssh key separately from the information table
Since the public key string is long, it might wrap to lines below,
causing the table layout to break.

A quick solutio is to print the ssh key after the table.

Fixes:

- https://github.com/resin-io/resin-cli/issues/151
2015-08-14 12:25:55 -04:00
Juan Cruz Viotti
83382cc8f7 Merge pull request #145 from resin-io/jviotti/fix/logs-help-indentation
Fix logs command help string indentation
2015-08-14 08:27:38 -04:00
Juan Cruz Viotti
8401aaeae2 Merge pull request #149 from resin-io/jviotti/fix/111/email-validation
Validate that email address is valid during signup. Fix #111
2015-08-14 07:58:40 -04:00
Juan Cruz Viotti
abf5740950 Merge pull request #148 from resin-io/jviotti/fix/14/logs-history
Force logs command to exit when not in --tail mode. Fix #14.
2015-08-14 07:58:05 -04:00
Juan Cruz Viotti
e9ec6c67b2 Validate that email address is valid during signup. Fix #111
For this we use a third party dependency from npm called `valid-email`
to avoid hardcoding and having to mantain a regular expression.
2015-08-13 15:22:22 -04:00
Juan Cruz Viotti
69566f7fc3 Force logs command to exit when not in --tail mode. Fix #14.
PubNub keeps the process alive after a history query for some reason, so
trying to print the logs history like:

	$ resin logs <uuid>

Will result in the logs being printed correctly, but the process waiting
infinitely without ending.

The workaround consists in forcing `process.exit` to exit the process
with an error code zero.

Caveats:

- This workaround prevents this command to be used programatically.

Issue: https://github.com/resin-io/resin-cli/issues/14
2015-08-13 15:08:16 -04:00
Juan Cruz Viotti
6e4b299c7d Remove preferences command 2015-08-13 15:00:51 -04:00
Juan Cruz Viotti
ef35ebf79d Fix logs command help string indentation
For some reason it was indented a few times unnecesarily.
2015-08-13 14:33:19 -04:00
Juan Cruz Viotti
1bc78edf71 Refactor help module
Main changes:

- Use the `columnify` module to display the commands instead of using
manual parsing.

- Extract logic to create a string representation from an option
signature to Capitano, and reuse here.

See https://github.com/resin-io/capitano/pull/28

Some bugs were caught and fixes during the refactoring:

- In command help, if the command didn't exist, we reused default
Capitanos command not found function which uses `process.exit(1)`. This
was changed to pass a custom error to `done()`, so the command fails
correctly when using programatically.

- General help didn't call `done()` at all, thus causing problems if
using the command programatically someday.
2015-08-13 14:19:07 -04:00
Juan Cruz Viotti
d5204a09f7 Refactor note set command to use promises 2015-08-13 14:17:02 -04:00
Juan Cruz Viotti
4647aa70c0 Implement utils/helpers to abstract common app patterns
- Add helpers.confirm() to abstract the process of asking for
confirmation.
- Add helpers.selectDeviceType() to abstract the form needed to ask for
device types.

The functions on this module are reused by app actions.
2015-08-13 14:04:47 -04:00
Juan Cruz Viotti
25c6246e9f Refactor app actions to use promises
Use promises instead of `async` internally inside the following
commands:

- app create.
- app remove.
- app associate.
2015-08-13 13:42:49 -04:00
Juan Cruz Viotti
50cb04b6f7 Remove unused dependencies imports from various files 2015-08-13 13:04:22 -04:00
Juan Cruz Viotti
09fe4b11ad Merge pull request #139 from resin-io/jviotti/feature/drive-widget
Use Visuals drive widget in device init
2015-08-13 12:35:41 -04:00
Juan Cruz Viotti
4157f21e06 Merge pull request #140 from resin-io/jviotti/cleanup/elevate
Remove outdated Windows elevation mechanism
2015-08-13 12:23:26 -04:00
Juan Cruz Viotti
e60c0605e5 Use Visuals drive widget in device init
- Replace custom `drivelist` logic in "device init" with the new `drive`
widget.
2015-08-13 11:56:16 -04:00
Juan Cruz Viotti
3d36e5f5d3 Remove outdated Windows elevation mechanism
This functionality is outdated and not using anymore due to limitations
in the way it was addressed.

The module and dependencies are removed for now, and will be added back
in the future, once a better approach is planned.
2015-08-13 11:45:50 -04:00
Juan Cruz Viotti
57319f26a6 Slim down unused functionality 2015-08-12 08:17:46 -04:00
Juan Cruz Viotti
5c96663d1e Merge pull request #134 from resin-io/remove/drive-command
Remove drive command
2015-08-05 12:24:25 -04:00
Juan Cruz Viotti
ffb48c8669 Merge pull request #135 from resin-io/remove/examples-commands
Remove examples commands
2015-08-05 07:04:03 -04:00
Juan Cruz Viotti
dc030f4cd1 Implement Quickstart command 2015-08-04 20:16:55 +03:00
Juan Cruz Viotti
b726a2d778 Remove examples commands 2015-08-04 10:00:09 -04:00
Juan Cruz Viotti
a715ec9dc1 Remove drive command 2015-08-04 09:57:59 -04:00
Juan Cruz Viotti
d24b871964 Merge pull request #131 from resin-io/remove/selfupdate
Remove selfupdate functionality
2015-08-04 09:53:48 -04:00
Juan Cruz Viotti
b515e427ff Merge pull request #129 from resin-io/issue_#73
Add email address to the returned information, when using whoami(). Fix #73.
2015-08-03 16:14:47 -04:00
mike
f31eb7c2b5 Add email address to the returned information, when using whoami(). Fix #73. 2015-08-03 21:24:22 +03:00
Juan Cruz Viotti
d423a6ea24 Remove selfupdate functionality
We added this because we thought that knowledge of the supported device types, along with the configuration procedures was going to be encoded in the CLI.

With device specs, this is not longer the case.
2015-08-03 12:20:42 -04:00
mike
9564b4e478 Display correctly the newly-created application id. Fix #117 2015-07-29 21:17:21 +03:00