Commit Graph

914 Commits

Author SHA1 Message Date
Tim Perry
2db1d84d3c Do not require a login for builds
Fixes: #578
Change-Type: patch
2018-03-29 11:11:25 +02:00
Tim Perry
12a1916007 Allow (experimental!) login with API keys
Change-Type: minor
2018-03-29 11:11:25 +02:00
Akis Kesoglou
c6c9046826 Fix crash when an app is not specified for build command
This is a regression introduced in #818

Change-Type: patch
2018-03-27 19:12:31 +03:00
Alexis Svinartchouk
ca1ac2bb83 Prefix all pine options with '$' in preload to avoid pine warnings.
Change-Type: patch
2018-03-23 15:20:18 +00:00
Akis Kesoglou
4f167cb836 Address review feedback 2018-03-22 13:26:47 +02:00
Akis Kesoglou
9455d438e2 Formatting fixes 2018-03-22 13:26:47 +02:00
Akis Kesoglou
a356ecf9b6 Remove unused code 2018-03-22 13:26:47 +02:00
Akis Kesoglou
066ac591ac Warn early if deploying a multicontainer project to an incompatible app
Change-Type: patch
2018-03-22 13:26:47 +02:00
Akis Kesoglou
62f006b89a Add legacy deploy method back
This mostly reverts the removal of the legacy deploy code that pushed image tars via the builder. It’s needed for users to avoid having to switch between CLI versions in order to push to legacy apps as well.

Note: this pins resin-sdk to 9.0.0-beta14 as I couldn’t get it to install otherwise — npm would always install 9.0.0-beta9 instead.

Change-Type: minor
2018-03-22 13:26:47 +02:00
Akis Kesoglou
242c3731ee Remove redundant import 2018-03-19 20:52:51 +02:00
Akis Kesoglou
5f7eee8eac Make sure image name is all lowercase
Change-Type: patch
2018-03-19 20:52:51 +02:00
Akis Kesoglou
1833f6ff0a Improve handling of build log output
This makes sure build logs don’t leak escape sequences and new lines and they don’t break the output. Also improved “inline” logs by normalising the stream before passing it to “transpose build stream”.

Fixes: #808
Change-Type: patch
2018-03-19 20:52:51 +02:00
Akis Kesoglou
fe01ead023 Fix getting window size when there’s no TTY attached
Change-Type: patch
2018-03-15 10:30:54 +02:00
Akis Kesoglou
14a3f51b73
Add docker-compose-aware builds and deployments
Legacy behaviour is mostly retained. The most notable change in behaviour is that invoking `resin deploy` without options is now allowed (see help string how it behaves).

In this commit there are also the following notable changes:

- Deploy/Build are promoted to primary commands
- Extracts QEMU-related code to a new file
- Adds a utility file to retrieve the CLI version and its parts
- Adds a helper that can be used to manipulate display on capable clients
- Declares several new dependencies. Most are already indirectly installed via some dependency

Change-Type: minor
2018-03-07 14:48:05 +00:00
Akis Kesoglou
96116aeaec
Fix invoking undefined method
Have no idea how this used to work.
2018-03-07 14:47:16 +00:00
Akis Kesoglou
299bc0db13
Update docker-toolbelt
New version is 3.1.0.

The updated version is not backwards compatible as it removes all *Async methods that are in wide use in the CLI. The workaround for now is to manually promisify the client and replace all `new Docker()` calls with a shared function that returns a promisified client.
2018-03-07 14:47:15 +00:00
Tim Perry
079ce552e3
*BREAKING*: Remove support for plugins entirely
There are very few plugins in real-world use, we're not actively working
on this at all, and the current approach won't work once we move to
standalone node-less binary installation anyway.

Change-Type: major
2018-03-07 14:46:35 +00:00
Alexis Svinartchouk
163684e3a9
Update dashboard login to use the multicontainer SDK
Change-Type: patch
2018-03-07 14:46:35 +00:00
Alexis Svinartchouk
f698f561c9
Multicontainer preload: Update resin-preload to 6.0.0-beta4
Change-Type: minor
2018-03-07 14:46:35 +00:00
Alexis Svinartchouk
cb207f18a5
Update the keys action to use the multicontainer SDK
Change-Type: patch
2018-03-07 14:46:34 +00:00
Alexis Svinartchouk
76a5cdc977
Require multicontainer SDK
* require('resin-sdk') => multicontainer SDK
 * require('resin-sdk-preconfigured') => 6.15.0 SDK
 * all 'resin-sdk' requires replaced with 'resin-sdk-preconfigured'
 * resin-sdk-preconfigured TS typings are copy pasted from the current resin-sdk master

The idea is to progressively replace all 'resin-sdk-preconfigured'
requires with 'resin-sdk' (multicontainer sdk) and eventually remove
resin-sdk-preconfigured from package.json.

Change-Type: patch
2018-03-07 14:46:31 +00:00
Tim Perry
c12360daa8 Tweak TS & add missing deps that may cause build failures in some envs
Connects-To: #765
Change-Type: patch
2018-02-20 20:26:18 +01:00
Tim Perry
d8aabfd448
Ensure login does not wait for the browser process to close
Unclear why, but for some reason this only actually blocked on the
browser on OSX.

Connects-To: #791
Change-Type: patch
2018-02-16 17:28:19 +01:00
Tim Perry
1ef0a1028f Add support for Balena in local ssh
Change-Type: minor
2018-02-06 12:05:28 +01:00
Thodoris Greasidis
d1c773360f Fix uuid params being parsed a numbers
Connects-To: #489
Change-Type: patch
2018-02-01 17:48:01 +02:00
MoranF
33fd70291a Add 'or mounted resinOS image'
Connects-To: #764

Change-Type: patch
2018-01-30 17:30:18 +01:00
Tim Perry
8c29bba108 Don't use the deprecated 'os configure' format in internal calls
Change-Type: patch
2018-01-16 17:54:46 +01:00
Tim Perry
0ba96adbbc Fix breakage in deploy command from recent TS conversion
Change-Type: patch
2018-01-11 10:33:08 +01:00
Tim Perry
83a76f7d6f Start using Prettier
Change-Type: patch
2018-01-10 09:23:00 +01:00
Tim Perry
612012aff8 Lots of small TypeScript tweaks & clarifications from review 2018-01-09 17:14:49 +01:00
Tim Perry
6daed83d88 Lint TypeScript and CoffeeScript with resin-lint
Change-Type: patch
2018-01-09 17:14:49 +01:00
Tim Perry
f25442c036 Move documentation generation to TypeScript
Change-Type: patch
2018-01-09 17:14:49 +01:00
Tim Perry
ffffd447f2 Convert most of utils to TypeScript
Change-Type: patch
2018-01-09 17:14:48 +01:00
Tim Perry
4b511c47f0 Start on some easy TS conversion 2018-01-09 17:14:48 +01:00
Andrew Shirley
ce5fd53822 convert windows paths to posix when passing to tar
Due to https://github.com/mafintosh/tar-stream/issues/3, the tar module
needs posix style paths but system-specific paths are being supplied

Change-Type: patch
2018-01-08 22:50:11 +00:00
Tim Perry
34f24fe331 Fix deprecation warning for os configure, when passing a bare UUID
Change-Type: patch
2017-12-22 16:07:19 +01:00
Andreas Fitzek
0653769156
fixed example 2017-12-18 17:03:16 +01:00
Andreas Fitzek
3ed319872a
refactored 2017-12-18 17:03:16 +01:00
Andreas Fitzek
ee124671d8
mention Resin OS version requirement 2017-12-18 17:03:16 +01:00
Andreas Fitzek
1b4dabd37c
Add ssh option for direct host OS access
Use the `--host` (short `-H`) option in the ssh command to access
the host OS of the device.
Direct host OS is enabled for devices with Resin OS >= 2.7.5.

Change-Type: minor
Connects-To: #736
Signed-off-by: Andreas Fitzek <andreas@resin.io>
2017-12-18 17:03:16 +01:00
Tim Perry
dba8db19cb Move from open to opn
Change-Type: patch
2017-12-18 14:55:07 +01:00
Tim Perry
1c7a0ba4e1 Ensure logout works even with invalid credentials, or if not logged in
Before this point, if you had an invalid token, an expired token, or a
token for a different site, you couldn't log out to clear it properly.

Not a big deal, but awkward and messy, and easily fixed.

Change-Type: patch
2017-12-14 15:34:36 +01:00
Tim Perry
bd6cb04a2b Replace underscore.string usage with lodash 2017-11-27 12:03:04 +02:00
Tim Perry
001c8f9601 Inline the entire resin-cli-auth module
This is part of a general push to demodularize any code that isn't
realistically reusable outside resin-cli, to make the codebase easier to
manage and understand. Once this is done, we'll deprecate the original
module itself.

Change-Type: patch
2017-11-27 12:02:57 +02:00
Tim Perry
eb68bb1a1a Set up TypeScript compilation, and make a small start on converting the CLI
Change-Type: patch
2017-11-23 19:28:15 +02:00
Tim Perry
49d78c56fa Print a deprecation message if you use the old os configure format 2017-11-16 19:51:34 +01:00
Tim Perry
e38a0c0047 Allow os configure to configure for an app, not just a specific device
This moves to --app and --uuid options, and deprecates the previous
format, but doesn't immediately remove it so this is not a breaking
change.

Connects-To: #691
Change-Type: minor
2017-11-16 19:51:34 +01:00
Tim Perry
eef0d9cdbe Print help even for expected errors
Change-Type: patch
2017-11-16 19:51:17 +01:00
Tim Perry
08c40195e5 Make sure everything uses the same shared deviceApiKey option 2017-11-16 19:09:20 +01:00
Tim Perry
87f46cb957 Allow non-interactice config generate for simple network settings
Fixes #695
Fixes #410
Change-Type: minor
2017-11-16 15:04:58 +01:00