Juan Cruz Viotti
f8470287c1
Separate general help per topic relevance
...
Only list primary commands by default, unless a `--verbose` option is
passed to list the additional ones.
Fixes: https://github.com/resin-io/resin-cli/issues/101
2015-10-02 08:50:32 -04:00
Juan Cruz Viotti
445e37ccaf
Call os initialize as an elevated process
...
Currently, the fact that `os initialize` requires elevated permissions
forced us to require calling commands that reuse it, such as `device
init` and `quickstart` with administrator permissions as well.
This ended up causing issues like saving images in the cache that belong
to root, or initializing git repositories that requires `sudo` to
commit.
The solution is to call `os initialize` as a child process preppending
`sudo` within `device init`.
Fixes: https://github.com/resin-io/resin-cli/issues/109
2015-10-01 13:07:53 -04:00
Juan Cruz Viotti
90be01b05d
Make os initialize take a device type instead of a uuid
2015-09-30 14:31:23 -04:00
Juan Cruz Viotti
0e06ac464f
Fix incorrect Promise.using syntax
...
`Promise.using` takes the function that acts on the resource as the
second argument, instead of as `.then()`.
2015-09-30 11:37:27 -04:00
Juan Cruz Viotti
15cb0c4889
Use rimraf for deleting os temporary files
...
We already use `rimraf` for deleting os temporary directories, however
there are a few benefits of using it for files as well:
- Simplicity. We avoid having to check if a path is a file or directory.
- `rimraf` attempts to workaround the known Windows issues of anti
viruses not closing files. Described in more detail here: https://github.com/resin-io/resin-cli/blob/master/TROUBLESHOOTING.md#i-get-ebusy-errors-after-initializing-a-device-even-as-administrator-on-windows
2015-09-30 10:06:08 -04:00
Juan Cruz Viotti
30d84f015a
Merge pull request #199 from resin-io/jviotti/feature/197/device-init-apps
...
Prompt for select application if running device init with no arguments
2015-09-29 15:31:59 -04:00
Juan Cruz Viotti
f17e9c97b8
Prompt for select application if running device init with no arguments
...
Currently, if `device init` was ran without an application argument, we
attempted to get the application name from the current directory, given
it was a git repository.
This approach led to confusions from time to time, so now we prompt the
user to select one of it's own applications from a dropdown instead of
checking the current directory in this edge case.
Fixes: https://github.com/resin-io/resin-cli/issues/197
2015-09-29 15:10:59 -04:00
Juan Cruz Viotti
21fcdfaff6
Use Promise.disposer() to make sure temp files are deleted
2015-09-29 15:08:24 -04:00
Juan Cruz Viotti
d704c10197
Implement os initialize command
...
This command initialized an operating system image with a disk device.
2015-09-29 14:52:34 -04:00
Juan Cruz Viotti
7e6eb4b9e4
Implement device register command
...
This command registers a new device with the passed application,
returning the new device uuid.
2015-09-29 14:33:31 -04:00
Juan Cruz Viotti
42256384be
Implement os configure
...
This command, given a path to an image and a device uuid, perform
configuration based on the resin-device-type manifests.
2015-09-29 13:47:10 -04:00
Juan Cruz Viotti
f6d8f12ba2
Implement os download command
...
This command download an unconfigured image to both the cache and to the
specified location by the `--output` option.
2015-09-29 13:03:14 -04:00
Juan Cruz Viotti
64c8420c9d
Implement device specs. Fix #99
...
Support for all devices. Tested in the following ones:
- Intel Edison.
- Raspberry Pi 2.
- Parallella.
2015-09-11 13:02:59 +03:00
Juan Cruz Viotti
4bdcd3d2ee
Merge pull request #180 from resin-io/issue_#103
...
Resin CLI Events integration. Fix #103
2015-09-05 20:11:52 +03:00
mike
b0650530cc
Resin CLI Events integration. Fix #103
2015-09-05 19:15:31 +03:00
Juan Cruz Viotti
a090e6c21d
Refactor quickstart
...
- Use promises.
- Move some logic to `helpers`.
- Inline `device await` command.
2015-08-27 10:01:33 -04:00
Juan Cruz Viotti
354921ca92
Add Aborted
error message when not accepting a confirmation
...
This prevents a lot of duplicate code to check for confirmation status
and exit from the current action.
2015-08-20 16:16:20 -04:00
Juan Cruz Viotti
dc513a08f6
Update Resin CLI Form to v1.2.0
...
This version includes support for the `drive` input type.
2015-08-20 11:55:53 -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
mike
02a06e1e7c
Reword output during download in device init. Fix #106 .
2015-08-18 13:55:04 +03: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
e5b7aae4ae
Refactor device actions to use promises
2015-08-17 09:49:59 -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
50cb04b6f7
Remove unused dependencies imports from various files
2015-08-13 13:04:22 -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
57319f26a6
Slim down unused functionality
2015-08-12 08:17:46 -04:00
Juan Cruz Viotti
dc030f4cd1
Implement Quickstart command
2015-08-04 20:16:55 +03:00
mike
cf512cc01b
Integrate new resin-cli-visuals functionality
2015-07-29 16:34:31 +03:00
mike
5b5d1be52f
Integrate resin-cli-form
2015-07-27 19:50:47 +03:00
Juan Cruz Viotti
cb808869dd
Merge pull request #110 from resin-io/support_promises
...
Add promise support for Resin-SDK dependency
2015-07-24 08:02:40 -04:00
mike
64d83dccfb
Add promise support for Resin-SDK dependency
2015-07-24 00:24:17 +03:00
Juan Cruz Viotti
1d53db2854
Add registered_at UNIX epoch
2015-07-23 12:47:49 -04:00
mike
46fa4ee2a2
Upgrade Resin VCS dependencies
2015-07-11 00:03:20 +03:00
Juan Cruz Viotti
9d4ac46985
Default device.last_seen to 'Not seen'. Closes #84 .
2015-07-09 09:56:39 -04:00
Juan Cruz Viotti
8fa906dd48
Upgrade Resin CLI Visuals and use it's new capabilities
2015-06-11 12:46:56 -04:00
Juan Cruz Viotti
43f0288c6c
Check that the passed application exists before asking to choose device
2015-06-08 12:31:17 -04:00
Juan Cruz Viotti
2bfeb7f42c
Associate a device before first boot
2015-06-04 10:10:15 -04:00
Juan Cruz Viotti
fdd0e4a966
Implement config injection
2015-06-04 08:06:37 -04:00
Juan Cruz Viotti
db58e9986c
Return devices array to the done callback in device list command
...
Useful when using the CLI programatically.
2015-05-14 11:43:41 -03:00
Juan Cruz Viotti
741acfbba3
Merge pull request #41 from resin-io/feature/command-run
...
Make use of capitano.run() to run subcommands
2015-05-08 14:23:37 -03:00
Juan Cruz Viotti
4c5d5697bc
Implement device await command
2015-05-06 11:14:08 -03:00
Juan Cruz Viotti
c758a5b9ea
Make use of capitano.run() to run subcommands
2015-05-05 17:34:24 -03:00
Juan Cruz Viotti
9bb51d7146
Make devices command list all devices if no application option. Closes #17
2015-04-27 11:21:30 -04:00
Juan Cruz Viotti
3bc71577b5
Fix temporary os download output option in device init
2015-04-21 08:37:40 -04:00
Juan Cruz Viotti
7bd8922a4e
Upgrade Resin VCS to v1.2.0 and make use of vcs.getApplicationName()
2015-04-20 11:41:26 -04:00
Juan Cruz Viotti
f7256e9927
Make device init command take an application name instead of id
2015-04-20 09:13:15 -04:00
Juan Cruz Viotti
a14dfa6cf1
Fix long line lint warning
2015-03-23 18:32:28 -04:00
Juan Cruz Viotti
f3b6f9d117
Add missing example to device init
2015-03-23 08:25:45 -04:00
Juan Cruz Viotti
df9c4ce2fd
Reference applications and devices by name
2015-03-23 08:17:55 -04:00