Commit Graph

49 Commits

Author SHA1 Message Date
Otávio Jacobi
b9722c6796 Bump oclif core & use default missing flag handler
Change-type: patch
2023-12-08 12:06:54 -03:00
Thodoris Greasidis
ca97678358 Fix surfacing incompatible device type errors as not recognized
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-11-10 16:52:14 -08:00
Scott Lowe
2b6a2142eb Improve UX for offline usage
Change-type: minor
Resolves: #2372
Signed-off-by: Scott Lowe <scott@balena.io>
2021-11-25 15:14:39 +00:00
Paulo Castro
deb3e4c4ac Improve error handling (remove most occurrences of process.exit())
Finally delete the deprecated exitWithExpectedError() function from
'lib/errors.ts'.

Change-type: patch
2021-08-27 00:53:21 +01:00
Paulo Castro
8338e2e933 os download: Improve error message for misspelled device type names
Change-type: patch
2021-07-23 15:10:00 +01:00
Scott Lowe
d3586696b4 Fix handling of thrown strings
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-01-15 16:45:01 +01:00
Marios Balamatsias
074fe010bd errors: Make all exclusive flag errors expected
eg Don't report errors if during a push --release-tag
and --detached flags are used.

Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-22 17:10:10 +02:00
Scott Lowe
611f59a0da Add organizations support to app create command
Change-type: minor
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-15 14:58:17 +01:00
josecoelho
439d8391ee Improve error message for issues to access balena settings
Update balena-settings-storage from 6.0.1 to 7.0.0

Resolves: #1667
Change-type: patch
2020-12-15 20:14:54 +13:00
Paulo Castro
07666e953f Livepush: Extend CTRL-C availability (don't ignore CTRL-C during image build)
Change-type: patch
2020-12-09 22:49:47 +00:00
Marios Balamatsias
a19132d3bf errors: Add expected errors for device deactivation
Change-type: patch
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-09 14:52:51 +02:00
Marios Balamatsias
cb2b90732b device: Add deactivate command
Resolves: #1545
Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-07 13:12:50 +02:00
Paulo Castro
a4fd7d6118 Fix debug message logic (don't suggest --debug if it is already being used)
Change-type: patch
2020-11-19 18:13:45 +00:00
Scott Lowe
1b0c14feab Avoid reporting balenarc parsing errors
Change-type: patch
Connects-to: #1100
Signed-off-by: Scott Lowe <scott@balena.io>
2020-11-11 17:04:26 +01:00
Scott Lowe
592efd0a2e Treat authorization errors as expected
Change-type: patch
Resolves: #2035
Signed-off-by: Scott Lowe <scott@balena.io>
2020-10-13 10:16:16 +02:00
Paulo Castro
cf376316bc Support BALENARC_NO_SENTRY env var to disable Sentry.io error reporting
Change-type: minor
2020-10-10 00:45:55 +01:00
Scott Lowe
0a8b3ce4e4 Add new command support
Change-type: minor
Resolves: #766 #1546
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-25 16:20:45 +02:00
Nick
edaf76e329
device move: Add ability to move multiple devices in one command
Change-type: minor
2020-07-15 08:26:31 -06:00
Scott Lowe
9697081d73 Convert command tunnel to oclif, and fix port map spec issues.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-01 11:25:09 +02:00
Scott Lowe
512cfa3da1 Convert command ssh to oclif.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-26 12:46:27 +02:00
Pagan Gazzard
667358b23e Import just strip-tags from common-tags to reduce startup time
This saves ~100ms for me on startup with no fast-boot cache and ~50ms
with a fast-boot cache

Change-type: patch
2020-06-25 22:56:43 +01:00
Scott Lowe
5b5f258685 Improve handling of oclif parser errors.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-24 12:44:42 +02:00
Pagan Gazzard
7794158062 Stub the errors module without needing two export methods
Change-type: patch
2020-06-22 17:16:45 +01:00
Paulo Castro
2859d16b31 Improve error handling for oclif "missing required arg"
Change-type: patch
2020-06-22 01:14:01 +01:00
Scott Lowe
ab673f884a Convert device commands to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-18 13:59:41 +02:00
Paulo Castro
c619bd4b99 Update 'balena-lint' and apply new prettier rules
Change-type: patch
2020-06-15 23:53:07 +01:00
Paulo Castro
3ecf461d55 Update 'balena-sdk' from v12 to v13 and update code and tests as needed
Change-type: patch
2020-06-15 23:53:01 +01:00
Scott Lowe
ff282205d5 Restrict error handler typing
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-10 12:37:09 +02:00
Scott Lowe
555096db6b Fix handling of BalenaExpiredToken error
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-09 17:40:06 +02:00
Scott Lowe
92bfa574e3 Add unit tests for errors module
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
Resolves: #1807
2020-05-19 12:39:46 +02:00
Paulo Castro
5b33826309 balena app create: fix application existence check
Resolves: #1824
Change-type: patch
2020-05-14 11:15:51 +01:00
Scott Lowe
98a2c0635d Improve presentation of errors, help
Change-type: patch
Resolves: #1779 #1757
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-06 10:48:50 +02:00
Scott Lowe
9b1c3c665b Refactor: move error related functions into error module
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 14:41:39 +02:00
Paulo Castro
655534469a Review 'instanceof' usage with classes of external packages
Change-type: patch
2020-04-18 02:50:00 +01:00
Scott Lowe
8658104647 Add support for authentication checking to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-24 10:19:18 +01:00
Paulo Castro
5a80654305 Avoid Sentry reporting of selected common "expected" errors
Change-type: patch
2020-03-09 12:51:56 +00:00
Paulo Castro
d2df2c7b60 Fix occasional "CLI prints 'null' and exits" (replace old Raven/Sentry SDK)
Resolves: #1523
Connects-to: #1333
Connects-to: #1193
Change-type: patch
2020-03-09 12:51:56 +00:00
Paulo Castro
d94a74dfee Fix 'os configure --config', and migrate it to oclif + TypeScript
Also add more non-interactive configuration options:
--config-network, --config-wifi-*, --config-app-update-poll-interval

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 21:09:18 +00:00
Paulo Castro
a25a52c21b Error handling: add ExpectedError type as alternative to exitWithExpectedError()
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 19:36:43 +00:00
Paulo Castro
2ff427fb90 Refactor oclif integration and preparser
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-17 17:20:16 +01:00
Matthew McGinn
d92e076829
chore: fix up small typos, remove gitter link
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-17 20:12:52 +01:00
Paulo Castro
abf573fa47 Begin the transition to oclif with 'balena env add' (fix dropped leading
zero in device UUID).

This commit is fairly chunky because it adds the oclif dependency for
the first time, and refactors the CLI help and docs generation code to
accommodate both Capitano and oclif.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:56 +01:00
Paulo Castro
a883948d56 Bump resin-multibuild (2.1.4), docker-progress (3.0.5), resin-lint (3.0.1)
The new resin-multibuild and docker-progress versions widen the range
of errors caught by the 'balena push' and 'balena build' commands.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-18 14:09:06 +00:00
Tim Perry
4907fccf48 Rename everything from 'resin' to 'balena'
Change-type: major
2018-10-29 22:29:02 +01:00
Tim Perry
4b818ad51c Style improvements after review 2018-05-03 18:59:28 +02:00
Tim Perry
c2518448a3 Catch require errors and provide helpful instructions
Change-Type: patch
2018-05-03 16:01:40 +02:00
Tim Perry
e7a8deed05 Inline the entire resin-cli-errors module
It's awkward that error handling requires you to go to a different
package, it makes things more complicated, and there's nowhere else that
really should be reusing this logic. Let's inline it, so we can
deprecate the module entirely.

Change-Type: patch
2018-05-03 15:15:03 +02:00
Tim Perry
83a76f7d6f Start using Prettier
Change-Type: patch
2018-01-10 09:23:00 +01:00
Tim Perry
ffffd447f2 Convert most of utils to TypeScript
Change-Type: patch
2018-01-09 17:14:48 +01:00