Compare commits

...

4039 Commits

Author SHA1 Message Date
8eed1e0362 Dedupe dependencies 2023-12-12 12:01:29 -03:00
d42812f202 ssh: use the new container name format
The supervisor is changing the container name format from

`<serviceName>_<imageId>_<releaseId>_<commit>` to
`<serviceName>_<commit>`. This updates the SSH command to work with both
formats.

Change-type: minor
Depends-on: balena-os/balena-supervisor#2136
2023-12-12 11:32:53 -03:00
d9fed9c34c v17.4.6 2023-12-08 15:55:53 +00:00
81ee9f397f Merge pull request #2711 from balena-io/bump-oclif-core
Bump oclif core & use default missing flag handler
2023-12-08 15:54:47 +00:00
b9722c6796 Bump oclif core & use default missing flag handler
Change-type: patch
2023-12-08 12:06:54 -03:00
29ade0f696 v17.4.5 2023-12-04 14:08:31 +00:00
d5ae612513 Merge pull request #2707 from balena-io/bump-ts
Update TypeScript to 5.3.2
2023-12-04 14:07:30 +00:00
65ba63d1a8 Stop testing dependency deduplication on the custom test runners
That's since we already run that test as part of
flowzone's default "Test npm (18.x)", and the
custom tests are using the latest node & npm
version of the selected major.

Change-type: patch
2023-12-04 15:39:10 +02:00
f5ffa7d84f Temporarily pin oclif-core to ~3.11.0 to deduplicate the dependencies
Change-type: patch
2023-12-04 15:36:43 +02:00
dac3ace61d Update TypeScript to 5.3.2
Change-type: patch
2023-11-30 00:07:17 +02:00
72459a04d1 v17.4.4 2023-11-20 17:57:23 +00:00
1e83fcf1e3 Merge pull request #2706 from balena-io/fix-balena-block-create
Fix balena block create to actually create a block
2023-11-20 17:56:32 +00:00
b8769bb9e9 Fix balena block create to actually create a block
Change-type: patch
2023-11-20 13:33:35 -03:00
9f52ee8b21 v17.4.3 2023-11-17 15:39:24 +00:00
90b65cd06b Merge pull request #2683 from balena-io/bump-oclif-core-to-v3
Bump oclif-core to v3
2023-11-17 15:38:25 +00:00
72a924f00e Bump oclif-core to v3
Change-type: patch
2023-11-16 15:06:24 -03:00
e4624eda10 v17.4.2 2023-11-15 11:02:24 +00:00
4173cd82e6 Merge pull request #2697 from balena-io/vipul/automate-capitan
Automatically generate Capitano Docs configuration
2023-11-15 11:01:38 +00:00
b393f27e1b Remove authentication directory
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 15:55:03 +05:30
1a4a0e2439 Move auth commands into command directories
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 15:10:22 +05:30
4cd8f4c16e Docs: Generate balena auto-completion
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:08:08 +05:30
2de9d526e5 Docs: Move commands to their own directories, away from their categories
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:07:34 +05:30
d9427c3c59 Docs: Generate balenaCLI with automatic configuration
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:07:01 +05:30
fc0cfac475 Docs: Create version command directory
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:06:45 +05:30
99094dbfda Throw error if command directory rules not followed
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:06:35 +05:30
0711eefb7c Update all imports to match new command directory structure
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:06:19 +05:30
dc40b0d969 Docs: Move CLI commands files to command directories
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:05:58 +05:30
4b5def0a8a Docs: Automatically generate Capitano configuration
Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-15 13:05:39 +05:30
f44fa38113 v17.4.1 2023-11-13 19:18:47 +00:00
167dfeb269 Merge pull request #2701 from balena-io/bump-shrinkwrap
Bump shrinkwrap
2023-11-13 19:17:53 +00:00
a816548bb5 Bump shrinkwrap
Change-type: patch
2023-11-13 15:43:13 -03:00
94001efc81 v17.4.0 2023-11-10 16:28:02 +00:00
8bfafe8ecc Merge pull request #2692 from bbugh/device-json
device: Add `--json` option for JSON output
2023-11-10 13:26:59 -03:00
d78045b6ab device: Add --json option for JSON output
change-type: minor
2023-11-10 12:10:53 -03:00
11eabc4b96 v17.3.2 2023-11-10 11:03:00 +00:00
bfaa91c752 Merge pull request #2700 from balena-io/update-@balena/compose-3.0.5
Update @balena/compose to 3.0.5
2023-11-10 13:02:02 +02:00
1b615e4690 Update @balena/compose to 3.0.5
Update @balena/compose from 3.0.2 to 3.0.5

Change-type: patch
2023-11-10 11:05:42 +02:00
7954e13154 v17.3.1 2023-11-09 17:26:42 +00:00
45d8872a82 Merge pull request #2699 from balena-io/pipeline
Use `pipeline` instead of `.pipe` when downloading OS image
2023-11-09 17:25:34 +00:00
56cff46408 Use pipeline instead of .pipe when downloading OS image
Change-type: patch
2023-11-09 13:38:17 -03:00
47a1a9c6af v17.3.0 2023-11-06 20:19:10 +00:00
a434a5e657 Merge pull request #2689 from mlveggo/add_device_start_stop_service
Add device start-service and stop-service commands
2023-11-06 15:18:14 -05:00
221c213791 Add device start-service and stop-service commands
Change-type: minor
2023-11-06 16:13:51 -03:00
d2150c5cb7 v17.2.4 2023-11-06 19:12:02 +00:00
70e113152d Merge pull request #2696 from balena-io/fix-dsutils
Dedupe shrinkwrap
2023-11-06 16:11:13 -03:00
4a64102d67 Dedupe shrinkwrap
Change-type: patch
2023-11-06 14:11:38 -03:00
9bf267166e v17.2.3 2023-11-03 16:34:18 +00:00
f12249bc81 Merge pull request #2694 from balena-io/vipul/add-them-docs
Generate docs for recently supported commands
2023-11-03 16:33:14 +00:00
80d6c71b02 Update CONTRIBUTING.md with docs instructions
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-03 20:39:25 +05:30
9ef4117fb8 Generate docs for recently supported commands
Added documentation for `balena fleet pin` and other recently supported commands

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
2023-11-03 20:28:19 +05:30
25f3bf1fbe v17.2.2 2023-10-30 12:25:19 +00:00
fe65351666 Merge pull request #2672 from balena-io/bump-eslint
Bump @balena/lint
2023-10-30 12:24:13 +00:00
7d13946c3e Bump balena-lint to 7.2.1
Change-type: patch
2023-10-30 07:45:51 -04:00
1ffa8d38f1 v17.2.1 2023-10-26 21:28:48 +00:00
6914d39370 Merge pull request #2691 from balena-io/bump-balena-sdk
Update balena-sdk and deduped dependencies
2023-10-26 21:27:22 +00:00
04db9c7a91 Update balena-sdk and deduped dependencies
Update balena-sdk from 18.0.0 to 19.0.0
Update balena-preload from 14.0.3 to 15.0.1
Update balena-image-manager from 9.0.2 to 10.0.1

Change-type: patch
2023-10-26 16:27:43 -03:00
c785d01a1c v17.2.0 2023-10-20 13:45:59 +00:00
87ba364f89 Merge pull request #2685 from bbugh/add-releases-json
Add --json option to `release` and `releases`
2023-10-20 10:44:52 -03:00
b7e5915c7a release: Add '--json' option for JSON output
change-type: minor
2023-10-20 07:42:39 -05:00
0cef6b8f87 releases: Add '--json' option for JSON output 2023-10-20 08:05:36 -03:00
71f1dbd80a v17.1.7 2023-10-20 10:49:19 +00:00
36edcf0cb8 Merge pull request #2688 from balena-io/emty-string-env-tag-values
Support empty string values for `env add` and `tag set`
2023-10-20 13:48:23 +03:00
8204dcad93 tag set: Fix using empty string as a value
Change-type: patch
2023-10-20 13:11:12 +03:00
03bcb6cff7 env add: Fix using empty string as a value
Change-type: patch
2023-10-20 13:11:12 +03:00
66b6eed57c Add tests for empty & non-provided value for the env add command
Change-type: patch
2023-10-20 13:11:12 +03:00
99b0f2c022 Add tests for the tag set command
Change-type: patch
2023-10-20 13:06:39 +03:00
947a9bade7 v17.1.6 2023-10-18 18:16:11 +00:00
15ea601d68 Merge pull request #2686 from balena-io/klutchell-patch-3
Allow custom actions for external contributors
2023-10-18 18:14:54 +00:00
ce888966dd Update npm shrinkwrap
Signed-off-by: Kyle Harding <kyle@balena.io>
2023-10-18 13:04:02 -04:00
3fc6eb7a47 Allow custom actions for external contributors
Change-type: patch
2023-10-18 12:53:43 -04:00
73aebf10bf v17.1.5 2023-10-05 10:54:36 +00:00
292c372eb4 Merge pull request #2682 from balena-io/fix-ssh-service-stdin
Fix ssh ignoreStdin device argument
2023-10-05 07:53:30 -03:00
dc3261d9c7 Fix ssh ignoreStdin device argument
Change-type: patch
2023-10-05 07:05:53 -03:00
301d0ab3a0 v17.1.4 2023-09-29 12:40:52 +00:00
efe0a018d7 Merge pull request #2679 from balena-io/bump-oclif-to-latest
Bump oclif to ^3.17.1
2023-09-29 12:39:46 +00:00
fa2a232e5f Bump oclif to ^3.17.1
Change-type: patch
2023-09-28 18:35:59 -03:00
da1f022df9 v17.1.3 2023-09-26 13:58:00 +00:00
8e6a6b81d9 Merge pull request #2671 from balena-io/stop-depending-on-old-oclif-libs
Stop depending on old oclif libs and migrate to @oclif/core directly
2023-09-26 13:56:38 +00:00
77906c4152 Move to @oclif/core v2
Change-type: patch
2023-09-26 09:50:39 -03:00
26bc68753b Remove direct dependency to @oclif/config
Change-type: patch
2023-09-26 09:48:13 -03:00
af6b263f7a v17.1.2 2023-09-26 12:14:31 +00:00
a27e216e44 Merge pull request #2678 from balena-io/fix-preload-with-commit-hash
Fix preload with commit hash
2023-09-26 12:13:24 +00:00
50e1efa448 Fix preload with commit hash
Update balena-preload from 14.0.2 to 14.0.3

Change-type: patch
2023-09-26 07:45:56 -03:00
519ac0383a v17.1.1 2023-09-05 15:06:14 +00:00
3d0ef9bc4f Merge pull request #2669 from balena-io/fixes-local-flash-on-unix
Fix local flash on unix environments
2023-09-05 15:05:16 +00:00
49e23464f9 Fix local flash on unix environments
Update etcher-sdk from 8.5.3 to 8.7.0
Change-type: patch
2023-09-05 11:26:06 -03:00
a1c9b4b80e v17.1.0 2023-09-05 13:01:03 +00:00
2b1be3e5d9 Merge pull request #2647 from balena-io/update-oclif
Update oclif, improve help command
2023-09-05 08:59:52 -04:00
e46378ec51 Update oclif, improve help command
Change-type: minor
2023-09-04 21:07:05 -03:00
27ee9c85e7 v17.0.0 2023-08-29 11:45:54 +00:00
21b6ec46e3 Merge pull request #2667 from balena-io/bump-cli-to-node-v18
Update to Node 18
2023-08-29 11:44:48 +00:00
817ce5dc96 Update to Node 18
Change-type: major
2023-08-29 07:35:53 -03:00
d9af28bca7 v16.8.0 2023-08-25 17:47:44 +00:00
8646be7979 Merge pull request #2665 from balena-io/accept-device-application-keys-as-experimental-feature
Accept device & application keys on login as experimental feature
2023-08-25 17:46:52 +00:00
14ba287e0d Accept device & application keys on login as experimental feature
Change-type: minor
2023-08-23 11:12:06 -03:00
1671e46d99 v16.7.9 2023-08-22 13:33:30 +00:00
507333c463 Merge pull request #2663 from balena-io/bumps-sdk-to-v18
Update balena-sdk to v18
2023-08-22 10:32:34 -03:00
8b320d3e9e Update balena-sdk to v18
Update balena-sdk from 17.21.1 to 18.0.0
Update balena-preload from 14.0.0 to 14.0.2
Update balena-image-manager from 9.0.0 to 9.0.2
Change-type: patch
2023-08-22 09:38:39 -03:00
e1be268749 v16.7.8 2023-08-22 11:16:38 +00:00
1a0019e6d0 Merge pull request #2662 from balena-io/otaviojacobi/bumps-to-sdk-17-12-1
Update balena-sdk to ^17.12.1
2023-08-22 11:15:33 +00:00
e79cdb671f Update balena-settings-storage to 8.1.0
Update balena-settings-storage from 7.0.0 to 8.1.0
Change-type: patch
2023-08-21 14:42:28 -03:00
f38e643cf0 env: Stop fetching unnecessary app fields
Change-type: patch
2023-08-21 14:39:16 -03:00
b8e190cd1d Remove redundant envs documentation
Change-type: patch
2023-08-21 14:39:16 -03:00
9cca654bd5 Update balena-sdk to 17.12.1
Update balena-sdk from 17.8.0 to 17.12.1
Change-type: patch
2023-08-21 14:39:16 -03:00
35177e2d2f v16.7.7 2023-08-21 16:56:33 +00:00
1a24b193e7 Merge pull request #2664 from balena-io/otavio-revert-flowzone-to-master
Revert flowzone to master
2023-08-21 16:55:31 +00:00
272915192b Revert flowzone to master
Change-type: patch
2023-08-17 20:22:53 -03:00
96774f4c52 v16.7.6 2023-07-24 13:38:06 +00:00
a034f585ba Merge pull request #2656 from balena-io/fix-app-create
app create: Fix halting with a deprecation warning
2023-07-24 13:37:00 +00:00
365d95c36b app create: Fix halting with a deprecation warning
Change-type: patch
2023-07-21 10:02:32 +03:00
c6313c08ae v16.7.5 2023-07-21 06:59:22 +00:00
f5764c4659 Merge pull request #2655 from balena-io/abstract-fleet-app-block-create
Abstract the fleet/app/block create commands
2023-07-21 09:58:36 +03:00
aff094575b Abstract the fleet/app/block create commands
Change-type: patch
2023-07-20 16:14:52 +03:00
4aaaf64f8d v16.7.4 2023-07-20 10:41:09 +00:00
7b88ce273f Merge pull request #2654 from balena-io/move-discontinued-dt
move: Include fleets of discontinued device types in the fleet selection
2023-07-20 10:40:12 +00:00
b011af89ad move: Include fleets of discontinued device types in the fleet selection
Change-type: patch
2023-07-20 13:03:54 +03:00
1bf8c1bfe7 v16.7.3 2023-07-20 08:30:09 +00:00
2b39d5d111 Merge pull request #2653 from balena-io/promote-discontinued-dt
promote: Allow joining fleets of discontinued device types
2023-07-20 08:29:20 +00:00
98663af7f6 Rerun npm-shrinkwrap.json deduplication 2023-07-19 19:44:43 +03:00
5628824bee promote: Allow joining fleets of discontinued device types
Change-type: patch
2023-07-19 19:17:27 +03:00
d12d7996bc v16.7.2 2023-07-19 01:43:55 +00:00
0dcf4cbff6 Merge pull request #2650 from balena-io/bump-balena-compose
Update balena-compose to v3.0.2
2023-07-19 01:42:56 +00:00
884e37d242 Update balena-compose to v3.0.2
Update balena-compose to v3.0.2

That release removes the use of the `cachefrom` on pull tasks, which
there is good evidence to suggest is the cause of #2165

Change-type: patch
2023-07-18 18:14:56 -04:00
f4a24e26c3 v16.7.1 2023-07-18 20:27:07 +00:00
122eccf3dc Merge pull request #2652 from balena-io/update-balena-sdk-17.8.0
Update balena-sdk to 17.8.0
2023-07-18 20:26:16 +00:00
bd598788dc Update balena-sdk to 17.8.0
Update balena-sdk from 17.0.0 to 17.8.0

Change-type: patch
2023-07-18 22:48:54 +03:00
406482b4da v16.7.0 2023-07-17 19:59:52 +00:00
a381c97ca9 Merge pull request #2649 from balena-io/preload-no-pin-device-to-release
preload: Add the --no-pin-device-to-release flag to avoid interactive questions
2023-07-17 19:59:04 +00:00
8ce78ba33c Rerun npm-shrinkwrap.json deduplication 2023-07-17 11:25:02 +03:00
f53f148c89 preload: Add the --no-pin-device-to-release flag to avoid interactive questions
Change-type: minor
See: https://balena.zulipchat.com/#narrow/stream/345746-aspect.2Fproduct/topic/Level.20-.20need.20thoughts.20on.20questions.20.26.20feature.20suggestions
2023-07-17 11:19:03 +03:00
0086feb645 v16.6.6 2023-07-10 17:16:08 +00:00
4ee55b049f Merge pull request #2646 from balena-io/reduce-lodash-usage
Reduce lodash usage in common user interaction patterns
2023-07-10 17:15:14 +00:00
90c6f121cc Rerun npm-shrinkwrap.json deduplication 2023-07-10 19:36:36 +03:00
d3c27ae859 Reduce lodash usage in common user interaction patterns
Change-type: patch
2023-07-10 17:19:01 +03:00
8f39c1de6c v16.6.5 2023-07-09 21:29:55 +00:00
4df1831187 Merge pull request #2645 from balena-io/application-create-hostApp-based-supported-DTs
fleet/block/app create: Fetch the supported device types using the hostApps
2023-07-09 21:29:02 +00:00
2bce761ace Rerun npm-shrinkwrap.json deduplication 2023-07-07 20:17:53 +03:00
d78b76aceb fleet/block/app create: Fetch the supported device types using the hostApps
Change-type: patch
See: https://balena.zulipchat.com/#narrow/stream/360838-balena-io.2Fos.2Fdevices/topic/state.20field.20in.20device-type.2Ejson
See: https://balena.fibery.io/Organisation/Improvements-849#Improvements/Stop-relying-on-device-types-v1-device-type.json-for-unrelated-things-257
2023-07-07 19:57:36 +03:00
f07f6b84d4 v16.6.4 2023-07-06 13:58:27 +00:00
d297a10570 Merge pull request #2643 from balena-io/bump-balena-compose
Bump balena-compose to v2.3.0
2023-07-06 13:57:37 +00:00
9d0b82122a Bump balena-compose to v2.3.0
This allows the the CLI to use docker registry config when querying the
images manifest.

Relates-to: balena-io-modules/balena-compose#31
Change-type: patch
2023-07-05 15:46:42 -04:00
338477463a v16.6.3 2023-06-30 17:07:34 +00:00
d1275760fa Merge pull request #2641 from balena-io/drop-toolbelt
Pin dockerode and drop docker-toolbelt
2023-06-30 20:06:46 +03:00
0f4054fa4d Remove redundant dependency on docker-toolbelt
Change-type: patch
2023-06-30 19:22:07 +03:00
7545fc5d6e Pin dockerode to v3.3.3
v3.3.4 introduces a regression that is fixed by https://github.com/apocas/dockerode/pull/695 but Dockerode has not published a version that includes the fix yet. Pin the dependency to ensure we don’t ever update to a broken version.

Change-type: patch
2023-06-30 19:19:52 +03:00
a1f25809cb v16.6.2 2023-06-29 12:27:14 +00:00
e0a3c4bd95 Merge pull request #2640 from balena-io/make-apple-notarization-team-id-public
macos notarization: Expose team ID instead of keeping it in secrets
2023-06-29 12:26:27 +00:00
d843e75512 macos notarization: Expose team ID instead of keeping it in secrets
Change-type: patch
2023-06-29 07:41:07 -04:00
72c57608d5 v16.6.1 2023-06-28 12:47:56 +00:00
d9de7636db Merge pull request #2639 from balena-io/update-electron-notarize
Drop `electron-notarize` dependency in favor of `@electron/notarize`
2023-06-28 12:47:13 +00:00
10b5af6967 Drop electron-notarize dependency in favor of @electron/notarize
Change-type: patch
2023-06-28 08:01:39 -04:00
51c050c725 v16.6.0 2023-06-26 13:05:11 +00:00
eb52c47de5 Merge pull request #2631 from balena-io/add-api-key-revoke-command
api-key: Add `revoke` command which accepts a list of API key ids
2023-06-26 09:04:21 -04:00
4b1378dfbc api-key: Add revoke command which accepts a list of API key ids
Change-type: minor
2023-06-26 08:21:23 -04:00
1a77d86347 v16.5.2 2023-06-09 16:03:10 +00:00
bd5188f4b9 Merge pull request #2637 from balena-io/klutchell-patch-2
Re-enable automatic github final releases
2023-06-09 16:02:22 +00:00
034f459bfa Update npm-shrinkwrap
Signed-off-by: Kyle Harding <kyle@balena.io>
2023-06-09 11:23:49 -04:00
bc405d997e Re-enable automatic github final releases
Change-type: patch
2023-06-09 11:05:01 -04:00
af27cf2cbe v16.5.1 2023-06-02 06:30:00 +00:00
83b9bf67c2 Merge pull request #2636 from balena-io/bump-ts
Update TypeScript to 5.1.3
2023-06-02 06:29:11 +00:00
abd73b805b Update TypeScript to 5.1.3
Change-type: patch
2023-06-01 21:58:34 +03:00
37bfd4db98 v16.5.0 2023-05-25 16:45:02 +00:00
be74143d5f Merge pull request #2633 from balena-io/add-block-create-command
Add `balena block create` command for creating Blocks
2023-05-25 16:44:19 +00:00
9975e5d9ac Add balena block create command for creating Blocks
Change-type: minor
2023-05-25 12:00:39 -04:00
1341413966 v16.4.0 2023-05-25 15:53:23 +00:00
1a5b914a6f Merge pull request #2632 from balena-io/add-app-create-command
Add `balena app create` command for creatings Apps
2023-05-25 15:52:37 +00:00
c5e8f0d6ea Add balena app create command for creatings Apps
Change-type: minor
2023-05-25 11:09:02 -04:00
3a143fe413 v16.3.0 2023-05-25 15:06:39 +00:00
3445e4a08e Merge pull request #2630 from balena-io/add-command-to-list-user-api-keys
Add `balena api-keys` command for listing user API keys
2023-05-25 15:05:38 +00:00
166130c3df Add balena api-keys command for listing user/fleet API keys
Change-type: minor
2023-05-25 09:11:36 -04:00
c3a8a905f7 v16.2.7 2023-05-24 12:04:59 +00:00
2b878e87d8 Merge pull request #2629 from balena-io/less-requests-2
Fetch the application and its devices in one request in balena devices, device init, ssh, tunnel
2023-05-24 12:04:05 +00:00
063e9d40f0 device init: Avoid extra request when not providing the --fleet option
Change-type: patch
2023-05-24 14:22:04 +03:00
2b58143164 devices: Use a single request when providing the --fleet parameter
Reduces the response time when using
--fleet from 1.5s to 1s.

Change-type: patch
2023-05-24 14:22:04 +03:00
861d4f33b7 ssh,tunnel: Fetch the fleet & devices in one request
Change-type: patch
2023-05-24 14:22:04 +03:00
81f4aae7d2 v16.2.6 2023-05-24 11:17:30 +00:00
46ab335407 Merge pull request #2626 from balena-io/less-requests
Stop fetching unnecessary fields
2023-05-24 14:16:42 +03:00
07cb0cbfcd device init: Stop fetching unnecessary app fields
Change-type: patch
2023-05-24 13:37:19 +03:00
a2392dc580 device move: Stop fetching unnecessary device & app fields
Reduces the amount of device data retrieved
by 66%.

Change-type: patch
2023-05-24 13:37:19 +03:00
8b3235ab2b device register: Stop fetching unnecessary app fields
Change-type: patch
2023-05-24 13:37:19 +03:00
15dac6f194 config generate: Stop fetching unnecessary app fields
Change-type: patch
2023-05-24 13:37:19 +03:00
3c93db8449 devices: Stop fetching unnecessary device fields
Change-type: patch
2023-05-24 13:37:19 +03:00
9d8df0b781 fleet rm,restart,rename,purge: Stop fetching unnecessary app fields
Halves the amout of application data retrieved.

Change-type: patch
2023-05-24 13:37:19 +03:00
bcadbdbed8 push: Stop unnecessarily fetching the application name
Change-type: patch
2023-05-24 13:37:19 +03:00
05a96fa60e ssh,tunnel: Reduce the amount of application fields fetched
Halves the amout of application data retrieved.

Change-type: patch
2023-05-24 13:37:19 +03:00
2e37536e7a orgs: Stop fetching unnecessary org fields
Halves the amount of org data retrieved to
show the list of orgs to select from.

Change-type: patch
2023-05-24 13:37:19 +03:00
025c4ef7f2 fleet create: Reduce the amount of org fields fetched
Halves the amount of org data retrieved to
show the list of orgs to select from.

Change-type: patch
2023-05-24 13:37:19 +03:00
ecbc660bf5 Fetch only the app slug when resolving an app by name
Affects many env & tags commands, as well
as support, releases & preload.

Change-type: patch
2023-05-24 13:37:19 +03:00
ba1f17d537 v16.2.5 2023-05-24 10:30:21 +00:00
3ab8f7500e Merge pull request #2628 from balena-io/73-fix-device-init-os-initialize
Fix device int & os initialize failing to initialize the drive list
2023-05-24 13:29:36 +03:00
0a25bec010 Fix device int & os initialize failing to initialize the drive list
Resolves: #2627
Change-type: patch
2023-05-24 12:47:06 +03:00
01e765e670 v16.2.4 2023-05-23 20:31:27 +00:00
61844f2386 Merge pull request #2625 from balena-io/app-select-reduce-requests
Remove extra request when filling the application selection list
2023-05-23 20:30:32 +00:00
46aa08c953 Remove extra request when filling the application selection list
Saves one request of about 450ms on the
init and move commands.

Change-type: patch
2023-05-23 22:47:10 +03:00
b6c7fb82c3 v16.2.3 2023-05-23 19:46:47 +00:00
fcda09009a Merge pull request #2624 from balena-io/improve-typings
Use stricter typings
2023-05-23 19:46:02 +00:00
1a6fe1f3de Use stricter typings
Change-type: patch
2023-05-23 18:57:54 +03:00
98e91c0607 v16.2.2 2023-05-23 14:02:36 +00:00
bed2387d83 Merge pull request #2623 from balena-io/fix-setting-service-env-vars-by-app-name
env add: Fix accepting fleet names when setting service vars
2023-05-23 14:01:21 +00:00
50e852acee env add: Fix accepting fleet names when setting service vars
Change-type: patch
2023-05-23 15:59:41 +03:00
da30623e4e v16.2.1 2023-05-23 12:28:25 +00:00
7a46b367a7 Merge pull request #2621 from balena-io/sdk-v17
Update balena-sdk to 17.0.0
2023-05-23 12:27:29 +00:00
d9651c7393 Update balena-settings-client to 5.0.2
Change-type: patch
2023-05-23 13:22:38 +03:00
e371b1e759 Update balena-preload & balena-image-manager
Update balena-image-manager from 8.0.1 to 9.0.0
Update balena-preload from 13.0.0 to 14.0.0

Change-type: patch
2023-05-23 13:22:38 +03:00
77cf4af166 Update balena-sdk to 17.0.0
Update balena-sdk from 16.45.1 to 17.0.0

Change-type: patch
2023-05-23 13:22:38 +03:00
9d197317ca v16.2.0 2023-05-19 18:11:57 +00:00
9a8b0b4a0d Merge pull request #2619 from balena-io/alexgg/sb
os configure, config generate: Add '--secureBoot' option to opt-in secure boot
2023-05-19 18:11:02 +00:00
0c62b9ef08 Deduplicate npm-shrinkwra.json 2023-05-19 20:28:12 +03:00
83a5e7392a secureboot: Retrieve the OS release & contract in one request
Change-type: patch
2023-05-19 19:22:23 +03:00
f0c8c37022 os configure, config generate: Add '--secureBoot' option to opt-in secure boot
Allow to generate a config file with `installer.secureboot` set so that
a secure boot and disk encrypted system can be installed.

Change-type: minor
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2023-05-19 18:10:00 +02:00
ba26d3204d package.json: Update balena-sdk to 16.44.2
Update balena-sdk from 16.40.0 to 16.44.2

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2023-05-19 18:10:00 +02:00
d53542975e flowzone: update custom runs to use macos-12
After the flowzone update to use zstd as compression algorithm for sources
there is an error on macos-11 as tar does not support it.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2023-05-19 11:33:31 +02:00
632296a271 v16.1.0 2023-05-16 18:26:10 +00:00
3e089fcdb2 Merge pull request #2616 from balena-io/ab77/operational
build linux/arm packages
2023-05-16 18:25:27 +00:00
d61c300750 build linux/arm packages
change-type: minor
2023-05-16 10:39:00 -07:00
a0a97c5f40 v16.0.0 2023-05-16 00:02:37 +00:00
165f3b83ca Merge pull request #2618 from balena-io/node-16
Update to Node 16
2023-05-16 00:01:48 +00:00
5bf95300ee support: Change the printed support expiry date in ISO 8601 UTC format
Change-type: major
2023-05-12 19:00:10 +03:00
adb460b270 logs: Change the timestamp format to ISO 8601 UTC
Resolves: #2608
Change-type: major
2023-05-12 19:00:10 +03:00
ca80bd52fe Pin flowzone to v4.7.1
The macos-11 runners apparently do not support zst compression format as
added in flowzone 4.7.2. While support is rolled out, we can keep
the flowzone branch to the previous working version.

Change-type: patch
2023-05-11 19:10:10 -04:00
281f8abb9a Update etcher-sdk to v8.5.3
This removes the dependency on our custom fork of [node-usb](https://github.com/balena-io-modules/node-usb)
and uses the maintained building method of the official node-usb repo

Change-type: patch
2023-05-11 18:10:52 -04:00
2cf2918d73 Update vercel/pkg to v5.8.1
This seems to be needed to build the binaries for node v16 since earlier
versions failed with

```
Error: Could not detect abi for version 16.13.0 and runtime node.  Updating "node-abi" might help solve this issue if it is a new release of node
```

Change-type: patch
2023-05-11 17:49:49 -04:00
7dfb7474f5 Update to Node 16
This also drops support for Node 14

Change-type: major
2023-05-11 17:49:37 -04:00
6ee0b48c9a v15.2.3 2023-05-03 20:03:49 +00:00
bd01fbf90c Merge pull request #2614 from balena-io/local-release-uuid
Use valid release uuid for local releases
2023-05-03 20:02:59 +00:00
cd19845b6b Use valid release uuid for local releases
On local push, the CLI uses `localrelease` as the `commit` property for
the development application. This is not a valid uuid and will not be
read properly by the supervisor, as seen in

https://github.com/balena-os/balena-supervisor/blob/master/src/compose/service.ts#L652

While this is not a problem right now, the commit is becoming the main
way to identify a service release (replacing `releaseId` and `imageId`),
and the invalid release uuid could cause update issues when pushing a
local release on when using some API endpoints.

Change-type: patch
Relates-to: balena-os/balena-supervisor#2136
2023-05-03 15:08:19 -04:00
5545883c3f v15.2.2 2023-04-28 16:16:44 +00:00
75a380b0ba Merge pull request #2615 from balena-io/remove-nvmrc
Remove nvmrc
2023-04-28 16:15:57 +00:00
35fe7c6a58 Remove nvmrc
There is not a lot of benefit to using `.nvmrc` as it still requires
`nvm use`, and not everybody uses `nvm`. The call to `npm install` will
already warn about using the wrong version.

Change-type: patch
2023-04-28 10:27:15 -04:00
69249b3139 v15.2.1 2023-04-28 09:25:50 +00:00
bf897fd56d Merge pull request #2612 from balena-io/sync-tslib
Fix tslib going out of sync causing HUP to fail
2023-04-28 09:25:01 +00:00
150c6e75f5 Fix tslib going out of sync causing HUP to fail
Change-type: patch
2023-04-27 14:07:57 +03:00
e8bc43dc64 v15.2.0 2023-04-05 13:09:24 +00:00
1213689de2 Merge pull request #2606 from balena-io/update-balena-sdk-16.40.0
Add support for device restarts in open-balena
2023-04-05 13:08:14 +00:00
c1017e8e27 Add support for device restarts in open-balena
Update balena-sdk from 16.28.2 to 16.40.0

Change-type: minor
2023-04-05 12:57:33 +03:00
7ad9e685f6 v15.1.3 2023-04-05 08:06:56 +00:00
c778aaffaf Merge pull request #2607 from balena-io/update-balena-sdk-16.28.2
devices supported: Fix showing types without a valid & finalized release
2023-04-05 08:06:05 +00:00
b98047cacf devices supported: Fix showing types without a valid & finalized release
Update balena-sdk from 16.28.0 to 16.28.2

Resolves: #2524
Change-type: patch
2023-04-05 10:19:39 +03:00
03ace6e4b2 v15.1.2 2023-03-27 15:14:47 +00:00
9b4701bcb7 Merge pull request #2601 from balena-io/use-satisfies
Improve type checking by using the satisfies operator
2023-03-27 18:13:56 +03:00
174312977a Improve type checking by using the satisfies operator
Change-type: patch
2023-03-27 16:39:09 +03:00
963d9af817 v15.1.1 2023-03-17 10:20:03 +00:00
af5ec51232 Merge pull request #2600 from balena-io/bump-ts
Update TypeScript to 5.0.2
2023-03-17 12:19:13 +02:00
1cd9fbf6a0 Update TypeScript to 5.0.2
Change-type: patch
2023-03-16 20:53:08 +02:00
72639e9e59 v15.1.0 2023-03-14 20:19:08 +00:00
447dcc1480 Merge pull request #2599 from balena-io/kyle/balena-compose-v2.2.x
Update balena-compose to v2.2.1
2023-03-14 16:18:19 -04:00
564716faa7 Update balena-compose to v2.2.1
Update balena-compose from 2.1.1 to 2.2.1

Change-type: minor
Signed-off-by: Kyle Harding <kyle@balena.io>
2023-03-14 14:59:52 -04:00
3e5b4457c2 v15.0.6 2023-03-13 14:03:48 +00:00
793e70d909 Merge pull request #2597 from balena-io/explicitly-select-devices-fields
Devices: explicitly fetches only used fields
2023-03-13 11:02:51 -03:00
5761a306be Devices: explicitly fetches only used fields
Change-type: patch
2023-03-13 09:35:43 -03:00
adff0f2a0a v15.0.5 2023-03-10 16:25:40 +00:00
4ec45a0c43 Merge pull request #2596 from balena-io/fix-is-legacy-check
Fix isLegacy check which should always relay on the slug
2023-03-10 18:24:48 +02:00
ecf4b046b5 Fix application isLegacy check for rename and deploy
Change-type: patch
2023-03-10 16:33:00 +01:00
b0cae93ac9 v15.0.4 2023-02-21 07:24:19 +00:00
53b66678d4 Merge pull request #2583 from balena-io/hraftery-patch-1-1
Clarify update rate of update-notifier info
2023-02-21 09:23:30 +02:00
0b9b65ef88 patch: Clarify update rate of update notifier info
If the cli has not been run in a while, it will show old update information. It's not obvious why, and this might lead to confusion. So this commit just adds a comment to clarify that out-of-date update notifier info is expected behaviour, and why.
2023-01-26 14:15:43 +11:00
8a84d9d792 v15.0.3 2023-01-18 16:16:39 +00:00
c535b8e1ea Merge pull request #2582 from balena-io/https-npm
Use https for the npm deprecation check, avoiding a redirect
2023-01-18 16:15:01 +00:00
234fb6cd39 Use https for the npm deprecation check, avoiding a redirect
Change-type: patch
2023-01-18 13:11:31 +00:00
8714830b48 v15.0.2 2023-01-14 07:35:13 +00:00
0e07b36691 Merge pull request #2580 from balena-io/joshbwlng/fix-typo
Fix push --nolive doc typo
2023-01-14 09:33:56 +02:00
ba80d3c38c Fix push --nolive doc typo
Change-type: patch
2023-01-13 13:36:44 +09:00
e65dc82cfe v15.0.1 2023-01-10 13:43:24 +00:00
bc727521c6 Merge pull request #2571 from balena-io/nodejs-14
Update to Node 14
2023-01-10 08:41:54 -05:00
a8c0c884d3 Extra linting 2023-01-03 16:08:10 -03:00
b11c7157d3 Update to node 14 2023-01-03 16:04:24 -03:00
578de7bcd4 Process livepush build logs inline
When using livepush, the CLI parses the build logs to obtain the stage
image ids, which are necessary for properly running livepush.

This process used to store the full log output in memory before parsing
the logs for obtaining the stage ids. We have seen this cause issues
before because of the excessive memory usage and it is one the suspects
of #2165, which is blocking the update to Node 14

Change-type: patch
2023-01-03 12:29:54 -03:00
cfc6b3ce9e v15.0.0 2023-01-02 15:21:59 +00:00
1c7a354fe7 Merge pull request #2573 from balena-io/balena-preload-13
Upgrade balena-preload to 13.0.0
2023-01-02 10:20:01 -05:00
40a0941ca3 preload: Drops ability to preload Intel Edison (EOL 2017)
Upgrade balena-preload from 12.2.0 to 13.0.0

Change-type: major
Signed-off-by: Edwin Joassart <edwin.joassart@balena.io>
2023-01-02 15:34:32 +01:00
0ab4760272 v14.5.18 2022-12-29 07:20:50 +00:00
42b2269e81 Merge pull request #2576 from balena-io/flowzone-npm-ci
Update flowzone tests to use npm ci
2022-12-29 02:19:24 -05:00
c818d846b3 Update flowzone tests to use npm ci
Will also make sure that the shrinkwrap is
matching the committed package.json.

Change-type: patch
2022-12-29 08:24:24 +02:00
3328f40416 v14.5.17 2022-12-28 23:56:12 +00:00
58d10c1908 Merge pull request #2575 from balena-io/drop-balena-sync
Stop using the deprecated balena-sync module
2022-12-29 01:54:48 +02:00
2fd0ca6a02 Stop using the deprecated balena-sync module
Change-type: patch
2022-12-29 01:05:51 +02:00
173028fd0d v14.5.16 2022-12-28 23:01:25 +00:00
62d5bf4436 Merge pull request #2574 from balena-io/align-package-json-shrinkwrap
Update the npm-shrinkwrap.json dependencies to match the package.json
2022-12-29 01:00:11 +02:00
63a0d19770 Update the npm-shrinkwrap.json dependencies to match the package.json
Change-type: patch
2022-12-28 21:22:48 +02:00
8244636bf2 v14.5.15 2022-12-12 13:41:15 +00:00
6a01fb361c Merge pull request #2570 from balena-io/aethernet-preload-12.2.0
patch: update balena-preload to 12.2.0
2022-12-12 08:39:46 -05:00
ca637b3fb6 patch: update balena-preload to 12.2.0 2022-12-12 13:16:22 +01:00
006293bd01 v14.5.14 2022-12-11 21:46:38 +00:00
338b5d79d3 Merge pull request #2535 from balena-io/multicast-dns-bump
Bump multicast-dns to rebased commit (again)
2022-12-11 16:45:14 -05:00
60dd0daae5 Bump multicast-dns to rebased commit (again)
A recent PR reverted the multicast-dns commit bump from PR #2401. This means that
under some conditions, `npm install` will fail.

See: https://github.com/balena-io-modules/multicast-dns/pull/1
See: https://github.com/balena-io/balena-cli/pull/2401

Change-type: patch
2022-12-11 12:45:49 -08:00
662b8283a6 v14.5.13 2022-12-08 14:00:28 +00:00
cfc866cf41 Merge pull request #2569 from balena-io/gh-runners
Specify gh runner versions for compatibility reasons
2022-12-08 13:58:56 +00:00
e566badfff Build on macos-11 for library compatibility reasons
Change-type: patch
2022-12-08 10:58:40 +00:00
69834c417e Build on ubuntu-20.04 for library compatibility reasons
Change-type: patch
2022-12-08 10:58:25 +00:00
8aa9c62afd v14.5.12 2022-11-21 18:46:49 +00:00
4f29e37fe7 Merge pull request #2565 from balena-io/ab77/operational
Move GH publishing to FZ core
2022-11-21 18:45:25 +00:00
99e8a36bb5 Move GH publishing to FZ core
Change-type: patch
2022-11-21 09:48:09 -08:00
669cbe227f v14.5.11 2022-11-17 18:32:48 +00:00
e9156d77f1 Merge pull request #2532 from balena-io/nvmrc
Adding .nvmrc so we can use nvm use instead of hunting for version
2022-11-17 18:31:28 +00:00
767216c842 Adding .nvmrc so we can use nvm use instead of hunting for version
Change-type: patch
2022-11-16 17:54:42 -08:00
d3018f9061 v14.5.10 2022-11-11 11:24:21 +00:00
37c6ad855b Merge pull request #2557 from balena-io/surface-sdk-incompatible-dt-errors
Surface sdk incompatible dt errors
2022-11-11 11:23:05 +00:00
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
3bb0036ba8 v14.5.9 2022-11-11 00:49:26 +00:00
ac9e2a9e7e Merge pull request #2562 from balena-io/ab77/operational
Prevent git from existing with 141
2022-11-11 00:47:34 +00:00
52e95e6d0a Prevent git from existing with 141
Change-type: patch
2022-11-10 15:52:13 -08:00
c5d2aa7eec v14.5.8 2022-11-10 23:32:21 +00:00
683220e303 Merge pull request #2561 from balena-io/ab77/operational
Replace missing input
2022-11-10 23:30:51 +00:00
44f09b32fa Replace missing input
Change-type: patch
2022-11-10 14:33:13 -08:00
d1a0660a3d v14.5.7 2022-11-10 22:19:22 +00:00
ee1987f188 Merge pull request #2560 from balena-io/ab77/operational
Just ignore errors during publish
2022-11-10 22:17:59 +00:00
39e9997d9e Just ignore errors during publish
Change-type: patch
2022-11-10 13:22:29 -08:00
97b8c75043 v14.5.6 2022-11-10 21:07:35 +00:00
7cb8349f29 Merge pull request #2559 from balena-io/ab77/operational
Ignore PIPE signal
2022-11-10 21:06:18 +00:00
6063f4c776 Ignore PIPE signal
Change-type: patch
2022-11-10 12:13:03 -08:00
4899d545f1 v14.5.5 2022-11-10 20:07:12 +00:00
115bf6433d Merge pull request #2558 from balena-io/ab77/operational
Don't pipefail
2022-11-10 20:05:33 +00:00
e5ce1ade89 Don't pipefail
Change-type: patch
2022-11-10 11:13:37 -08:00
9c4174ea8a v14.5.4 2022-11-10 18:31:21 +00:00
cf16957195 Merge pull request #2556 from balena-io/2537-error-on-incompatible-resolved-device-types
Error when the device type and image parameters do not match
2022-11-10 18:30:05 +00:00
4de369ff95 Error when the device type and image parameters do not match
Resolves: #2537
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-11-10 09:37:22 -08:00
ac3ebff8ee v14.5.3 2022-11-10 17:20:19 +00:00
76b01d92d3 Merge pull request #2555 from balena-io/ab77/operational
Switch to Flowzone
2022-11-10 17:18:49 +00:00
19144163ee Switch to Flowzone
Change-type: patch
2022-11-08 20:56:47 -08:00
535ffccbad v14.5.2 2022-10-21 20:15:35 +03:00
6f5ada9692 Merge pull request #2553 from balena-io/stop-waiting-for-the-analytics-response
Stop waiting for the analytics response
2022-10-21 17:09:08 +00:00
1c7d9255ae Stop waiting for the analytics response
Change-type: patch
See: https://balena.zulipchat.com/#narrow/stream/345884-aspect.2Fanalytics/topic/Balena.20CLI.20analytics-performance
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-21 19:07:39 +03:00
807e6ea2ad v14.5.1 2022-10-21 15:48:13 +03:00
c76f019fd0 Merge pull request #2552 from balena-io/bump-parse-link-header-2.0.0
Bump parse-link-header from 1.0.1 to 2.0.0
2022-10-21 12:45:48 +00:00
3c2c925eed Bump parse-link-header from 1.0.1 to 2.0.0
Bumps [parse-link-header](https://github.com/thlorenz/parse-link-header) from 1.0.1 to 2.0.0.
- [Release notes](https://github.com/thlorenz/parse-link-header/releases)
- [Commits](https://github.com/thlorenz/parse-link-header/compare/v1.0.1...v2.0.0)

---
updated-dependencies:
- dependency-name: parse-link-header
  dependency-type: direct:development
...

Change-type: patch
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 20:10:53 +03:00
14b54be15e v14.5.0 2022-10-18 15:17:13 +03:00
7fb82f7447 Merge pull request #2539 from balena-io/send-tracking-to-analytics-backend
changes analytics endpoint to analytics-backend
2022-10-18 12:14:05 +00:00
4a5d44a0f1 Merge branch 'master' into send-tracking-to-analytics-backend 2022-10-18 08:15:33 -03:00
1cba0284df v14.4.4 2022-10-18 13:36:52 +03:00
6e4fe229bf Merge pull request #2546 from balena-io/update-simple-git
Update simple git
2022-10-18 10:33:17 +00:00
7033075900 Update simple-git to 3.14.1
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-18 09:45:24 +03:00
ded268ff3c automation/check-doc: Convert to typescript 2022-10-18 09:45:24 +03:00
a366f0b7eb automation/check-doc: Rename to .ts 2022-10-18 09:45:24 +03:00
507c8a1bfd v14.4.3 2022-10-18 00:24:29 +03:00
1fb46bfa5d Merge pull request #2545 from balena-io/config-generate-incompatible-dt-error
config generate: Fix the incompatible arch errors showing as not found
2022-10-17 21:20:21 +00:00
2e115968d5 config generate: Fix the incompatible arch errors showing as not found
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-17 23:44:08 +03:00
83020797b0 v14.4.2 2022-10-17 21:15:25 +03:00
0c4647e980 Merge pull request #2544 from balena-io/no-device-type-json-arch-aliases
Stop relying on device-type.json for resolving the cpu architecture
2022-10-17 18:06:05 +00:00
a20d2a04a8 Stop relying on device-type.json for resolving the device type aliases
Resolves: #2541
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-17 19:09:09 +03:00
57b0dccc7d Stop relying on device-type.json for resolving the cpu architecture
Resolves: #2542
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-17 19:09:09 +03:00
d1e3bdf29a keeps events loggiging with default message
change-type: minor
2022-10-17 10:07:51 -03:00
bdf7fedd7a uses amplitude data events format
Change-type: minor
2022-10-14 10:50:12 -03:00
c163662f4a changes analytics endpoint to analytics-backend
change-type: minor
2022-10-13 19:32:55 -03:00
a2823fd3ec v14.4.1 2022-10-12 18:19:30 +03:00
d717352b84 Merge pull request #2530 from balena-io/hraftery-patch-1
Add to description that command is device specific
2022-10-12 14:59:41 +00:00
e46902e683 balena os initialize: Clarify that the process includes flashing
Change-type: patch
2022-10-12 16:45:16 +03:00
e96ef6697e v14.4.0 2022-10-12 16:37:05 +03:00
6f54197b7b Merge pull request #2533 from balena-io/2531-device-register-dt-param
device register: Add support for the `--deviceType` option
2022-10-12 13:31:08 +00:00
34b4ac2d9f device register: Add support for the --deviceType option
Resolves: #2531
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-12 11:15:00 +03:00
f99244603a Update balena-sdk to 16.28.0
Update balena-sdk from 16.22.0 to 16.28.0

Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-10-12 11:15:00 +03:00
523c0af0fb v14.3.1 2022-09-06 08:49:41 -04:00
2206b475c6 Merge pull request #2526 from balena-io/unified-os-release-examples
Add unified OS versions in the examples of the device & os commands
2022-09-06 12:48:06 +00:00
a117dc0382 Add unified OS versions in the examples of the device & os commands
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-09-06 13:26:26 +03:00
cf3e8ff909 v14.3.0 2022-08-17 15:26:40 +03:00
36d1af1e33 Merge pull request #2523 from balena-io/add-release-validate-and-invalidate-commands
release: Add `invalidate` and `validate` commands for invalidating and validating releases (respectively)
2022-08-17 12:24:14 +00:00
18f83092fe v14.2.0 2022-08-16 23:32:01 +03:00
ee3c796787 Merge pull request #2522 from balena-io/add-fleet-pin-and-track-latest-commands
Add fleet `pin` and `track-latest` commands
2022-08-16 20:29:51 +00:00
934c3ddf38 release: Add validate command for validating releases
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-15 19:44:54 +00:00
66e6daf78c release: Add invalidate command for invalidating releases
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-15 19:41:25 +00:00
97eb107de4 fleet: Add track-latest command for tracking the latest release
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-15 15:34:54 -04:00
def205f1fb fleet: Add pin command for pinning fleets to a specific release
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-15 15:06:10 -04:00
5c8f78678b v14.1.0 2022-08-04 17:52:53 +04:00
769f1ca5b4 Merge pull request #2493 from balena-io/add-device-track-command
Add device track command
2022-08-04 13:51:04 +00:00
cb26a736fc Add device track command for pinning a device to the latest release or a specific release
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-03 14:42:25 -04:00
d28847d5aa v14.0.0 2022-08-02 19:08:30 +04:00
c0902bb119 Merge pull request #2514 from balena-io/v14
Release v14
2022-08-02 15:05:58 +00:00
26aae0afab v13.10.1 2022-08-02 02:07:46 +04:00
5f3cf75c1a Merge pull request #2516 from balena-io/2515-fix-balena-deploy-jsesc-dependency
Fix balena deploy missing dependency error
2022-08-01 22:05:55 +00:00
8a7fbdb55d Drop undocumented support for numeric ids in balena device commands
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 18:52:30 +00:00
b260f80bcc Drop support for the deprecated balena device public-url <enable|disable|status> <uuid> and related format
Resolves: #2501
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 18:52:30 +00:00
9ec37975f3 Drop support for numeric fleet id parameters from all commands
Resolves: #2500
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 18:52:25 +00:00
73c487c2f5 Fix balena deploy missing dependency error
Resolves: #2515
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-08-01 19:35:07 +03:00
3cb35ea318 fleet: Add --filter, --no-header, --no-truncate, and --sort options
Resolves: #2503
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
efe6fd22ce fleet: Add --fields and --json options
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
6ee8d8a899 fleet: Use the oclif output formatter
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
c735f13636 config: Drop optional and ignored --type flag
Change-type: patch
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
edb0fdc3c1 Drop deprecated --logs flag
Resolves: #2499
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
14a07ac7f7 Drop support for open-balena-api < v0.131.0
Resolves: #2502
Change-type: major
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-08-01 15:35:13 +00:00
264cd94be5 v13.10.0 2022-07-20 12:25:47 +00:00
2664f4e7fb Merge pull request #2504 from balena-io/add-device-view-option
Add `--view` flag to `device` command for opening a device's dashboard page
2022-07-20 12:23:37 +00:00
3ce2653881 v13.9.0 2022-07-19 12:03:18 +03:00
719860366f Merge pull request #2476 from balena-io/switch-to-compose
Switch to balena-compose
2022-07-19 08:58:59 +00:00
21ded85c7a v13.8.0 2022-07-18 22:55:10 +03:00
c91f67d27e Merge pull request #2505 from balena-io/add-note-option-for-push-and-deploy
Add `--note` option for `push` and `deploy`
2022-07-18 18:26:43 +00:00
18eedfec7f Add --note option for push and deploy
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-07-14 15:44:55 -04:00
1fe0480a8a Add --view flag to device command for opening a device's dashboard page
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-07-14 18:56:51 +00:00
c7f56d92dd Switch to balena-compose
Removes a bunch of individual dependencies by switching to `@balena/compose` which (currently) groups and manages those dependencies together in one package.

Change-type: minor
2022-07-14 13:05:21 +00:00
a92f58134f v13.7.1 2022-07-13 10:50:45 +03:00
cc6a8ef76e Merge pull request #2498 from balena-io/2462-bump-image-manager
os download: Fix resolving to draft releases
2022-07-13 07:48:41 +00:00
88f4a3d88e os download: Fix resolving to draft releases
Resolves: #2462
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-07-13 10:14:30 +03:00
f6d668684a v13.7.0 2022-07-07 11:01:22 +03:00
be7c0dc897 Merge pull request #2496 from balena-io/add-fleet-view-command
Add `--view` flag to `fleet` command for opening a fleet's dashboard page
2022-07-07 07:58:02 +00:00
566b7f97e0 Add --view flag to fleet command for opening a fleet's dashboard page
Change-type: minor
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
2022-07-05 13:14:18 -04:00
f55dd81a19 v13.6.1 2022-06-13 21:40:58 +03:00
dba5349390 Merge pull request #2491 from balena-io/update-balena-sdk-16.22.0
Update balena-sdk to use the native OS release phase & variant fields
2022-06-13 17:25:54 +00:00
6a8dfcc664 Update balena-sdk to use the native OS release phase & variant fields
Update balena-sdk from 16.20.4 to 16.22.0

Change-type: patch
2022-06-09 17:51:55 +03:00
59e35d866f v13.6.0 2022-06-07 17:44:48 +03:00
9235c928f1 Merge pull request #2490 from balena-io/kyle/qemu-v7.0.0
Update QEMU to v7.0.0
2022-06-07 14:38:37 +00:00
3d88f0144a Update QEMU to v7.0.0
Change-type: minor
Signed-off-by: Kyle Harding <kyle@balena.io>
2022-06-06 14:56:10 -04:00
a6b461ba91 v13.5.3 2022-05-31 13:31:31 +03:00
b96da951db Merge pull request #2485 from balena-io/drop-needspasswordreset
Drop the needsPasswordReset property from the tests
2022-05-31 10:26:22 +00:00
8235cead07 Drop the needsPasswordReset property from the tests
Change-type: patch
See: https://github.com/balena-io/balena-api/pull/3665
2022-05-31 12:46:49 +03:00
30b9d9141d v13.5.2 2022-05-31 12:34:18 +03:00
03b41d9989 Merge pull request #2486 from balena-io/npm-dd
Deduplicate npm-shrinkwrap.json
2022-05-31 09:28:29 +00:00
aab3af2153 Deduplicate npm-shrinkwrap.json
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-05-31 11:46:49 +03:00
600457de61 v13.5.1 2022-05-27 02:21:54 +03:00
17db857e10 Merge pull request #2483 from balena-io/bump-preload-to-v3
Bump balena-preload to 12.1.0
2022-05-26 23:20:10 +00:00
eb45ae2a30 preload: Fix issue where balenaOS v2.98.3+ required an Internet connection to start apps
Devices with a v13+ supervisor will fail to start preloaded apps with a
v2 target state format if connectivity is not available since migration
of apps.json is not possible without API access.

This enables support for preloading v3 target state format in
images with supervisor v13 or above.

Change-type: patch
2022-05-26 20:48:07 +00:00
2eaf70bff3 v13.5.0 2022-05-25 15:01:45 +03:00
226f45f732 Merge pull request #2482 from balena-io/key-expiry
Add provisioning key expiry date option to config generate options
2022-05-25 11:59:06 +00:00
c4990f3a26 Update balena-sdk to 16.20.4
Update balena-sdk from 16.9.0 to 16.20.4

Change-type: patch
2022-05-24 21:53:12 +05:30
0195a3b18c Add provisioning key expiry date option to config generate options
Change-Type: minor
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
2022-05-22 21:50:48 +05:30
3d90aeb122 v13.4.3 2022-05-19 21:10:42 +03:00
0571039bfe Merge pull request #2481 from balena-io/update-docker-progress
Update docker-progress to 5.1.3
2022-05-19 17:56:34 +00:00
ee668a4c5c Update docker-progress to 5.1.3
Update docker-progress from 5.0.1 to 5.1.3

Change-type: patch
2022-05-18 15:01:27 +01:00
ead4dbfab1 v13.4.2 2022-05-10 21:02:45 +03:00
0b498d09df Merge pull request #2479 from balena-io/kyle/balena-preload
preload: Fix detection of supervisor version for balenaOS v2.93.0
2022-05-10 17:08:59 +00:00
2b2c40c22d preload: Fix detection of supervisor version for balenaOS v2.93.0
Update balena-preload from 12.0.0 to 12.0.1

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2022-05-10 11:29:14 -04:00
ba3a3865b5 v13.4.1 2022-04-29 04:45:30 +03:00
f8402bc40c Merge pull request #2444 from balena-io/balena-leave-clearer-message
patch: Tell user that balena leave command does not remove the device…
2022-04-11 16:33:26 +00:00
c667ffa8eb leave: Update log message to advise that device still needs deleting
Change-type: patch
2022-04-11 17:04:45 +01:00
6d6065ddf5 v13.4.0 2022-04-11 17:18:27 +03:00
44f55f8e7b Merge pull request #2473 from balena-io/2337-support-all-valid-sermer-on-releases
deploy: Support all valid semver versions in balena.yml
2022-04-11 14:05:16 +00:00
d2c77760b3 deploy: Support all valid semver versions in balena.yml
Resolves: #2337
Change-type: minor
Depends-on: https://github.com/balena-io/open-balena-api/pull/982
Depends-on: https://github.com/balena-io/balena-api/pull/3584
See: https://jel.ly.fish/product-improvement-draft-releases-and-release-versioning-d0391f45-c2f9-4f4e-b964-1a7e9023a3f4
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-04-08 18:16:45 +03:00
7496710c85 v13.3.3 2022-04-08 14:39:33 +03:00
be6a468507 Merge pull request #2471 from balena-io/patches-contributing
Document the 'patches' folder in CONTRIBUTING.md
2022-04-08 11:36:49 +00:00
88835e63bd Document the 'patches' folder in CONTRIBUTING.md
Change-type: patch
2022-04-08 01:16:28 +01:00
3572cb3cd6 v13.3.2 2022-04-07 13:25:31 +03:00
7fbd1de063 Merge pull request #2470 from balena-io/2469-build-docker-tls
build: Ensure HTTPS is used with dockerPort 2376 or with ca/cert/key
2022-04-07 10:22:54 +00:00
a4ab07cd08 Skip Alpine tests until Concourse + Alpine v3.14 issues are resolved
See:
* https://github.com/concourse/concourse/issues/7905
* https://github.com/product-os/balena-concourse/issues/631
* https://github.com/product-os/ci-images/pull/116/files#r844508619

Change-type: patch
2022-04-07 00:29:55 +01:00
9185eaa2b7 build: Ensure HTTPS is used with dockerPort 2376 or with ca/cert/key
Change-type: patch
2022-04-07 00:14:03 +01:00
ff3abe1fba v13.3.1 2022-03-08 22:33:20 +02:00
1ac3b70b81 Merge pull request #2463 from balena-io/update-notifier-release-notes
Include link to Wiki release notes in version update notifications
2022-03-08 20:31:39 +00:00
e946178953 Include link to Wiki release notes in version update notifications
Change-type: patch
2022-03-08 18:25:08 +00:00
6589589bee v13.3.0 2022-03-01 00:35:10 +02:00
6ae598b55e Merge pull request #2461 from balena-io/2458-ssh-ipaddr-service
ssh: Allow ssh to service with IP address and production balenaOS image
2022-02-28 22:33:02 +00:00
915f7e3763 ssh: Allow ssh to service with IP address and production balenaOS image
Also remove 'balena ssh' dependency on the device supervisor (that may
be down because of device issues or a supervisor bug) when opening a
ssh shell on a container (#1560).

Resolves: #2458
Resolves: #1560
Change-type: minor
2022-02-28 21:39:49 +00:00
cd17d79067 ssh: Advise use of 'balena login' if root authentication fails
Change-type: patch
2022-02-24 21:48:40 +00:00
7e4f4392e9 v13.2.1 2022-02-24 23:45:39 +02:00
3c0e998616 Merge pull request #2460 from balena-io/uuid-log
Correctly use the device uuid when logging the tunnel target
2022-02-24 21:43:28 +00:00
bd1bf8153d Remove unnecessary fetch of device info in balena tunnel
Change-type: patch
2022-02-24 21:02:27 +00:00
f2528dcd18 Correctly use the device uuid when logging the tunnel target
The "vpn address" is only relevant on the device/vpn server themselves
and makes no sense from a CLI context as it uses the uuid to specify
the target

Change-type: patch
2022-02-24 21:00:58 +00:00
ec26433925 v13.2.0 2022-02-18 23:40:57 +02:00
43cddd2e5d Merge pull request #2457 from balena-io/2292-ssh-username
ssh: Attempt cloud username if 'root' authentication fails
2022-02-18 21:38:27 +00:00
eeb2be2912 ssh: Attempt cloud username if 'root' authentication fails
Also refactor several files to avoid code duplication.

Change-type: minor
2022-02-12 02:40:35 +00:00
3bf8befb1d Replace occurrence of through2 dependency with standard stream module
Change-type: patch
2022-02-11 17:04:32 +00:00
948095ce4d Refactor cached username logic from events.ts to bootstrap.ts for reuse
Change-type: patch
2022-02-11 15:23:36 +00:00
d2330f9ed1 v13.1.13 2022-02-10 14:29:18 +02:00
cc19b00998 Merge pull request #2455 from balena-io/lucianbuzzo/drop-unused-fn-awaitdevice
Drop unused awaitDevice utility function
2022-02-10 12:27:25 +00:00
ed5ac75a10 v13.1.12 2022-02-09 09:24:17 +02:00
465b8a1b5e Merge pull request #2451 from balena-io/bump-preload-v12
Update balena-preload to v12
2022-02-09 07:22:04 +00:00
eccadbdcb9 Drop unused awaitDevice utility function
Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2022-02-01 17:43:28 +00:00
31eb734af1 Update balena-preload to v12
Update balena-preload from 11.0.0 to 12.0.0

Change-type: patch
Changelog-entry: preload: Stop using the deprecated /device-types/v1 API endpoints
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-01-27 19:27:58 +02:00
fa7b59d64f v13.1.11 2022-01-20 01:55:52 +02:00
1e42bfa0d5 Merge pull request #2450 from balena-io/types-node-v12
chore: Update @types/node to v12.20.42
2022-01-19 23:53:08 +00:00
5464e550e7 chore: lib/auth/utils.ts: Replace deprecated url.resolve, use async/await
Change-type: patch
2022-01-19 22:48:46 +00:00
c0f27a663d chore: Update @types/node to v12.20.42
Change-type: patch
2022-01-19 22:48:46 +00:00
d1c61c62ab v13.1.10 2022-01-16 21:29:44 +02:00
a9691bff57 Merge pull request #2446 from balena-io/2445-min-node-version-12.8.0
Update docs and package.json re min Node.js supported version (12.8.0)
2022-01-16 19:27:33 +00:00
f5d09a43cd Update docs and package.json re min Node.js supported version (12.8.0)
Resolves: #2445
Change-type: patch
2022-01-16 18:44:45 +00:00
d11e547e11 v13.1.9 2022-01-14 03:00:53 +02:00
bd462aee02 Merge pull request #2443 from balena-io/colors-action
Update packages in response to colors package issues
2022-01-14 00:58:59 +00:00
f633c0468b Update packages in response to colors package issues
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2022-01-12 22:12:06 +01:00
e4f61a1242 v13.1.8 2022-01-11 03:28:31 +02:00
96142a002e Merge pull request #2442 from balena-io/2440-pin-docker-modem
local push: Fix "invalid character '/' looking for beginning of value"
2022-01-11 01:26:51 +00:00
6b9a5cd89c local push: Fix "invalid character '/' looking for beginning of value"
Change-type: patch
2022-01-11 00:15:10 +00:00
ba2d3d60ec Merge pull request #2441 from balena-io/v14-TypeError-type-undefined
v14 preparations: Fix TypeError produced by 'npx oclif manifest'
2022-01-08 01:55:40 +00:00
d1e66bc1a5 v14 preparations: Fix TypeError produced by 'npx oclif manifest'
Change-type: patch
2022-01-08 01:16:45 +00:00
58799915a9 v13.1.7 2022-01-06 19:29:35 +02:00
5f2d55f569 Merge pull request #2436 from balena-io/update-pkg
Update to pkg 5
2022-01-06 17:27:47 +00:00
8d6e51391c v13.1.6 2022-01-04 18:53:40 +02:00
8454b02988 Merge pull request #2435 from balena-io/enforce-js-types
Automation: enforce noImplicitAny for the type-checked javascript
2022-01-04 16:51:05 +00:00
879d98ef98 Update to pkg 5
Change-type: patch
2022-01-04 16:31:08 +00:00
c4e317a290 Automation: enforce noImplicitAny for the type-checked javascript
Change-type: patch
2022-01-04 16:27:06 +00:00
7ca4d2d720 v13.1.5 2022-01-04 17:34:55 +02:00
e1e88ec56d Merge pull request #2434 from balena-io/remove-gulp
Build: switch from using inline-source via gulp to using it directly
2022-01-04 15:33:01 +00:00
33f7fa3829 Build: switch from using inline-source via gulp to using it directly
Change-type: patch
2022-01-04 15:03:05 +00:00
3d516e7c5f v13.1.4 2022-01-04 13:25:57 +02:00
a8507508b7 Merge pull request #2428 from balena-io/update-pkg
Update pkg
2022-01-04 11:24:14 +00:00
008972b3d3 Update pkg
Change-type: patch
2022-01-03 17:35:13 +00:00
92b86330a0 v13.1.3 2022-01-03 18:52:42 +02:00
2563c07c6a Merge pull request #2433 from balena-io/ts-deploy-legacy
Convert lib/utils/deploy-legacy to typescript
2022-01-03 16:50:06 +00:00
1d4b949cf3 Convert lib/utils/deploy-legacy to typescript
Change-type: patch
2022-01-03 16:10:17 +00:00
d17e02a930 v13.1.2 2022-01-03 18:03:55 +02:00
a355cbaa79 Merge pull request #2432 from balena-io/compose-ts
Convert lib/utils/compose to typescript
2022-01-03 16:01:18 +00:00
bd021c0a2d Convert lib/utils/compose to typescript
Change-type: patch
2022-01-03 15:26:19 +00:00
a80f676804 v13.1.1 2021-12-30 15:08:14 +02:00
f723c58089 Merge pull request #2430 from balena-io/update-deps
Update dependencies
2021-12-30 13:05:58 +00:00
e27a4e2e31 Update dependencies
Update docker-progress from 5.0.0 to 5.0.1

Change-type: patch
2021-12-30 12:36:12 +00:00
b91b72c408 v13.1.0 2021-12-29 16:47:51 +02:00
5cf84d3f1d Merge pull request #2431 from balena-io/os-configure-dev-flag
os.getConfig MVP (os configure, config generate, local configure)
2021-12-29 14:45:46 +00:00
7d58b8c120 os configure, config generate: Add '--dev' option for OS developmentMode
Change-type: minor
2021-12-29 00:28:04 +00:00
851301a336 local configure: Allow configuring 'developmentMode' in config.json
Change-type: minor
2021-12-25 02:26:52 +00:00
ec6fd050f6 os build-config: Clarify command purpose in help output
Change-type: patch
2021-12-25 02:26:47 +00:00
6f81053882 device os-update: Add support for unified dev/prod balenaOS releases
Update balena-sdk from 16.8.1 to 16.9.0

Change-type: minor
2021-12-24 23:52:57 +00:00
dbd8a9a08c v13.0.2 2021-12-24 20:12:14 +02:00
256f1abf1b Merge pull request #2427 from balena-io/update-oclif
Update oclif
2021-12-24 18:10:10 +00:00
acd352cb3c Update oclif
Change-type: patch
2021-12-24 17:20:50 +00:00
31f927c27c v13.0.1 2021-12-24 18:58:28 +02:00
3d0f16168a Merge pull request #2429 from balena-io/os-versions-recommended
os versions, os download: Replace deprecated version fields
2021-12-24 16:55:58 +00:00
b2d932afab os versions, os download: Replace deprecated version fields
Replace deprecated `rawVersion` and `formattedVersion` fields and use
alternative overload of `getAvailableOsVersions`. As a result, the word
'recommended' is no longer printed next to any OS versions.

Change-type: patch
2021-12-24 16:01:51 +00:00
398175f0b3 Update balena-sdk to v16.8.1
Update balena-sdk from 16.8.0 to 16.8.1

Change-type: patch
2021-12-24 14:45:12 +00:00
2fb9c6c773 v13.0.0 2021-12-23 21:48:02 +02:00
66608b32e9 Merge pull request #2420 from balena-io/v13
Release CLI v13
2021-12-23 19:45:50 +00:00
c403683edf v13 RELEASE NOTES: see https://git.io/JDHxG
Change-type: patch
2021-12-23 18:47:34 +00:00
1e6ab46ca3 Add tips for removed commands
Signed-off-by: Scott Lowe <scott@balena.io>
2021-12-23 18:40:05 +00:00
02d3220f2d Fix some app/fleet terminology issues
Signed-off-by: Scott Lowe <scott@balena.io>
2021-12-23 18:40:05 +00:00
c86cdc8f84 balena SDK v16: Ensure all SDK calls use fleet slug rather than name
Change-type: patch
2021-12-23 18:40:05 +00:00
84f02dc063 Update balena-sdk to v16.8.0
Update balena-sdk from 15.51.1 to 16.8.0

Change-type: patch
2021-12-23 18:40:05 +00:00
9145f2fb28 device, devices: Print the fleet's slug in 'org/fleetName' format
Change-type: major
2021-12-23 15:34:09 +00:00
1164388d78 envs: Print the fleet's slug in 'org/fleetName' format
Change-type: major
2021-12-23 15:34:08 +00:00
06f6094401 os configure: Remove deprecated '--device-api-key' option
Change-type: major
2021-12-23 15:34:08 +00:00
67e11467f7 Clean up unused v13 feature switch code
Change-type: patch
2021-12-23 15:34:08 +00:00
c8dfd0ca65 config read/write/inject/reconfigure: Place '--type' option behind v14 switch
Change-type: patch
2021-12-23 15:34:08 +00:00
8b110a835a fleet create: Don't print fleet's numeric database ID in confirmation msg
Change-type: major
2021-12-23 15:34:08 +00:00
7564d95f82 devices supported: Remove deprecated '--verbose' and '--discontinued' options
Change-type: major
2021-12-23 15:34:08 +00:00
f12f2b79ef build/deploy/push: Remove deprecated '--convert-eol' option
Change-type: major
2021-12-23 15:34:08 +00:00
176d731f9e Move some v13 features behind v14 switch.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-12-23 15:34:08 +00:00
1ed39d1d37 Remove deprecated '--app' and '--application' options (renamed to '--fleet')
Change-type: major
2021-12-23 15:34:08 +00:00
580ca0d584 Remove deprecated commands 'app' and 'apps' (renamed to 'fleet' and 'fleets')
Change-type: major
2021-12-23 15:34:08 +00:00
73572df7cf build/deploy/push: Remove deprecated '--[no]gitignore' option
Change-type: major
2021-12-23 15:34:08 +00:00
23b42b1a2b v13 release: Flip the v13 feature switch
Change-type: major
2021-12-23 15:34:08 +00:00
632322e3c2 v13 release: Drop support for Node.js v10 (package.json engines.node)
Change-type: major
2021-12-23 15:34:08 +00:00
4faa5d7f57 v12.55.11 2021-12-23 17:19:56 +02:00
9b967592a9 Merge pull request #2426 from balena-io/typescript-4.5
Update to typescript 4.5
2021-12-23 15:18:13 +00:00
e01483cd2b Update to typescript 4.5
Change-type: patch
2021-12-23 13:59:42 +00:00
6d89ff4bbf v12.55.10 2021-12-23 15:04:02 +02:00
126e731117 Merge pull request #2423 from balena-io/update-dev-deps
Update dev dependencies
2021-12-23 13:01:42 +00:00
32d26ad074 v12.55.9 2021-12-22 18:02:30 +02:00
2bcfec9d0f Merge pull request #2413 from balena-io/os-download-prod-suffix-revisited
os download: Future-proof unified dev/prod balenaOS versioning
2021-12-22 16:00:49 +00:00
c04e63ab7d os download: Future-proof '--version' format for unified dev/prod variants
Do not append the '.prod' suffix by default to balenaOS versions.

Change-type: patch
2021-12-22 15:37:24 +00:00
79be06820c Update dev dependencies
Change-type: patch
2021-12-21 18:24:26 +00:00
ffb94c380f v12.55.8 2021-12-21 18:59:32 +02:00
385b5e9ec6 Merge pull request #2422 from balena-io/windows-version-info
Include version info when installed on windows
2021-12-21 16:55:54 +00:00
8d3a4343cb Include version info when installed on windows
Change-type: patch
2021-12-21 16:22:21 +00:00
6eeb16245b Switch from the deprecated oclif-dev commands to the oclif commands
Change-type: patch
2021-12-21 16:21:58 +00:00
3961060f90 v12.55.7 2021-12-14 23:32:04 +02:00
a6dfc9126a Merge pull request #2412 from balena-io/pp/issue-2411
Removed hardcoded 'balenaCloud' in console message.
2021-12-14 21:30:06 +00:00
e7ddd07b7b push: Remove hardcoded 'balenaCloud' in console message
Change-type: patch
Signed-off-by: Pranav Peshwe <pranav@balena.io>
2021-12-14 19:54:30 +05:30
fea351d960 v12.55.6 2021-12-14 03:57:53 +02:00
40e0b2dbed Merge pull request #2410 from balena-io/fix-symlink-push-deploy
Fix symbolic link regression in push & deploy
2021-12-14 01:56:06 +00:00
3def4d0e4a Fix symbolic link regression in push & deploy
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-12-14 02:30:08 +02:00
aa286cc0e7 v12.55.5 2021-12-14 01:58:31 +02:00
8abeb6aed7 Merge pull request #2409 from balena-io/drop-unused-dir-traversal-list
Drop unnecessary directory list created during balena deploy & push
2021-12-13 23:56:00 +00:00
f285880135 Drop unnecessary directory list created during balena deploy & push
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-12-14 00:29:15 +02:00
2b5c387313 v12.55.4 2021-12-10 03:29:22 +02:00
8babf4c908 Merge pull request #2405 from balena-io/2386-os-download-dt-aliases
os download, os versions: Accept device type aliases
2021-12-10 01:26:38 +00:00
bfc995e948 os download, os versions: Accept device type aliases
Change-type: patch
2021-12-10 00:52:02 +00:00
c6a0bc0fba os download: Don't append '.prod' if the OS version does not match regex 2021-12-10 00:38:56 +00:00
ae69accf0f v12.55.3 2021-12-10 00:01:36 +02:00
cfcace4c99 Merge pull request #2404 from balena-io/2387-os-download-prod-suffix
os download: Assume '.prod' suffix by default for all balenaOS versions
2021-12-09 21:59:27 +00:00
6e07db0813 os download: Improve error message when not logged in (balenaOS ESR versions)
Change-type: patch
2021-12-09 18:06:26 +00:00
5c40c8d51f os download: Assume '.prod' suffix by default for all balenaOS versions
Resolves: #2387
Change-type: patch
2021-12-09 17:56:16 +00:00
d827005154 v12.55.2 2021-12-08 14:05:10 +02:00
76081343cc Merge pull request #2147 from balena-io/rework-tables
v13 preparations: Standardize command data output
2021-12-08 12:02:36 +00:00
f3fb9b6bdf v13 preparations: Standardize command data output
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-12-08 12:10:08 +01:00
c125e0b38d v12.55.1 2021-12-01 01:49:43 +02:00
73b2f6b4b1 Merge pull request #2401 from balena-io/klutchell-patch-2
chore: Bump multicast-dns to rebased commit
2021-11-30 23:46:39 +00:00
fdc0d08e96 chore: Bump multicast-dns to rebased commit
Otherwise npm install fails due to the missing commit in npm-shrinkwrap.json

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
See: https://github.com/balena-io-modules/multicast-dns/pull/1
2021-11-30 11:07:39 -05:00
e431a59af7 v12.55.0 2021-11-30 00:12:46 +02:00
41a2dbe60c Merge pull request #2294 from balena-io/provisioning-names-keys
Add provisioning key name option to config generate options
2021-11-29 22:11:05 +00:00
6ba67eefdb Add provisioning key name option to config generate options
Change-Type: minor
Signed-off-by: Nitish Agarwal 1592163+nitishagar@users.noreply.github.com
2021-11-29 16:15:55 +05:30
3b885ad906 v12.54.5 2021-11-27 03:45:02 +02:00
5574dc0318 Merge pull request #2398 from balena-io/reuse-getbootpartition
os configure, local configure: Reuse disk partition scanning logic
2021-11-27 01:42:53 +00:00
fcea91bfb6 os configure, local configure: Reuse disk partition scanning logic
Change-type: patch
2021-11-27 01:10:53 +00:00
7316c4e075 v12.54.4 2021-11-26 18:39:20 +02:00
389b7a1463 Merge pull request #2389 from balena-io/balena-lint-no-floating-promises
Bump 'balena-lint' and fix 'no-floating-promises' warnings
2021-11-26 16:36:16 +00:00
09d004423c Bump 'balena-lint' and fix 'no-floating-promises' warnings
Change-type: patch
2021-11-26 15:59:33 +00:00
97978ff812 v12.54.3 2021-11-26 17:38:17 +02:00
498e21f0ab Merge pull request #2376 from balena-io/lucianbuzzo/fast-scan
Improve directory scan speed prior to tarballing
2021-11-26 15:35:56 +00:00
257dd514ed Improve directory scan speed prior to tarballing
This changes improves the speed that the project is tarballed by switching from
`klaw` to `recursive-fs` and not running `lstat` on files that are ignored.
Whilst testing with the Jellyfish repository, which contains a number of
sub directories, each with their own node_modules folder, I was able to
reduce the time taken to scan and tarball the project from 70s to 11s,
which is a massive improvement.

Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2021-11-26 13:55:41 +00:00
85cbdd4947 v12.54.2 2021-11-26 14:01:22 +02:00
73625611da Merge pull request #2395 from balena-io/lucianbuzzo/2394-push-image
Set the correct target state when using Compose "image" field
2021-11-26 11:59:17 +00:00
d2a5a9ba86 Set the correct target state when using Compose "image" field
Fixes #2394

When pushing to a device in local mode, if a service is not external, and uses
an `image` field, that value should be used for tags and target state, otherwise
it won't match the image name generated on the device by balenaEngine.

Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2021-11-26 10:11:07 +00:00
1cd78215e0 v12.54.1 2021-11-26 00:59:24 +02:00
6d744d0b07 Merge pull request #2393 from balena-io/fix-config-usage
Fix mistake in `config generate` examples
2021-11-25 22:56:40 +00:00
9d312bcd12 v12.54.0 2021-11-25 23:47:55 +02:00
e22aa847e3 Merge pull request #2378 from balena-io/events-timeout
Improve UX for offline usage
2021-11-25 21:45:47 +00:00
0d1ca67d5b v12.53.2 2021-11-25 20:58:34 +02:00
c4a5a25f03 Merge pull request #2391 from balena-io/drop-custom-device-api-key-generation-code
Stop creating an extra provisioning API key in each config generation
2021-11-25 18:56:53 +00:00
b183d88400 Fix mistake in config generate examples
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-11-25 16:05:37 +00:00
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
58b29bf4bb Stop creating an extra provisioning API key in each config generation
Change-type: patch
Changelog-entry: Avoid creating an extra provisioning API key in os configure & config generate
See: https://github.com/balena-io/balena-cli/pull/2294#discussion_r756499196
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-11-25 16:40:53 +02:00
fc0903a414 v12.53.1 2021-11-25 12:18:50 +02:00
cea23f5d5e Merge pull request #2388 from balena-io/docs-changes
Transitional changes to doc files for landr implementation
2021-11-25 10:15:37 +00:00
5a9b5e3b08 Transitional changes to doc files for landr implementation
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-11-25 10:44:38 +01:00
52138d41eb v12.53.0 2021-11-25 04:49:54 +02:00
5acdc63068 Merge pull request #2369 from balena-io/2349-config-inject-scan-partition
config read/write/inject: Avoid need for internet access
2021-11-25 02:47:56 +00:00
b546e4dd97 config read/write/inject: Avoid need for internet access
Change-type: minor
2021-11-25 02:05:40 +00:00
e4870916e2 config read: Add '--json' option for JSON output
Change-type: minor
2021-11-24 23:03:37 +00:00
3ca93448cd v12.52.2 2021-11-24 20:59:10 +02:00
f66395e2d5 Merge pull request #2390 from balena-io/device-init-docs
Delete 'doc/automated-init.md' and improve 'balena help device init'
2021-11-24 18:57:11 +00:00
952d782e90 Delete 'doc/automated-init.md' and improve 'balena help device init'
Change-type: patch
2021-11-24 18:24:14 +00:00
d53c9b3c50 v12.52.1 2021-11-22 04:25:10 +02:00
2f706c0200 Merge pull request #2384 from balena-io/2376-dockerignore-corner-cases
push/build: Add test cases for .dockerignore filtering corner cases
2021-11-22 02:23:22 +00:00
d64b6deb81 push/build: Add test cases for .dockerignore filtering corner cases
Change-type: patch
2021-11-22 01:50:27 +00:00
55fc9b2ade v12.52.0 2021-11-20 03:19:00 +02:00
6c29d0ae27 Merge pull request #2334 from balena-io/2005-os-esr-versions-hostapp
os versions, os download: Add support for balenaOS ESR versions
2021-11-20 01:17:17 +00:00
f46452f6de os download: Display OS version actually downloaded (range or 'recommended')
Change-type: patch
2021-11-20 00:43:15 +00:00
c166ec7597 os versions, os download: Add support for balenaOS ESR versions
Change-type: minor
2021-11-20 00:43:15 +00:00
7325c79888 v12.51.3 2021-11-16 19:10:36 +02:00
2a29b386eb Merge pull request #2375 from balena-io/missing-digest
deploy: Ensure the release fails if an image's digest (hash) is missing
2021-11-16 17:08:41 +00:00
23b07f8a41 deploy: Ensure the release fails if an image's digest (hash) is missing
Change-type: patch
2021-11-16 11:55:07 +00:00
6d641b4841 v12.51.2 2021-11-16 13:50:52 +02:00
7b498149b1 Merge pull request #2379 from balena-io/remove-node10-from-resinci.yml
Update balena CI configuration (remove Node v10 from npm pipeline list)
2021-11-16 11:49:36 +00:00
ae5ea0f4e8 Update balena CI configuration (remove Node v10 from npm pipeline list)
Change-type: patch
2021-11-15 23:51:15 +00:00
f635f648da v12.51.1 2021-10-25 20:54:12 +03:00
3d4e2cf823 Merge pull request #2256 from balena-io/forum-link
Fix forums support link in README.md
2021-10-25 17:52:15 +00:00
ef3b630887 v12.51.0 2021-10-22 22:13:44 +03:00
19040ccb6c Merge pull request #2367 from balena-io/support-for-fragments
Add support for YAML anchors and aliases in 'docker-compose.yml'
2021-10-22 19:11:47 +00:00
8e712ac910 Add support for YAML anchors and aliases in 'docker-compose.yml'
This allows project files to define services from generic fragments by leveraging YAML's anchors and aliases. See here for an example: 43f6537b2c/spec.md (fragments)

Removing the FAILSAFE_SCHEMA flag is not expected to break existing project files, since the default behaviour is more liberal, or cause problems down the road given we perform validation immediately after. Docs for the flag: https://github.com/nodeca/js-yaml#load-string---options-

Change-type: minor
2021-10-22 16:42:29 +03:00
c401ed35ac v12.50.3 2021-10-20 19:33:37 +03:00
94be97313b Merge pull request #2359 from balena-io/klutchell/preload-11
preload: Avoid possible ValueError when parsing storage driver
2021-10-20 16:31:34 +00:00
48053ecefc preload: Avoid possible ValueError when parsing storage driver
Update balena-preload from 10.5.0 to 11.0.0

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-10-15 09:44:27 -04:00
cc60e86507 v12.50.2 2021-10-05 13:32:02 +03:00
bd774e8553 Merge pull request #2357 from balena-io/fix-fleet-rename-error-message
Error message when renaming a fleet now mentions the target name.
2021-10-05 10:27:51 +00:00
c493c33e38 Error message when renaming a fleet now mentions the target name.
Change-type: patch
Signed-off-by: Carlo Miguel F. Cruz <carloc@balena.io>
2021-10-05 17:01:07 +08:00
9487b33144 v12.50.1 2021-09-30 03:51:16 +03:00
befdae1b90 Merge pull request #2353 from balena-io/fix-help-release-finalize
Fix help output for 'release finalize' command
2021-09-30 00:49:35 +00:00
08dfc945f3 Update dependencies (@sentry/node error reporting)
Change-type: patch
2021-09-30 01:12:17 +01:00
8791c2f4e1 Replace mixpanel dependency with simple GET request
Change-type: patch
2021-09-30 01:12:17 +01:00
be306e6a20 Avoid NockMock warnings during standalone executable testing
Change-type: patch
2021-09-30 01:12:17 +01:00
6cfff72c59 Fix help output for 'release finalize' command
Change-type: patch
2021-09-30 01:12:17 +01:00
adae718c2e v12.50.0 2021-09-28 18:07:49 +03:00
132e1a63b2 Merge pull request #2345 from balena-io/add-release-handling
Add support for releases
2021-09-28 15:05:40 +00:00
a18e182ae4 Add support for releases
Signed-off-by: Paul Jonathan <pj@balena.io>
Change-type: minor
2021-09-28 14:28:43 +00:00
e098cdca17 v12.49.0 2021-09-23 23:56:47 +03:00
b42af74983 Merge pull request #2301 from balena-io/add-multiarch-handling
Add multiarch support
2021-09-23 20:54:51 +00:00
8bb211e441 build, deploy: Improve logging of image build messages
Change-type: patch
2021-09-23 16:37:45 +00:00
ffccbfba12 build, deploy: Add support for multiarch base images
Bump version of balena-multibuild to the one that supports multiarch
Remove previous hack to avoid sending platform information to multibuild

Change-type: minor
Signed-off-by: Paul Jonathan <pj@balena.io>
See: https://github.com/balena-io/balena-cli/issues/1508
2021-09-23 16:37:45 +00:00
56c1af50c0 v12.48.15 2021-09-22 17:52:15 +03:00
8b9e3ccdc8 Merge pull request #2346 from balena-io/update-sdk
Update balena-sdk to 15.51.1
2021-09-22 14:50:21 +00:00
de95262f93 Update balena-sdk to 15.51.1
Update balena-sdk from 15.48.0 to 15.51.1

Change-type: patch
2021-09-22 12:46:34 +05:30
ed49938504 v12.48.14 2021-09-22 00:37:13 +03:00
52ad0f6a57 Merge pull request #2347 from balena-io/klutchell/set-zlib-flush
os download: Avoid incomplete os downloads appearing as successful
2021-09-21 21:35:23 +00:00
7f6738c73c os download: Avoid incomplete os downloads appearing as successful
By forcing the zlib flush mode to Z_NO_FLUSH we are more likely to
see an error on image download pipelines vs silent failure and
incomplete files.

This is part of a larger investigation and may be removed in the
future when the root cause of the pipeline failures are identified.

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-09-20 13:28:14 -04:00
88fc3f7714 v12.48.13 2021-09-17 17:01:55 +03:00
1afb29b923 Merge pull request #2340 from balena-io/2339-config-inject-auth
config inject: Remove requirement of being logged in
2021-09-17 13:59:18 +00:00
09a4e8db2d config inject: Remove requirement of being logged in
Change-type: patch
2021-09-16 12:15:53 +01:00
6c81440428 v12.48.12 2021-09-13 18:28:39 +03:00
3eca65ce0d Merge pull request #2333 from balena-io/klutchell/qemu-6-0-0
build/deploy: Update QEMU to 6.0.0 for emulated builds
2021-09-13 15:26:41 +00:00
6319b9dc13 v12.48.11 2021-09-11 01:38:46 +03:00
290acaecbb Merge pull request #2328 from balena-io/825-1018-fix-build-deploy-tag
build, deploy: Fix processing of '--tag' option
2021-09-10 22:36:18 +00:00
305c9045f0 build, deploy: Fix processing of '--tag' option
Change-type: patch
Resolves: #825
Resolves: #1018
2021-09-10 23:11:20 +01:00
b701151769 build/deploy: Update QEMU to 6.0.0 for emulated builds
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-09-10 13:32:12 +00:00
e03bbb7275 v12.48.10 2021-09-10 14:25:45 +03:00
3fd66c39ae Merge pull request #2331 from balena-io/2330-retry-supervisor-api-request
push: Await and retry supervisor API requests to a local device
2021-09-10 11:23:59 +00:00
b30075a18b push: Await and retry supervisor API requests to a local device
Change-type: patch
2021-09-10 01:44:26 +01:00
a4fc95e99b v12.48.9 2021-09-10 03:44:17 +03:00
63d8e5e6a3 Merge pull request #2332 from balena-io/bump-net-keepalive-v3.0.0
chore: Update net-keepalive dependency (fix CLI packaging errors)
2021-09-10 00:41:55 +00:00
6244af3464 chore: Update net-keepalive dependency (fix CLI packaging errors)
Change-type: patch
2021-09-10 00:20:26 +01:00
8773927b3f v12.48.8 2021-09-09 00:27:52 +03:00
29a3fd40a2 Merge pull request #2326 from balena-io/v13-gitignore-feature-switch
v13 preparations: Add feature switch for removal of '--gitignore' (push, build)
2021-09-08 21:24:42 +00:00
d6faf060e6 v13 preparations: Add feature switch for removal of '--gitignore' (push, build)
Change-type: patch
2021-09-08 18:10:22 +01:00
352fd197b7 v13 preparations: Adjust test cases for 'balena envs'
Change-type: patch
2021-09-08 17:48:16 +01:00
afb6f938b7 v13 preparations: Adjust test cases for 'balena devices'
Change-type: patch
2021-09-08 17:47:40 +01:00
d3adbcdba9 v12.48.7 2021-09-07 18:28:57 +03:00
33fce1f24f Merge pull request #2325 from balena-io/move-reduce-device-type-json
device move: Rely on the device type model to get the compatible apps
2021-09-07 15:26:20 +00:00
ab90a5f150 v12.48.6 2021-09-07 16:55:22 +03:00
a8b2212fed Merge pull request #2324 from balena-io/reduce-device-type-json
preload: Rely on the device type model to get the compatible apps
2021-09-07 13:53:31 +00:00
6bb8df30dd preload: Rely on the device type model to get the compatible apps
Connects-to: #2318
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-09-07 14:53:17 +03:00
0327ed766d device move: Improve types & reduce the number of API requests
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-09-07 11:43:35 +00:00
1009958340 v12.48.5 2021-09-07 14:12:24 +03:00
5ce17ea70f Merge pull request #2323 from balena-io/no-my_application
preload: Replace my_application query with the SDKs application.getAll()
2021-09-07 11:10:21 +00:00
9c821511b1 device move: Rely on the device type model to get the compatible apps
Connects-to: #2318
Change-type: patch
See: https://www.flowdock.com/app/rulemotion/i-cli/threads/s6x4Z_LoH8IG4PC_YeXMC0TP6v-
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-09-07 07:53:02 +00:00
d793335287 preload: Replace my_application query with the SDKs application.getAll()
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-09-07 02:09:39 +03:00
dc59b7e4b0 v12.48.4 2021-08-31 04:34:45 +03:00
370b844538 Merge pull request #2316 from balena-io/os-download-no-device-types-v1
os download: Use the hostApps instead of the device-types/v1 endpoint
2021-08-31 01:32:58 +00:00
a8c2724929 v12.48.3 2021-08-31 04:03:14 +03:00
09dd2dd354 Merge pull request #2317 from balena-io/balena-deploy-no-device-types-v1
balena deploy: Retrieve the cpu arch as part of the device type resource
2021-08-31 01:01:30 +00:00
f3ab41841a v12.48.2 2021-08-31 02:23:23 +03:00
3dee30a0fe Merge pull request #2313 from balena-io/install-docs-20210822
Clarify installation instructions
2021-08-30 23:21:40 +00:00
d34073f695 os download: Use the hostApps instead of the device-types/v1 endpoint
Connects-to: #2318
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-08-30 22:32:11 +00:00
24fe6666e4 balena deploy: Retrieve the cpu arch as part of the device type resource
Connects-to: #2318
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2021-08-30 22:30:16 +00:00
3fd5981085 Clarify installation instructions
Change-type: patch
2021-08-29 02:08:53 +01:00
08ee8643cb v12.48.1 2021-08-27 03:23:23 +03:00
8db36ccec9 Merge pull request #2312 from balena-io/remove-exitWithExpectedError
build, deploy: Extend CTRL-C coverage on Windows (PowerShell, cmd.exe)
2021-08-27 00:21:24 +00:00
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
a8ff21af69 build, deploy: Extend CTRL-C coverage on Windows (PowerShell, cmd.exe)
Before this commit, `balena build` and `balena deploy` would almost
never respect CTRL-C on Windows (PowerShell, cmd.exe). Now CTRL-C
is respected over a large extent of runtime and, if CTRL-C is hit
while images are being uploaded (`balena deploy`), the release status
is correctly set to 'failed'.

Change-type: patch
2021-08-27 00:53:21 +01:00
4c54d6c171 v12.48.0 2021-08-26 18:38:44 +03:00
83f213c007 Merge pull request #2274 from balena-io/deploy-release-versioning
Add balena.yml handling to `balena deploy` release creation
2021-08-26 15:36:59 +00:00
d0cdc900a2 Add contract contents at release creation time
Change-type: patch
2021-08-26 16:11:23 +01:00
9937b91606 Documentation update with debugging notes
Signed-off-by: Paul Jonathan <pj@balena.io>
2021-08-26 00:34:54 +00:00
972c2470c5 Fix env variable to avoid test failures
Signed-off-by: Paul Jonathan <pj@balena.io>
Change-type: patch
2021-08-25 17:01:22 +00:00
7d568a928b Add balena.yml handling and --draft to balena deploy release creation
This change allows use of a contract and release semver when doing a push,
and is part of the larger feature to use the builder as part of a CI/CD pipeline.

Change-type: minor
Signed-off-by: Paul Jonathan <pj@balena.io>
2021-08-25 17:01:17 +00:00
2331e0a3e5 v12.47.0 2021-08-20 02:15:13 +03:00
cb9b6be24b Merge pull request #2309 from balena-io/warn-deprecation-policy
Add deprecation policy checker and --unsupported global flag
2021-08-19 23:13:25 +00:00
c2d3eee7cc Add deprecation policy checker and --unsupported global flag
Change-type: minor
2021-08-19 23:17:31 +01:00
d8b08f7272 v12.46.2 2021-08-17 02:27:23 +03:00
819bdac354 Merge pull request #2308 from balena-io/bump-sdk-15.48.0
Update dependencies (balena-sdk from v15.36.0 to v15.48.0)
2021-08-16 23:25:22 +00:00
318de8f017 Update dependencies (balena-sdk from v15.36.0 to v15.48.0)
Update balena-sdk from 15.36.0 to 15.48.0

Change-type: patch
2021-08-16 23:33:44 +01:00
2b0341e12a v12.46.1 2021-08-16 18:08:37 +03:00
21f7463607 Merge pull request #2303 from balena-io/preload-custom-dind
preload: Restore support for armv7 with custom preload image
2021-08-16 15:06:32 +00:00
19fd3094d1 preload: Restore support for armv7 with custom preload image
Update balena-preload from 10.4.20 to 10.5.0

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-08-16 09:29:14 -04:00
7c4974f4f5 v12.46.0 2021-08-15 20:09:40 +03:00
3b56ed278e Merge pull request #2270 from balena-io/allow-draft-releases
Add `--draft` option to `balena push`
2021-08-15 17:07:36 +00:00
254ef1c8cf Add --draft option to balena push
This change will allow to build releases as draft and have them being
set as final at a later stage. This change is part of a larger feature towards
using the builder as part of CI/CD pipelines.

Depends-on: https://github.com/balena-io/balena-builder/pull/868
Change-type: minor
2021-08-15 16:43:01 +00:00
d11f49e0f8 v12.45.2 2021-08-14 03:23:04 +03:00
48d7d0ef5e Merge pull request #2305 from balena-io/performResolution-error-handling
push, build: Improve error handling (identify which service failed)
2021-08-14 00:21:11 +00:00
c7bbbc4159 push, build: Improve error handling (identify which service failed)
Change-type: patch
2021-08-13 17:11:48 +01:00
d2fabcaf30 v12.45.1 2021-08-11 17:27:05 +03:00
e137c2aed2 Merge pull request #2307 from balena-io/2306-env-add-app-is-ambiguous
envs, env add: Fix "Application is ambiguous" when using device UUID
2021-08-11 14:25:21 +00:00
58704b08d3 envs, env add: Fix "Application is ambiguous" when using device UUID
Change-type: patch
2021-08-11 02:00:35 +01:00
485a9e944f v12.45.0 2021-08-09 19:35:52 +03:00
1d7a50f007 Merge pull request #2304 from balena-io/fleet-renamathon
Rename applications to fleets (stage 1)
2021-08-09 16:34:07 +00:00
64a44e7a5f Rename applications to fleets (stage 1). See: https://git.io/JRuZr
- Add fleet(s) commands and -f, --fleet flags as aliases to the app(s)
  commands and -a, --app, --application flags.
- Conditionally rename column/row headers and JSON object properties
  from 'application' to 'fleet', with some variations.
- Print warning messages regarding the renaming, provided that stderr
  is attached to an interactive terminal.

Change-type: minor
Resolves: #2302
2021-08-09 12:12:03 +01:00
c3406603db v12.44.29 2021-07-27 16:49:35 +03:00
f1fa187a58 Merge pull request #2300 from balena-io/preload-10-4-10
preload: Fix storage driver detection in balenaOS v2.80.9
2021-07-27 13:47:26 +00:00
6cb2893750 preload: Fix storage driver detection in balenaOS v2.80.9
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-07-26 12:03:49 -04:00
216172ed4f v12.44.28 2021-07-23 17:55:35 +03:00
3717d8cc0f Merge pull request #2299 from balena-io/catch-BalenaInvalidDeviceType
os download: Improve error message for misspelled device type names
2021-07-23 14:53:22 +00:00
8338e2e933 os download: Improve error message for misspelled device type names
Change-type: patch
2021-07-23 15:10:00 +01:00
918c2e912d v12.44.27 2021-07-23 14:25:16 +03:00
be0622ec80 Merge pull request #2298 from balena-io/etimedout-troubleshooting
docs: Add entry to FAQ/Troubleshooting for ETIMEDOUT with 'balena tunnel'
2021-07-23 11:23:13 +00:00
07eef7bb49 docs: Add entry to FAQ/Troubleshooting for ETIMEDOUT with 'balena tunnel'
Change-type: patch
2021-07-23 11:54:13 +01:00
0892caa155 v12.44.26 2021-07-22 04:31:34 +03:00
fa4e8e7b55 Merge pull request #2296 from balena-io/npm-audit
chore: Update dependencies (balena-lint, oclif, "npm audit fix")
2021-07-22 01:29:20 +00:00
e624726e44 config write: Fix EBUSY error on macOS
Change-type: patch
2021-07-21 23:56:57 +01:00
f914fa2d8a chore: Remove 'umount' dependency (as advised by "npm audit")
Address security advisory https://www.npmjs.com/advisories/1512

Change-type: patch
2021-07-21 23:56:57 +01:00
c8f5542c8a chore: Update oclif
Change-type: patch
2021-07-21 23:56:46 +01:00
a2cad7bf53 chore: Update dependencies ("npm audit fix")
Change-type: patch
2021-07-21 23:56:35 +01:00
3a871a0003 chore: Update balena-lint
Change-type: patch
2021-07-20 18:02:16 +01:00
e552e36f7b v12.44.25 2021-07-20 18:56:54 +03:00
c325f1158e Merge pull request #2295 from balena-io/simplify-run-spinner
Simplify runSpinner api
2021-07-20 15:55:11 +00:00
f79ccc0c95 Simplify runSpinner api
Change-type: patch
2021-07-20 15:46:54 +01:00
1ec8d9a4ca v12.44.24 2021-07-10 00:30:25 +03:00
427b0d9b41 Merge pull request #2291 from balena-io/fix-config-write-101
config write: Fix parsing of 'key' argument with numeric components
2021-07-09 21:28:19 +00:00
cfd790a193 Update 'devDependencies' in package.json
Change-type: patch
2021-07-09 21:34:09 +01:00
36f4c1312b config write: Fix parsing of 'key' argument with numeric components
Change-type: patch
2021-07-09 17:29:21 +01:00
fe7cbf4f74 v12.44.23 2021-06-30 19:26:18 +03:00
4e8b8fe582 Merge pull request #2287 from balena-io/dfunckt-patch-1
Delete CODEOWNERS
2021-06-30 16:23:38 +00:00
2986e6cea3 Delete CODEOWNERS
Change-type: patch
2021-06-30 18:55:44 +03:00
bb6b4b255a v12.44.22 2021-06-24 19:55:41 +03:00
350c4abb96 Merge pull request #2283 from balena-io/2045-sfdisk-spinner
preload: Catch sfdisk errors that result in an endless spinner
2021-06-24 16:53:35 +00:00
fec96b41ee preload: Warn that zip files are only accepted for Intel Edison
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-06-24 11:04:26 -04:00
1dba5cc7c1 preload: Catch sfdisk errors that result in an endless spinner
Change-type: patch
Changelog-entry: preload: Catch sfdisk errors that result in an endless spinner
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-06-23 12:56:41 -04:00
43c6fe672f v12.44.21 2021-06-23 16:54:41 +03:00
486cae1aaa Merge pull request #2282 from balena-io/cli-author
Update author details in package.json, Windows Programs and Features
2021-06-23 13:52:55 +00:00
4d588e51a7 Update author details in package.json, Windows Programs and Features
Change-type: patch
2021-06-22 00:05:25 +01:00
0035545ce1 v12.44.20 2021-06-15 00:10:05 +03:00
d559b9a5a1 Merge pull request #2265 from balena-io/balena-sdk-15.36.0
devices supported: Use new DeviceType data model as source of truth
2021-06-14 21:08:02 +00:00
e2ffc5f068 v12.44.19 2021-05-31 11:47:23 +03:00
75b2fa0e9e Merge pull request #2273 from balena-io/fast-boot-stop
Fix fast-boot module caching with read-only installation folders
2021-05-31 08:45:29 +00:00
c619ecd41b v12.44.18 2021-05-28 16:17:00 +03:00
7ed01a925b Merge pull request #2276 from balena-io/python3-install-requirements
Update advanced installation instructions
2021-05-28 13:14:39 +00:00
460022a7cf Update advanced installation instructions
Replace 'python' with 'python3' in apt-get install command line, and
refactor for clarity.

Change-type: patch
2021-05-27 20:34:48 +01:00
d15b54cf40 Fix fast-boot module caching with read-only installation folders
* Add missing fast-boot `stop()` call on CLI exit to avoid 1s timeout.
* Move `.fast-boot.json` to `~/.balena/cli-module-cache.json` to
address scenarios where the CLI is installed to a read-only folder:
- pkg's internal 'snapshot' filesystem (standalone zip package)
- Root-owned folder without write permission to regular users,
  like `/usr[/local]/lib/balena-cli` (the case of caxa-based
  installers or the GUI installer for macOS).

Change-type: patch
2021-05-27 00:23:36 +00:00
c938df2445 v12.44.17 2021-05-24 18:17:54 +03:00
bf1df05606 Merge pull request #2272 from balena-io/rgz/deploy-doc
doc: Document the image nameing scheme used by deploy
2021-05-24 15:15:46 +00:00
e04242db64 doc: Document the image nameing scheme used by deploy
When using deploy to create a release for a multi-container project one
needs to follow this to avoid triggering a build. Relevant for CI/CD scenarios
with their own build pipeline.

Change-type: patch
Signed-off-by: Robert Günzler <robertg@balena.io>
2021-05-24 16:24:26 +02:00
9265588745 v12.44.16 2021-05-18 18:35:46 +03:00
cd8070b1a6 Merge pull request #2269 from balena-io/2231-balena-preload
preload: Update balena-preload to 10.4.7
2021-05-18 15:33:56 +00:00
b17dad8c60 preload: Update balena-preload to 10.4.7
Change-type: patch
Changelog-entry: preload: Avoid hardcoded registry2 URLs with openBalena
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-05-18 11:04:58 -04:00
a254e46118 devices supported: Use new DeviceType data model as source of truth
Change-type: patch
2021-05-16 22:48:22 +00:00
6e7a0defb7 Update balena-sdk from 15.31.0 to 15.36.0
Update balena-sdk from 15.31.0 to 15.36.0

Change-type: patch
2021-05-16 19:34:40 +00:00
492dbae7f1 v12.44.15 2021-05-16 22:17:02 +03:00
ccc2c20b6d Merge pull request #2267 from Kajatin/automatic-boot-partition-number
os configure, local configure: Fix "Unsupported filesystem" error
2021-05-16 19:13:29 +00:00
501882fd26 os configure, local configure: Fix "Unsupported filesystem" error
When configuring a BalenaOS image with system connections using the CLI,
the function assumed that the boot partition was always 1. This is not
the case for every supported board. Therefore, a new function is added,
which automatically determines the boot partition number and allows
users to configure the image with system connection settings.

This change affects both the `balena local configure` and `balena os configure` commands.

Change-type: patch
2021-05-16 18:08:26 +02:00
e2ff561728 v12.44.14 2021-05-10 01:09:23 +03:00
5544f4a5dd Merge pull request #2199 from khancyr/completion
Completion
2021-05-09 22:07:13 +00:00
a3e90182bc Add completion generator from oclif.manifest.json
Change-type: patch
2021-05-09 11:05:31 +02:00
3ac85dcc5f v12.44.13 2021-05-07 20:54:53 +03:00
1ac573c659 Merge pull request #2259 from balena-io/bump-multibuild-docker-progress
Fix "Total: undefined" image pull progress report and update dependencies
2021-05-07 17:52:39 +00:00
2c922ee6d2 Update dependencies (multibuild, dockerode, docker-toolbelt, docker-progress)
Update resin-multibuild from 4.7.2 to 4.11.0

Change-type: patch
2021-05-07 00:32:15 +01:00
d9821939d9 preload: Improve error handling (stop spinning wheels)
Update balena-preload from 10.4.2 to 10.4.6

Connects-to: #2045
Change-type: patch
2021-05-07 00:00:07 +01:00
732fc2d539 build: Workaround issue with Docker v20.10 + single-arch base images
Change-type: patch
2021-05-06 23:20:06 +01:00
535a443d7c build: Fix "Total: undefined" image pull progress report
Change-type: patch
2021-05-03 15:48:16 +01:00
579d68a8f0 v12.44.12 2021-04-27 17:58:06 +03:00
ffac8cb9e5 Merge pull request #2258 from balena-io/balena-preload-10-4-2
preload: Update to Docker 20.10 with cgroups v2 support
2021-04-27 14:55:58 +00:00
0f2780744f preload: Update to Docker 20.10 with cgroups v2 support
Update balena-preload from 10.4.1 to 10.4.2.

Change-type: patch
Changelog-entry: preload: Update to Docker 20.10 with cgroups v2 support
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-04-27 10:06:33 -04:00
b4495839ca v12.44.11 2021-04-21 16:46:55 +03:00
f45ac42dd3 Merge pull request #2255 from balena-io/build-args-warning
Add message regarding deprecation of --buildArg option
2021-04-21 13:44:15 +00:00
112a7b8194 Fix forums support link in README.md
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-04-21 06:57:28 +00:00
fa26004648 Add message regarding deprecation of --buildArg option in build/deploy commands
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-04-21 07:26:57 +02:00
ba1ea54d69 v12.44.10 2021-04-16 01:24:55 +03:00
9fb62d92b7 Merge pull request #2253 from balena-io/2252-fix-ssh-service-list
ssh: fix incorrect service name parsing in local mode
2021-04-15 22:21:58 +00:00
8780a24fb5 ssh: fix incorrect service name parsing in local mode
Resolves: #2252
Change-type: patch
Signed-off-by: Tomás Migone <tomas@balena.io>
2021-04-14 16:31:07 -03:00
3d3e91d49d v12.44.9 2021-04-14 04:06:00 +03:00
f6e6d9ce8b Merge pull request #2251 from balena-io/1003-config-inject-umount
config inject/read/write: Fix umount errors with OS image files
2021-04-14 01:03:53 +00:00
0f9d78ab50 config inject/read/write: Fix umount errors with OS image files
Resolves: #1003
Change-type: patch
2021-04-13 23:30:19 +01:00
06f7683837 Refactor dependency import in utils/helpers.ts for performance
Change-type: patch
2021-04-13 22:14:13 +01:00
83a23d9f30 v12.44.8 2021-04-10 02:37:53 +03:00
ffa181a2c3 Merge pull request #2248 from balena-io/2185-fix-ndjson-parsing
push, logs: Fix parsing of local mode device logs (NDJSON stream)
2021-04-09 23:35:27 +00:00
d50d18d492 push, logs: Fix parsing of local mode device logs (NDJSON stream)
Resolves: #2185
Change-type: patch
2021-04-09 23:58:04 +01:00
0b0fb94834 v12.44.7 2021-04-09 22:00:07 +03:00
c1244c0c98 Merge pull request #2247 from balena-io/osConfigureFix
lib/commands/local/configure: Fix local configure when resin-wifi is …
2021-04-09 18:56:42 +00:00
213e54feb1 lib/commands/local/configure: Fix local configure when resin-wifi is not available on the image
Resolves: #2239
Change-type: patch
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2021-04-09 21:20:47 +03:00
cc8a8513e9 v12.44.6 2021-04-07 22:44:44 +03:00
42c3236313 Merge pull request #2246 from balena-io/missing-arch-install-notes
Direct missing release installs to npm install method
2021-04-07 19:42:26 +00:00
91fd515266 Direct missing release installs to npm install method
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2021-04-07 13:56:17 -04:00
57cd096612 v12.44.5 2021-04-07 19:59:18 +03:00
854501cf8d Merge pull request #2245 from balena-io/sdk-15.31.0
Update balena-sdk (15.31.0) and other dependencies
2021-04-07 16:56:55 +00:00
d44afa8c39 docs: Update install instructions re macOS installer notarization
Change-type: patch
2021-04-07 17:26:59 +01:00
b7500fc2c2 Update resin-compose-parse from 2.1.2 to 2.1.3
Change-type: patch
2021-04-07 17:26:43 +01:00
dc6c8d7472 Update balena-config-json from 4.1.0 to 4.1.1
Change-type: patch
2021-04-07 17:26:24 +01:00
5c5be8f7b7 Update etcher-sdk from 6.2.0 to 6.2.1
Change-type: patch
2021-04-07 17:14:13 +01:00
5bdd6c6034 Update balena-sdk from 15.29.0 to 15.31.0
Change-type: patch
2021-04-07 16:58:21 +01:00
a5bade99fc v12.44.4 2021-04-07 00:42:46 +03:00
9c3eb76856 Merge pull request #2186 from balena-io/notarization
Update macOS installer to avoid Apple's warning pop-up
2021-04-06 21:40:12 +00:00
973f1a9c40 Add notarization for macOS graphical installer
Change-type: patch
2021-04-06 16:56:07 -04:00
16ea0c9d6d v12.44.3 2021-04-05 01:47:08 +03:00
73bfe545e8 Merge pull request #2242 from balena-io/preload-docs
docs: Further clarify Docker requirements for preload
2021-04-04 22:45:24 +00:00
f53e658ca2 docs: Further clarify Docker requirements for preload
Change-type: patch
2021-04-04 23:02:48 +01:00
b66706e8ee v12.44.2 2021-04-02 20:25:58 +03:00
11e50466d5 Merge pull request #2240 from balena-io/remove-balenalib-images
docker: Remove balenalib images and docs
2021-04-02 17:23:50 +00:00
431c4b6e4a docker: Remove references to CLI docker images in the installation docs
Change-type: patch
2021-04-02 18:05:31 +01:00
d12490f816 docker: Remove balenalib images and docs
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-04-02 07:57:52 -04:00
67b7b8b5d0 v12.44.1 2021-03-31 19:15:26 +03:00
16d1f0f06f Merge pull request #2235 from balena-io/docs-fix-broken-url
os/configure: Fix broken NetworkManager URL
2021-03-31 16:13:23 +00:00
9676ea94cb v12.44.0 2021-03-31 15:13:11 +03:00
df8ce0bbe0 Merge pull request #2168 from balena-io/node14fix
Make `os configure` and `local flash` work with Node 14
2021-03-31 12:11:13 +00:00
6437bb7511 os/configure: Fix broken NetworkManager URL
Update the broken NM URL to match the rest of the documentation.

Change-type: patch
Connects-to: balena-io/docs/#1757 balena-io/docs/#1522
Changelog-entry: os/configure: Fix broken NetworkManager URL
Signed-off-by: Mark Corbin <mark@balena.io>
2021-03-31 10:08:37 +00:00
ac96616e4e osConfigure/localFlash: Add support for Node.js v14
* Replace old resin-image-fs with newer balena-image-fs
* package.json: Remove resin-image-fs package
* package: Install dependencies that work with node14
* Remove resin-image-fs typings
* Fix etcher-sdk related types
* local/flash: Add unmountOnSuccess, write, direct properties on flash
	Taken from https://github.com/balena-io-modules/etcher-sdk/blob/master/examples/multi-destination.ts
* tests/utils/eol-conversion: Remove ext2fs sample binary
	Specifically ext2fs/build/Release/bindings.node
	I removed it because the file doesn't exist
* tests/test-data/pkg: Add new expected warnings darwin/linux/windows
* os/configure: Remove windows check
* local/flash: Check if environment is WSL and show warning message
* Get tests to pass with certain Node v14 warning messages
* INSTALL-WINDOWS: Remove os configure warning

Improve push and logs support for Node.js v14 (bump 'net-keepalive')

Resolves: #2200
Resolves: #1990
Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2021-03-31 01:15:47 +03:00
2737c9c53c v12.43.2 2021-03-26 17:31:50 +02:00
3b8a46f523 Merge pull request #2229 from balena-io/catch-dind-errors
docker: Improve handling of Docker-in-Docker errors
2021-03-26 15:29:46 +00:00
3ac1994941 v12.43.1 2021-03-26 01:15:19 +02:00
b3a6c6cb0f Merge pull request #2230 from balena-io/update-install-mac-docker
Improve installation docs regarding Docker Desktop version requirements
2021-03-25 23:12:20 +00:00
6d4faa7b2c Improve installation docs regarding Docker Desktop version requirements
Connects-to: #2228
Change-type: patch
2021-03-25 16:07:09 +00:00
9036ce9af3 docker: Improve handling of Docker-in-Docker errors
The `local` logging driver captures output from container’s stdout/stderr
and writes them to an internal storage that is optimized for performance and disk use.

We also want to capture these logs on startup to wait for success/failure.

Advise the use of `--privileged` when running Docker-in-Docker to avoid
various permissions issues encountered in testing.

Change-type: patch
Changlelog-entry: docker: Improve handling of Docker-in-Docker errors
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-03-25 14:02:22 +00:00
4911db640f v12.43.0 2021-03-23 03:01:51 +02:00
e7999f52a9 Merge pull request #2210 from balena-io/oclif-dev-cli-update
Add macOS uninstall script (sudo /usr/local/lib/balena-cli/bin/uninstall)
2021-03-23 00:59:30 +00:00
68b61e7424 Refactor automation scripts (reduce need for MSYS to build on Windows)
Change-type: patch
2021-03-23 00:04:43 +00:00
329b84d01e Add macOS uninstall script (sudo /usr/local/lib/balena-cli/bin/uninstall)
Change-type: minor
2021-03-23 00:04:43 +00:00
25b1dff5d8 Bump patch-package dependency and remove its own patch file
Change-type: patch
2021-03-22 16:12:44 +00:00
fb1768b4ca v12.42.2 2021-03-21 01:31:40 +02:00
cbc1e52256 Merge pull request #2227 from balena-io/2226-yaml-null-volume
push: Fix docker-compose.dev.yml serialization ("should be object,null" error)
2021-03-20 23:29:58 +00:00
37c2880996 push: Fix docker-compose.dev.yml serialization ("should be object,null" error)
Change-type: patch
2021-03-20 22:17:20 +00:00
835445be2e v12.42.1 2021-03-19 18:58:58 +02:00
52fe7481fc Merge pull request #2225 from balena-io/readme-bullet-spacing
Make README.md bullet point spacing uniform
2021-03-19 16:56:32 +00:00
88072173d0 Make README.md bullet point spacing uniform
Change-type: patch
Signed-off-by: Genadi Naydenov genadi@balena.com
2021-03-19 18:32:07 +02:00
fdc2bff063 v12.42.0 2021-03-19 15:28:52 +02:00
4f6f20f469 Merge pull request #2218 from chriswiggins/public-address
Public address
2021-03-19 13:26:48 +00:00
50af0760ce balena device: Display public IP address field
Change-type: minor
2021-03-19 14:41:21 +13:00
43906d22c8 Update balena-sdk from 15.20.0 to 15.29.0
Change-type: patch
2021-03-19 14:41:20 +13:00
43f1188f1d v12.41.3 2021-03-17 18:45:08 +02:00
2629a01c7f Merge pull request #2223 from balena-io/engines-npm-v7
Update supported npm version range in package.json (<7.0.0)
2021-03-17 16:42:55 +00:00
5fc009a6ae Update supported npm version range in package.json (<7.0.0)
Connects-to: #2221
Change-type: patch
2021-03-17 15:28:39 +00:00
480f84993b v12.41.2 2021-03-17 10:46:32 +02:00
d1fdbd927e Merge pull request #2208 from balena-io/linux-install-docs-sudo
Linux installation instructions: Add sudo configuration section
2021-03-17 08:44:22 +00:00
4bfd345b68 v12.41.1 2021-03-15 20:39:53 +02:00
d4a153d2ee Merge pull request #2212 from balena-io/klutchell/balenalib-dockerfiles
docker: Fix path to init when workdir is changed
2021-03-15 18:38:01 +00:00
3cff091e3a docker: Fix path to init when workdir is changed
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-03-15 10:32:43 -04:00
b2ad9f1643 v12.41.0 2021-03-15 16:07:04 +02:00
f7623bef85 Merge pull request #2159 from balena-io/klutchell/balenalib-dockerfiles
dockerfiles: initial commit of balenalib dockerfiles
2021-03-15 14:04:52 +00:00
af63794571 docs: Add Docker to Advanced Installation instructions
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-03-15 08:34:34 -04:00
65d5bdff08 docker: Add Docker images with the CLI and Docker-in-Docker
Add Dockerfiles for alpine and debian images, based on
balenalib/arch-distro-node images.

Change-type: minor
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-03-15 08:34:23 -04:00
23165806aa v12.40.4 2021-03-09 19:36:10 +02:00
3649bafbb1 Merge pull request #2209 from balena-io/update-apple-certificate-name
macOS GUI installer: Update signing certificate name
2021-03-09 17:34:12 +00:00
c62445a399 macOS GUI installer: Update signing certificate name
Change-type: patch
2021-03-09 16:40:38 +00:00
b233ea3e3e Linux installation instructions: Add sudo configuration section
Change-type: patch
2021-03-07 23:31:31 +00:00
4fe660b3a5 v12.40.3 2021-03-06 18:51:02 +02:00
1f07cd1b1c Merge pull request #2207 from balena-io/fix-qemu-download-error-handling
build, deploy: Fix error handling when QEMU download fails
2021-03-06 16:48:59 +00:00
bcea5193a1 build, deploy: Fix error handling when QEMU download fails
Change-type: patch
2021-03-06 16:10:33 +00:00
8b99cd7170 v12.40.2 2021-02-24 00:45:01 +02:00
1986c9339c Merge pull request #2197 from balena-io/device-local-mode-markdown
docs: Fix missing markdown docs for device `deactivate` and `local-mode`
2021-02-23 22:43:00 +00:00
b90c9b0d7e docs: Fix missing markdown docs for device deactivate and local-mode
Change-type: patch
2021-02-23 22:10:52 +00:00
e28c3f9814 v12.40.1 2021-02-23 16:55:03 +02:00
d054ced541 Merge pull request #2194 from balena-io/klutchell/emulated-docs
docs: emphasize that push emulation is not required in most cases
2021-02-23 14:52:52 +00:00
c8e4d2c9a6 docs: emphasize that push emulation is not required in most cases
Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-02-23 08:55:25 -05:00
9671372b9e v12.40.0 2021-02-10 03:28:52 +02:00
2a4ff75203 Merge pull request #2177 from balena-io/livepush-compose-dev-overlay
Add support for docker-compose dev overlay
2021-02-10 01:26:52 +00:00
f3d750a024 Add support for docker-compose dev overlay in local pushes
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2021-02-09 13:06:03 +01:00
a701cd8d4d v12.39.1 2021-02-07 01:08:07 +02:00
e2c0c2f359 Merge pull request #2179 from balena-io/klutchell/qemu-v5.2.0+balena4
build/deploy: fix emulated builds to use fully static qemu binaries
2021-02-06 23:05:50 +00:00
15fc805f89 build/deploy: fix emulated builds to use fully static qemu binaries
Avoid possible situations where the local glibc may not support
the required syscalls for arm emulation during build/deploy.

Change-type: patch
Conneted-to: https://github.com/balena-io/qemu/issues/21
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-02-06 09:50:46 -05:00
0a995ecc49 v12.39.0 2021-02-04 19:41:10 +02:00
1ba992ada2 Merge pull request #2176 from balena-io/device-localmode
Add command `device local-mode`
2021-02-04 17:39:05 +00:00
e47fd0c887 Add command device local-mode
Change-type: minor
Resolves: #1304
Signed-off-by: Scott Lowe <scott@balena.io>
2021-02-04 15:36:32 +00:00
af1de34840 v12.38.10 2021-02-04 17:00:43 +02:00
96fb525378 Merge pull request #2169 from balena-io/deduplicated-msg
Improve build-time checks (automation/test-lock-deduplicated.sh)
2021-02-04 14:58:27 +00:00
3d1f16c0ab v12.38.9 2021-02-04 15:59:06 +02:00
6fb58a25fc Merge pull request #2175 from balena-io/cloud-build-orgs
Modify push to pass app slug to builder
2021-02-04 13:56:31 +00:00
e6b85c9cf8 Modify push to pass app slug to builder
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-02-04 10:41:00 +01:00
43b93e7fd4 v12.38.8 2021-01-29 17:04:38 +02:00
a05dcf08b8 Merge pull request #2173 from balena-io/klutchell/qemu-v5.2.0
build/deploy: Update QEMU to speed up emulated builds
2021-01-29 15:02:49 +00:00
9636985ee7 build/deploy: Update QEMU to speed up emulated builds
QEMU v5 has quite a few improvements over v4, and the speed
difference when emulating arm is quite noticible.

We tested this with, and without, our single-core limitation
patch and have not been able to reproduce the stability
issues we were seeing in v4 so the patch was removed in
this release.

Change-type: patch
Connects-to: https://github.com/balena-io/balena-io/issues/2340
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-01-29 09:26:34 -05:00
023fc57914 v12.38.7 2021-01-26 10:31:28 +02:00
492bdab2fe Merge pull request #2170 from balena-io/tunnel-help-openbalena
tunnel: Add note re openBalena version compatibility
2021-01-26 08:29:29 +00:00
941c365259 tunnel: Add note re openBalena version compatibility
Change-type: patch
2021-01-25 17:33:41 +00:00
fed58278c9 v12.38.6 2021-01-23 03:09:50 +02:00
d74af38bfe Merge pull request #2171 from balena-io/debug-logging
logging: note that the device supervisor version is operative
2021-01-23 01:07:30 +00:00
53926067ca logging: note that the device supervisor version is operative
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2021-01-22 16:53:15 -05:00
7181dc5401 v12.38.5 2021-01-22 12:59:32 +02:00
e35e13f9a7 Merge pull request #2163 from balena-io/switch-tunnel-to-tls
tls: Use TLS for tunnel connection
2021-01-22 10:57:39 +00:00
6e0638f3be Improve build-time checks (automation/test-lock-deduplicated.sh)
Change-type: patch
2021-01-21 21:29:10 +00:00
d60ec13d5c v12.38.4 2021-01-21 19:14:47 +02:00
731e50a757 Merge pull request #2166 from balena-io/engines-less-than-13
Update supported Node.js version range in package.json (<13.0.0)
2021-01-21 17:11:55 +00:00
b363d28664 Update supported Node.js version range in package.json (<13.0.0)
Change-type: patch
2021-01-21 15:58:08 +00:00
7ae83d9ce5 tls: Use TLS for tunnel connection
Switch to using the exposed tunnelUrl and TLS for making
tunnels to the device, to improve security.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2021-01-20 21:18:23 +00:00
31281549a6 v12.38.3 2021-01-19 19:19:10 +02:00
e86bcc438c Merge pull request #2161 from balena-io/workaround-push-public
Handle 'push' edge case with application access
2021-01-19 17:17:31 +00:00
a1cf602f6f Handle 'push' edge case with application access
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-01-19 13:38:22 +01:00
4cd3ef8b91 v12.38.2 2021-01-19 10:22:20 +02:00
e4eb4586f5 Merge pull request #2158 from balena-io/delete-travis-appveyor
Delete old config files for Travis and AppVeyor to avoid confusion
2021-01-19 08:20:37 +00:00
360c6e42f8 v12.38.1 2021-01-15 18:54:21 +02:00
f76702c4e0 Merge pull request #2160 from balena-io/fix-errorhandler-strings
Fix handling of thrown strings
2021-01-15 16:52:14 +00:00
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
f73e3db4de Delete old config files for Travis and AppVeyor to avoid confusion
Change-type: patch
2021-01-15 14:05:16 +00:00
1f74889386 v12.38.0 2021-01-15 01:27:04 +02:00
743de66138 Merge pull request #2154 from balena-io/add_release_tags_to_deploy
Add release-tag on deploy command
2021-01-14 23:24:51 +00:00
8d56fe9678 deploy: Add --release-tag flag
Now we can do:
`balena deploy myApp myApp/myImage --release-tag key1 value1`

Refactor and reuse the logic that parses and applies the
release tag options from the push command to the deploy
command.

Resolves: #892
Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2021-01-15 00:46:39 +02:00
3d9d8bf5c8 v12.37.2 2021-01-14 16:50:48 +02:00
8c3df9ae30 Merge pull request #2153 from balena-io/america
docs: americanize the spelling of words in sourced markdown
2021-01-14 14:48:52 +00:00
e71184ed3a docs: americanize the spelling of words in sourced markdown
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2021-01-13 10:12:24 -05:00
caadce6c2b v12.37.1 2021-01-06 17:30:57 +02:00
f45fac6138 Merge pull request #2148 from balena-io/remove-internal-scandevices
Refactor out command internal scandevices
2021-01-06 15:29:10 +00:00
aeff5997d0 Refactor out command internal scandevices
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2021-01-06 15:00:18 +01:00
b5028c65cc v12.37.0 2020-12-29 12:58:58 +02:00
f69276e7c9 Merge pull request #2146 from balena-io/update-preload-10.4.1
Update preload 10.4.1
2020-12-29 10:56:43 +00:00
9fff9266d4 Add --additional-space flag to preload
Change-type: minor
2020-12-28 17:08:20 +01:00
0e7f953f72 Update balena-preload to 10.4.1
10.4.0 improves image size estimation
10.4.1 prevents running out of space while pulling images because of temporary files

Change-type: patch
2020-12-28 16:42:12 +01:00
61b11994b5 v12.36.1 2020-12-24 02:20:29 +02:00
1e1935cfb1 Merge pull request #2144 from balena-io/orgs-push
Update push command for organizations
2020-12-24 00:18:38 +00:00
27e2b03702 Update push command for organizations
Change-type: patch
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-23 16:03:52 +01:00
358acbd2c8 v12.36.0 2020-12-23 09:36:42 +02:00
b040a21268 Merge pull request #2138 from balena-io/add_tag_on_push
push: Add --release-tag flag
2020-12-23 07:35:03 +00:00
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
34557e35ee push: Add --release-tag flag
You can have 0 or multiple keys without values,
if you use values then you should have as many
values as you have keys. If you don't want to set
a value for a key set its value to "" (bash, cmd.exe)
or '""' (powershell).

Connects-to: #892
Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-22 17:10:10 +02:00
3bff569758 v12.35.3 2020-12-21 13:18:38 +02:00
cf06a8dfad Merge pull request #2143 from balena-io/improve-id-disambiguation-tags
Improve id disambiguation for tag commands
2020-12-21 11:16:55 +00:00
584aa745f7 Improve id disambiguation for tag commands
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-18 12:52:18 +01:00
194d12cb3d v12.35.2 2020-12-18 11:44:48 +02:00
7739379444 Merge pull request #2137 from balena-io/fix-balenadev-sigterm
Modify handling of SIGINT in balena-dev
2020-12-18 09:42:03 +00:00
5c93df921e Modify handling of SIGINT in balena-dev
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-18 10:19:55 +01:00
da652c6bce v12.35.1 2020-12-17 17:06:38 +02:00
1cd341e6cd Merge pull request #2139 from balena-io/org-support-ssh-tunnel
Update commands ssh, tunnel to support orgs
2020-12-17 15:04:34 +00:00
9d2884aab7 Update commands ssh, tunnel to support orgs
Change-type: patch
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-17 13:01:53 +01:00
f128eaf389 v12.35.0 2020-12-15 17:46:38 +02:00
70b0524eb6 Merge pull request #2131 from balena-io/update-app-command-info-for-orgs
Update various commands to support organizations
2020-12-15 15:44:12 +00:00
c898747468 Update various commands to support organizations
Change-type: minor
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-15 16:06:25 +01:00
6fc3b0df58 v12.34.0 2020-12-15 16:47:17 +02:00
746676beb9 Merge pull request #2127 from balena-io/app-create-orgs
Add organizations support to app create command
2020-12-15 14:42:38 +00:00
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
c6430274e5 v12.33.2 2020-12-15 09:40:26 +02:00
9637f75617 Merge pull request #2050 from josecoelho/1667-permission-validation
Improve error message to access balena settings
2020-12-15 07:37:57 +00:00
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
0d3ca63f00 v12.33.1 2020-12-11 18:44:05 +02:00
1f3677bdb2 Merge pull request #2136 from balena-io/fix-preload-app-id
Fix preload command support for application IDs
2020-12-11 16:41:03 +00:00
10bca728f0 v12.33.0 2020-12-11 17:12:40 +02:00
9763a14e97 Merge pull request #2135 from balena-io/add-orgs
Add orgs command
2020-12-11 15:10:13 +00:00
fe24280adf Fix preload command support for application IDs
Change-type: patch
Resolves: #2063
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-11 13:54:31 +00:00
a11f9ec705 Add orgs command
Change-type: minor
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-11 12:48:44 +01:00
836ae1cf4a v12.32.2 2020-12-11 03:11:16 +02:00
b4d37e7a3a Merge pull request #2133 from balena-io/apps-column-match-not-a-function
apps: Fix "column.match is not a function" when --verbose is used
2020-12-11 01:08:46 +00:00
055ad834e7 apps: Fix "column.match is not a function" when --verbose is used
Change-type: patch
2020-12-11 00:31:59 +00:00
d2cb88dfb8 v12.32.1 2020-12-11 02:30:10 +02:00
d096743e78 Merge pull request #2130 from balena-io/ab77/onprem-refresh
Make balena-cli build on refreshed on-prem workers
2020-12-11 00:26:45 +00:00
511d0dbe26 Make balena-cli build on refreshed on-prem workers
* Fix 'balena ssh' test cases when using the Windows built-in ssh tool
* Fix Windows installer build in new balena CI workers (qqjs patch)
* Remove hardcoded path

Change-type: patch
2020-12-10 12:30:25 -08:00
6b0201866f v12.32.0 2020-12-10 18:42:18 +02:00
9e20b2b691 Merge pull request #2128 from balena-io/app-rename-orgs
Add organizations support to app rename command
2020-12-10 16:40:18 +00:00
665e0cf9d7 Add organizations support to app rename command
Change-type: minor
Connects-to: #2119
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-10 13:57:42 +01:00
b319ec7281 v12.31.0 2020-12-10 14:38:47 +02:00
ae3ccf759f Merge pull request #2113 from balena-io/1828-livepush-connection-lost
Livepush, logs: Automatically reconnect on 'Connection to device lost'
2020-12-10 12:36:45 +00:00
309b1ba6a0 v12.30.4 2020-12-10 10:20:29 +02:00
532c4a1862 Merge pull request #2125 from balena-io/fix-app-display
Fix app name output in app command
2020-12-10 08:18:28 +00:00
fc8b7c71fc Fix app name output in app command
Change-type: patch
Resolves: #2120
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-10 08:32:20 +01:00
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
54731c2d20 Livepush, logs: Automatically reconnect on 'Connection to device lost'
Change-type: minor
2020-12-09 20:43:14 +00:00
d00db5ea8c logs: Fix CTRL-C ignored on Windows (PowerShell, MSYS, Git for Windows)
Change-type: patch
2020-12-09 20:43:14 +00:00
5497835728 Livepush: Fix process not exiting on "Connection to device lost"
Resolves: #1828
Change-type: patch
2020-12-09 20:43:14 +00:00
5bb05f3a8c v12.30.3 2020-12-09 19:07:19 +02:00
659eda8cd1 Merge pull request #2117 from balena-io/add_device_deactivation_expected_errors
errors: Add expected errors for device deactivation
2020-12-09 17:05:41 +00:00
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
140993f554 v12.30.2 2020-12-08 13:02:07 +02:00
575eaf6de1 Merge pull request #2116 from balena-io/remove-v12
Remove remaining v12 switches
2020-12-08 11:00:07 +00:00
3edf7a038f Remove remaining v12 switches
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-08 11:00:36 +01:00
ad16c5270e v12.30.1 2020-12-07 16:14:13 +02:00
adadefdf3f Merge pull request #2115 from balena-io/fix-booleans
Standardize boolean flag typing
2020-12-07 14:12:14 +00:00
19fab40398 Standardize boolean flag typing
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-12-07 14:36:29 +01:00
4dc53eb056 v12.30.0 2020-12-07 14:30:09 +02:00
9c96da7515 Merge pull request #2112 from balena-io/add_deactive_cmd
device: Add deactivate command
2020-12-07 12:28:24 +00:00
8a3e386d21 packages: Bump balena-sdk and balena-errors
Update balena-sdk from 15.6.0 to 15.20.0
Update balena-errors from 4.4.1 to 4.7.1

Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-07 13:19:02 +02:00
5eaa4cfb9f common-flags: Add default false on yes, force and verbose flags
Change-type: patch
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-07 13:17:51 +02:00
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
090fc58d10 v12.29.1 2020-12-04 03:22:19 +02:00
3b05971098 Merge pull request #2114 from balena-io/devices-full-uuid
devices: Don't truncate device UUID to 7 chars when --json is used
2020-12-04 01:20:17 +00:00
aae6aff3e9 devices: Don't truncate device UUID to 7 chars when --json is used
Change-type: patch
2020-12-04 00:45:03 +00:00
0bae6546f2 v12.29.0 2020-12-01 16:07:38 +02:00
40ab27df26 Merge pull request #2108 from balena-io/scan_prod_devices
scan: Print production devices' info on scan
2020-12-01 14:04:58 +00:00
7d5a64f59a scan: Print production devices' info on scan
Resolves: #1713
Change-type: minor
Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
2020-12-01 13:31:29 +02:00
8115d156df v12.28.3 2020-11-26 16:48:38 +02:00
08fc1a3924 Merge pull request #2104 from balena-io/delay-investigation
Add ability to disable analytics for performance testing
2020-11-26 14:46:51 +00:00
950d173d27 Add ability to disable analytics for performance testing
Change-type: patch
Connects-to: #1708
Signed-off-by: Scott Lowe <scott@balena.io>
2020-11-26 13:47:48 +01:00
ac49246141 v12.28.2 2020-11-20 14:44:30 +02:00
0689074dd7 Merge pull request #2097 from balena-io/2096-login-unhandled-rejection
Fix unhandled rejection, --debug logic and add doc references to masterclasses
2020-11-20 12:42:13 +00:00
ee79c87723 v12.28.1 2020-11-20 12:57:08 +02:00
9dc9556619 Merge pull request #2099 from balena-io/2098-scan-json-spinner
scan: Prevent spinner animation output to stdout when --json is used
2020-11-20 10:55:23 +00:00
2f9212d622 scan: Prevent spinner animation output to stdout when --json is used
Change-type: patch
2020-11-20 00:23:26 +00:00
2bf59530c4 docs: Add references to the masterclasses in the CLI help and README
Change-type: patch
2020-11-19 18:13:45 +00:00
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
65f053dd6e Fix unhandled promise rejection when ~/.balena is not accessible
Resolves: #2096
Change-type: patch
2020-11-19 18:13:45 +00:00
8137b79078 v12.28.0 2020-11-19 20:03:53 +02:00
e9b5773bcb Merge pull request #2093 from balena-io/2091-livepush-use-dockerignore
Livepush: Ignore paths set in .dockerignore files
2020-11-19 18:00:54 +00:00
4768f76385 push: Reduce memory usage when filtering files with dockerignore
Change-type: patch
2020-11-19 14:24:54 +00:00
d6b3249274 Livepush: Refactor dockerignore filtering and add test cases
Change-type: patch
2020-11-19 14:24:54 +00:00
02a5466746 Livepush: Ignore paths set in .dockerignore files
Change-type: minor
Signed-off-by: Josh Bowling <josh@balena.io>
2020-11-19 14:24:44 +00:00
0831e5fa17 v12.27.4 2020-11-16 17:35:40 +02:00
4681d901f8 Merge pull request #2095 from balena-io/big-sur-notarization
Test code optimization: avoid running ~70 test cases twice
2020-11-16 15:32:39 +00:00
6a55613199 Test code optimization: avoid running ~70 test cases twice
Change-type: patch
2020-11-15 23:36:58 +00:00
893a39e891 docs: Add note about macOS Big Sur notarization workaround
Change-type: patch
2020-11-14 22:23:41 +00:00
fa4f91e08d v12.27.3 2020-11-11 19:25:53 +02:00
54dc37dbd3 Merge pull request #2094 from balena-io/expect-invalid-yaml
Avoid reporting balenarc parsing errors
2020-11-11 17:23:44 +00:00
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
20e0810d2a v12.27.2 2020-11-09 14:41:47 +02:00
edc2e77ddd Merge pull request #2084 from balena-io/codewithcheese/append-dev
Modify `os download` help to mention `-dev` suffix
2020-11-09 12:39:51 +00:00
7da9a800cc Modify os download help to mention dev images
Change-type: patch
Signed-off-by: Thomas Manning <thomasm@balena.io>
2020-11-09 06:13:06 +00:00
2ba4405452 v12.27.1 2020-11-06 11:36:38 +02:00
e7ebf1ad12 Merge pull request #2081 from balena-io/app-disambiguation
Improve application-identifier disambiguation
2020-11-06 09:34:15 +00:00
46249e319b Improve application-identifier disambiguation
Change-type: patch
Resolves: #2077
Signed-off-by: Scott Lowe <scott@balena.io>
2020-11-06 09:39:36 +01:00
fcd0932df8 v12.27.0 2020-11-05 18:45:17 +02:00
34792ecce9 Merge pull request #2067 from balena-io/app-purge
Add command app purge
2020-11-05 16:43:14 +00:00
1e18096873 Add command app purge
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2020-11-05 17:07:06 +01:00
4da1ed3a56 v12.26.2 2020-11-05 16:03:57 +02:00
92b8741288 Merge pull request #2088 from balena-io/2087-resource-uuid
config generate + openBalena v3: Fix "Cannot read property '__id' of undefined"
2020-11-05 14:02:00 +00:00
6b4c28a026 config generate + openBalena v3: Fix "Cannot read property '__id' of undefined"
Change-type: patch
2020-11-05 13:22:15 +00:00
849fc24158 v12.26.1 2020-10-31 03:09:18 +02:00
16efb9748f Merge pull request #2074 from balena-io/devices-slug-undefined
devices: Fix "TypeError: Cannot read property 'slug' of undefined"
2020-10-31 01:07:16 +00:00
9d177609f5 devices: Fix "TypeError: Cannot read property 'slug' of undefined"
Change-type: patch
2020-10-31 00:29:50 +00:00
826b0659d6 v12.26.0 2020-10-29 12:40:24 +02:00
46d7d1d068 Merge pull request #2066 from balena-io/device-purge
Add command device purge
2020-10-29 10:38:32 +00:00
47fcffe368 Add command device purge
Change-type: minor
Resolves: #1547
Signed-off-by: Scott Lowe <scott@balena.io>
2020-10-29 11:03:37 +01:00
bb7cd7ac62 v12.25.6 2020-10-28 12:36:54 +02:00
a83f6c95df Merge pull request #2076 from balena-io/2075-ssh-service-regex
ssh: Fix "Found more than one container with a service name <name>"
2020-10-28 10:35:14 +00:00
7f000ee8c3 ssh: Fix "Found more than one container with a service name <name>"
Change-type: patch
2020-10-28 01:06:54 +00:00
e5e7bb4757 v12.25.5 2020-10-27 13:10:06 +02:00
37e6bd4b5c Merge pull request #2073 from balena-io/rm-hardcoded-command-ids
Remove need for hardcoded list of command ids
2020-10-27 11:08:27 +00:00
c48564e85a Remove need for hardcoded list of command ids
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-10-27 10:36:49 +01:00
8460dac066 v12.25.4 2020-10-26 08:23:55 +02:00
64ffcfdd91 Merge pull request #2072 from balena-io/1893-config-generate-application-ambiguous
config generate: Fix "Application is ambiguous" when app slug is used
2020-10-26 06:22:14 +00:00
077e25ebc4 Update Contributing document re commit messages / versionbot / changelog
Change-type: patch
2020-10-25 17:11:19 +00:00
709f009f9b config generate: Fix "Application is ambiguous" when app slug is used
Connects-to: #1893
Change-type: patch
2020-10-25 16:52:31 +00:00
116ab1fbc1 config generate: Fix device type compatibility check
Change-type: patch
2020-10-25 16:40:11 +00:00
260a30532a v12.25.3 2020-10-23 13:07:34 +03:00
7534042519 Merge pull request #2069 from balena-io/1053-buildArgs-compose
Fix `--buildArg` with compose projects; Convert `buildProject` to Typescript
2020-10-23 10:04:53 +00:00
6b208ec2ab build/deploy: Add more test cases (--buildArg option)
Change-type: patch
2020-10-21 14:25:40 +01:00
099d755900 Fix typing (don't assume that 'docker-toolbelt' uses Bluebird promises)
Change-type: patch
2020-10-21 14:25:40 +01:00
3199f15662 build/deploy: Fix --buildArg option with docker-compose.yml projects
Resolves: #1053
Change-type: patch
2020-10-21 13:02:47 +01:00
4c8dc29946 build/deploy: Fix image size notice at end of build
Change-type: patch
2020-10-21 13:02:47 +01:00
2b22fb89f1 Convert more code to Typescript (compose.js)
Change-type: patch
2020-10-21 13:02:47 +01:00
cf7d9246e5 v12.25.2 2020-10-21 15:02:26 +03:00
0d3106af0e Merge pull request #2070 from balena-io/revert-balenacli-styling
Fix preload --add-certificate, amend help for `version`, and revert `balenaCLI` styling in docs
2020-10-21 12:00:21 +00:00
478b5dd363 Revert styling of "balena CLI" as "balenaCLI"
Change-type: patch
2020-10-21 00:07:46 +01:00
0708608c7e Add help note regarding the version of Node.js printed by balena version -a
Connects-to: #2068
Change-type: patch
2020-10-21 00:07:45 +01:00
c245dc70c2 preload: Fix parsing of --add-certificate option, amend help for --app
Connects-to: #2063
Change-type: patch
2020-10-21 00:07:15 +01:00
4373ba7a5d v12.25.1 2020-10-13 11:58:10 +03:00
2cc8d15c05 Merge pull request #2054 from balena-io/ignore-unauthorized-errors
Treat authorization errors as expected
2020-10-13 08:56:13 +00:00
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
31123d28f0 v12.25.0 2020-10-13 11:01:54 +03:00
9b6ffecaba Merge pull request #2061 from balena-io/2060-balenarc-no-sentry
Update Sentry, add BALENARC_NO_SENTRY var, refactor CLI initialization
2020-10-13 07:59:51 +00:00
d0e4fa0e59 Refactor initialization code (delete app-oclif.ts and app-common.ts)
Change-type: patch
2020-10-11 00:45:53 +01:00
cf376316bc Support BALENARC_NO_SENTRY env var to disable Sentry.io error reporting
Change-type: minor
2020-10-10 00:45:55 +01:00
8f0f3bda29 Update Sentry package (may fix "Maximum call stack size exceeded")
Change-type: patch
2020-10-09 13:03:53 +01:00
c33409adb0 v12.24.1 2020-10-07 19:28:54 +03:00
873eb1fc59 Merge pull request #2057 from balena-io/allow-alternative-signups
login: sign up at the configured balena instance
2020-10-07 16:27:08 +00:00
af70f16a9b login: sign up at the configured balena instance
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2020-10-07 09:20:50 -04:00
e8d757ca28 v12.24.0 2020-10-06 23:10:25 +03:00
63d3402924 Merge pull request #2056 from balena-io/scan-json
scan: Add '--json' option to help with scripting
2020-10-06 20:08:48 +00:00
8a506bc4c0 scan: Add '--json' option to help with scripting
Change-type: minor
2020-10-06 18:04:43 +01:00
a14d89fe10 v12.23.4 2020-10-06 00:48:28 +03:00
29ed0a232d Merge pull request #2053 from balena-io/fix-balenadev
Workaround balena-dev/oclif compatibility issues
2020-10-05 21:46:19 +00:00
8978221866 Update CONTRIBUTING.md re balena-dev workflow
Change-type: patch
2020-10-05 22:10:54 +01:00
2974c203b5 Add bin/balena* scripts to linter paths
Change-type: patch
2020-10-05 22:10:54 +01:00
c85acbd90b Workaround balena-dev/oclif compatibility issues
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-10-02 16:17:16 +02:00
8a808e25d0 v12.23.3 2020-10-02 15:22:36 +03:00
75687f51ac Merge pull request #2052 from balena-io/rename-actions
Rename actions-oclif/ to commands/
2020-10-02 12:20:57 +00:00
eddbdfe0dc Rename actions-oclif/ to commands/
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-10-02 13:42:23 +02:00
d8acc3f814 v12.23.2 2020-10-02 12:35:48 +03:00
fc8be3d8dc Merge pull request #2051 from balena-io/fix-push-emulated-flag
push: Fix accidental rename of `-e` (emulated) option
2020-10-02 09:33:46 +00:00
0ee02a4d73 v12.23.1 2020-10-02 11:50:46 +03:00
568fcb9759 Merge pull request #2049 from balena-io/refresh-contributing
Update the CONTRIBUTING.md document
2020-10-02 08:49:00 +00:00
6133bb2096 push: Fix accidental rename of -e (emulated) option
Accidentally renamed during oclif conversion in CLI v12.9.7.

Change-type: patch
2020-10-01 23:49:14 +00:00
48076464da Update the CONTRIBUTING.md document
Change-type: patch
2020-09-28 15:19:10 +01:00
1acf342fb0 v12.23.0 2020-09-25 18:13:07 +03:00
340ca6577b Merge pull request #2046 from balena-io/add-support
Add new command `support`
2020-09-25 15:11:05 +00:00
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
65c01ac172 v12.22.2 2020-09-20 03:20:05 +03:00
4c9a22aba7 Merge pull request #2041 from balena-io/2040-fix-deploy-exit
deploy: Fix unexpected exit with "Everything is up to date"
2020-09-20 00:18:08 +00:00
889fafcffc deploy: Fix unexpected exit with "Everything is up to date"
Resolves: #2040
Change-type: patch
2020-09-20 00:35:57 +01:00
719cc2e4c9 v12.22.1 2020-09-19 12:23:16 +03:00
e484701276 Merge pull request #2039 from balena-io/1760-simplify-install-docs
Reorganize and simplify installation instructions
2020-09-19 09:21:20 +00:00
b1897a512d Style "balena CLI" as "balenaCLI" and "balena cloud" as "balenaCloud"
Change-type: patch
2020-09-18 23:27:24 +01:00
f98c25eaee Reorganize and simplify installation instructions
Change-type: patch
2020-09-18 14:13:32 +01:00
b9c3b57b85 v12.22.0 2020-09-18 15:41:12 +03:00
8aff330516 Merge pull request #2038 from balena-io/add-device-restart
Add new command `device restart`
2020-09-18 12:39:09 +00:00
abdaf0043f Add new command device restart
Change-type: minor
Resolves: #1542
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-18 12:39:53 +02:00
960cb3098d v12.21.1 2020-09-17 03:48:23 +03:00
e907f12445 Merge pull request #2037 from balena-io/2036-scan-sync-standalone
scan: Fix "CLI could not be loaded" with the standalone zip installer
2020-09-17 00:46:19 +00:00
799e0f9dea scan: Fix "CLI could not be loaded" with the standalone zip installer
Change-type: patch
2020-09-17 00:38:00 +01:00
c389f41006 v12.21.0 2020-09-16 18:16:57 +03:00
74ca5207ad Merge pull request #2034 from balena-io/add-app-rename
Add new command `app rename`
2020-09-16 15:14:54 +00:00
3706db2436 Add new command app rename
Change-type: minor
Resolves: #1567
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-16 16:38:10 +02:00
6ec0b4a3bd v12.20.0 2020-09-10 21:28:04 +03:00
e65caed64e Merge pull request #2033 from balena-io/post-capitano-refactor
Improve command suggestions, add topic help
2020-09-10 18:26:29 +00:00
b180eb7b73 Minor fix to device rm
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 17:34:06 +02:00
9805854eab Update registry secrets example URL
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 17:33:57 +02:00
00c956394d Improve command suggestions, add topic help
Change-type: minor
Resolves: #2021
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 15:56:45 +02:00
b3510f205f v12.19.0 2020-09-10 15:09:25 +03:00
e755d9f03f Merge pull request #2032 from balena-io/misc-bugfixes
Misc bugfixes
2020-09-10 12:07:33 +00:00
f9224b05af Fix numerical id support in device rm
Change-type: patch
Resolves: #2031
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 12:53:02 +02:00
ece4d88bfd Fix numerical id support in device move
Change-type: patch
Resolves: #2030
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 12:53:02 +02:00
0dd7c33237 Fix required status of param in os versions
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-10 12:53:02 +02:00
cd20f1765e Merge pull request #2028 from balena-io/join-poll
Add ability to specify poll interval in join command
2020-09-09 13:56:12 +00:00
0ca1faba09 Add ability to specify poll interval in join command
Change-type: minor
Resolves: #1432 #1697 #1670
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-09 14:24:45 +02:00
9f8569e33f Improve error handling in internal scandevices
Change-type: patch
Connects-to: #1703
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-09 14:24:45 +02:00
d7007721a7 v12.18.0 2020-09-09 14:38:49 +03:00
f9f1863fdb Merge pull request #2027 from balena-io/1584-push-pull
push (local device): Add --pull option to force pulling base images again
2020-09-09 11:36:41 +00:00
93e18bea27 push (local device): Add --pull option to force pulling base images again
Connects-to: #1584
Change-type: minor
2020-09-09 00:16:22 +01:00
73f49765ec push: Reformat help output to fit in 80 characters
Connects-to: #1858
Change-type: patch
2020-09-09 00:16:21 +01:00
3a508dc397 v12.17.2 2020-09-08 21:16:44 +03:00
bd5bf0135a Merge pull request #2026 from balena-io/fix-device-issue
Fix error displaying info for devices without commits
2020-09-08 18:14:24 +00:00
e0c65bdef8 Fix error displaying info for devices without commits
Change-type: patch
Resolves: #2024
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-08 18:57:00 +02:00
b9d90b9e38 v12.17.1 2020-09-08 15:16:37 +03:00
d910319ba5 Merge pull request #2025 from balena-io/convert-help-fixes
Fix issues from removal of capitano
2020-09-08 12:14:34 +00:00
5e5a2c1c85 Fix usage info for env rename
Change-type: patch
Resolves: #2019
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-08 13:31:41 +02:00
238c371ade Fix typo in docs help section
Change-type: patch
Resolves: #2020
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-08 13:23:39 +02:00
504877c232 Fix issue with replaced command checks
Change-type: patch
Resolves: #2022
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-08 13:13:53 +02:00
bdcf58471f v12.17.0 2020-09-07 16:31:25 +03:00
46b9c586a6 Merge pull request #2018 from balena-io/convert-help
Convert help, remove capitano
2020-09-07 13:29:24 +00:00
273ea5ce4d Display command suggestions, when command not recognized
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-07 14:35:35 +02:00
d56fec6e36 Convert help to oclif, remove capitano
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-07 14:13:32 +02:00
cd81ff005f v12.16.0 2020-09-04 14:09:05 +03:00
dee216eeaa Merge pull request #2015 from balena-io/1584-build-pull
build, deploy: Add --pull option to force pulling base images again
2020-09-04 11:07:00 +00:00
d1539f405a build, deploy: Add --pull option to force pulling base images again
Resolves: #1584
Change-type: minor
2020-09-04 10:28:36 +01:00
d131fb4fa8 v12.15.1 2020-09-04 12:26:57 +03:00
a0380848a0 Merge pull request #2017 from balena-io/modify-undervoltage-field
Modify undervoltage status display in device command
2020-09-04 09:25:00 +00:00
ffa8e245ba Modify undervoltage status display in device command
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-04 10:32:40 +02:00
8631e22686 v12.15.0 2020-09-03 20:31:45 +03:00
f0bd3a38db Merge pull request #2014 from balena-io/new-device-fields
Add support for new device metrics to device command
2020-09-03 17:29:18 +00:00
88569066b5 Add support for new device metrics to device command
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-03 18:26:53 +02:00
c20bbe658b v12.14.18 2020-08-28 17:10:37 +03:00
ac0ce8f702 Merge pull request #2013 from balena-io/async-await-oclif
Convert oclif actions to async/await
2020-08-28 14:08:48 +00:00
42c6e1010f Convert oclif actions to async/await
Change-type: patch
2020-08-28 13:43:10 +01:00
1f4554abe8 v12.14.17 2020-08-27 17:51:29 +03:00
4e457da5a9 Merge pull request #2011 from balena-io/improve-preload-typings
preload: Improve the typings
2020-08-27 14:48:34 +00:00
2e1570149d preload: Improve the typings
Change-type: patch
Depends-on: https://github.com/balena-io/balena-sdk/pull/980
See: https://github.com/balena-io/balena-cli/pull/2007#discussion_r478330624
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-08-27 16:44:08 +03:00
c647989054 Update balena-sdk to 15.3.7
Update balena-sdk from 15.3.1 to 15.3.7

Change-type: patch
2020-08-27 12:51:13 +00:00
44bd667648 v12.14.16 2020-08-27 15:37:55 +03:00
2d042ee116 Merge pull request #2010 from balena-io/update-typescript
Update to typescript 4.0
2020-08-27 13:35:40 +01:00
787966a0b6 Update to typescript 4.0
Change-type: patch
2020-08-27 11:50:57 +01:00
a59d85e833 v12.14.15 2020-08-27 13:25:58 +03:00
d0616acf1b Merge pull request #2007 from balena-io/convert-preload
Convert command preload to oclif, typescript
2020-08-27 10:23:08 +00:00
d21a18f353 Convert command preload to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-08-27 10:19:54 +02:00
7d3dbc2c0b v12.14.14 2020-08-26 17:13:46 +03:00
529b98552c Merge pull request #2004 from balena-io/dont-try-to-parse-uuid-as-integer-in-tunnel
Don't try to parse deviceOrApplication as an integer in the tunnel action
2020-08-26 14:11:55 +00:00
99a478ee39 Fix device UUID parsing for 'balena tunnel'
Change-type: patch
2020-08-26 15:10:00 +02:00
fb879d3020 v12.14.13 2020-08-26 13:40:27 +03:00
4fb4cce842 Merge pull request #2006 from balena-io/1993-preload-logo
preload: Fix splash image file name for balenaOS >= 2.53.0
2020-08-26 10:38:14 +00:00
f772957d29 preload: Fix splash image file name for balenaOS >= 2.53.0
Resolves: #1993
Change-type: patch
2020-08-26 10:48:30 +01:00
fd9520224c v12.14.12 2020-08-24 13:14:10 +03:00
c1afaa6cf3 Merge pull request #2000 from balena-io/convert-deploy
Convert deploy command to oclif
2020-08-24 10:12:03 +00:00
8cb413c1c9 Convert deploy command to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-08-22 11:58:10 +02:00
e96fca551e v12.14.11 2020-08-21 14:28:43 +03:00
edb3ea53fb Merge pull request #2001 from balena-io/fix-template-patch
Fix help template bug affecting discrete value options
2020-08-21 11:26:26 +00:00
358a909214 Shorten env add command summary to prevent wrapping
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-08-21 12:43:12 +02:00
eb74ca631a Fix help template bug affecting discrete value options
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-08-21 12:41:35 +02:00
64ebebb121 v12.14.10 2020-08-15 01:49:55 +03:00
abc62404ab Merge pull request #1997 from balena-io/1992-fix-build-args
build: Fix --buildArg and --cache-from options (broken since v12.9.9)
2020-08-14 22:47:48 +00:00
af1c4b0d03 build: Fix --buildArg and --cache-from options (broken since v12.9.9)
Change-type: patch
2020-08-14 23:12:12 +01:00
830e1f801d v12.14.9 2020-08-14 16:49:45 +03:00
59c398fbf0 Merge pull request #1995 from balena-io/update-deps
Update dependencies
2020-08-14 13:47:42 +00:00
d7f49d2442 Update dependencies
Update balena-sdk from 15.3.0 to 15.3.1

Change-type: patch
2020-08-14 13:28:06 +01:00
34597f629d v12.14.8 2020-08-14 01:51:05 +03:00
3fa7eec8a9 Merge pull request #1996 from balena-io/fix-tar-stream
build / push: Fix sudden process crash (update tar-utils dependency)
2020-08-13 22:49:17 +00:00
1ee12b70bc build / push: Fix sudden process crash (update tar-utils dependency)
Change-type: patch
2020-08-13 23:05:11 +01:00
ca7b1ae084 v12.14.7 2020-08-13 18:03:37 +03:00
936d3cb62a Merge pull request #1994 from balena-io/update-deps
Update dependencies
2020-08-13 15:01:20 +00:00
230677e5e8 Update dependencies
Update balena-sdk from 15.2.5 to 15.3.0

Change-type: patch
2020-08-13 14:36:13 +01:00
025f817eb6 v12.14.6 2020-08-12 18:29:07 +03:00
54cceb688f Merge pull request #1982 from balena-io/allow-shrinkwrap-rebase
Allow rebasing of npm-shrinkwrap
2020-08-12 15:27:15 +00:00
648a73fd91 Tests: check shrinkwrap is deduped
Change-type: patch
2020-08-12 15:34:53 +01:00
3691ae148e Allow rebasing of npm-shrinkwrap
Change-type: patch
2020-08-12 14:46:51 +01:00
4496bc88f5 v12.14.5 2020-08-11 20:24:07 +03:00
afded27692 Merge pull request #1974 from balena-io/sdk-15
Update balena-sdk to 15.x
2020-08-11 17:21:59 +00:00
c1a5718364 Avoid trying to refresh token in tests 2020-08-11 17:54:39 +01:00
e021ad9af6 Update balena-sdk to 15.x
Update balena-config-json from 4.0.0 to 4.1.0
Update balena-image-manager from 7.0.1 to 7.0.3
Update balena-preload from 10.2.0 to 10.2.4
Update balena-sdk from 14.8.0 to 15.2.1
Update balena-sync from 11.0.0 to 11.0.2

Change-type: patch
2020-08-11 17:53:33 +01:00
5c8a5165e0 v12.14.4 2020-08-11 19:27:44 +03:00
71ff73c641 Merge pull request #1989 from balena-io/improve-tests
Improve tests
2020-08-11 16:25:57 +00:00
c35472e94d Tests: Specify es2018 as preferred, matching normal usage
Change-type: patch
2020-08-11 16:07:23 +01:00
511bb05cb9 Tests: Use a tmp data dir to avoid conflicts/overwriting existing data
Change-type: patch
2020-08-11 16:05:28 +01:00
53b2b54b23 Tests: Use a mocha file helper to always load config-tests first
Change-type: patch
2020-08-11 16:04:28 +01:00
e7f753007f Tests: Share mocha options between commands in package.json
Change-type: patch
2020-08-11 16:03:36 +01:00
0afaf8502f v12.14.3 2020-08-11 16:06:00 +03:00
3272b55dd9 Merge pull request #1988 from balena-io/avoid-unnecessary-tests
CI: Avoid unnecessary duplicate windows/mac tests
2020-08-11 13:04:02 +00:00
4c664167f6 CI: Avoid duplicate windows/mac tests
Change-type: patch
2020-08-11 12:32:36 +01:00
604c182e2c v12.14.2 2020-08-10 16:46:37 +03:00
60593a77ac Merge pull request #1987 from balena-io/lazy-load-tar-stream
Lazy load tar-stream
2020-08-10 13:44:39 +00:00
497c8cd49b Lazy load tar-stream
Change-type: patch
2020-08-10 12:01:55 +01:00
d348d9f71f v12.14.1 2020-08-08 01:23:00 +03:00
d6651fdd7e Merge pull request #1969 from balena-io/update-balena-sdk
Update balena-sdk to 14.x
2020-08-07 22:21:14 +00:00
e1c42405a1 Update balena-sdk to 14.x
Update balena-sdk from 13.6.0 to 14.8.0

Change-type: patch
2020-08-07 21:06:07 +00:00
bf22d9eaa8 v12.14.0 2020-08-07 23:58:35 +03:00
88523a2887 Merge pull request #1986 from balena-io/bump-chokidar-livepush
Live push: Accept Dockerfile ENV instructions in push to local device
2020-08-07 20:56:30 +00:00
e8eb031253 Live push: Accept Dockerfile ENV instructions in live push to local device
Update livepush, chokidar and @types/dockerode dependencies

Change-type: minor
2020-08-07 21:09:47 +01:00
120c82d657 v12.13.0 2020-08-07 18:13:27 +03:00
cb2e60d5af Merge pull request #1985 from balena-io/devices-json
devices: Add '--json' option to help with scripting
2020-08-07 15:11:32 +00:00
62dfae371c devices: Add '--json' option to help with scripting
Change-type: minor
2020-08-07 15:27:42 +01:00
eaf220b64f v12.12.2 2020-08-07 15:26:38 +03:00
9804dd3c33 Merge pull request #1983 from balena-io/pkg-warning-diff
Tests: add verification of 'pkg' warnings against saved output
2020-08-07 12:24:40 +00:00
94f3825119 Tests: add verification of 'pkg' warnings against saved output
Change-type: patch
2020-08-07 01:47:31 +01:00
abde3cf48a v12.12.1 2020-08-05 16:14:57 +03:00
efb488f81a Merge pull request #1977 from balena-io/reduce-bluebird
Reduce bluebird usage
2020-08-05 13:12:59 +00:00
6ca7c34e57 Reduce bluebird usage
Change-type: patch
2020-08-05 09:41:15 +01:00
3f084366db v12.12.0 2020-08-05 03:27:13 +03:00
9f98529e56 Merge pull request #1962 from nwneisen/1956-bulk-add-env-vars
Add ability to add env var to multiple locations in one command
2020-08-05 00:25:32 +00:00
bab98df87b env add: Add ability to add env var to multiple locations in one command
Change-type: minor
2020-08-04 17:40:26 -06:00
4d9affd030 v12.11.3 2020-08-04 22:28:57 +03:00
15b536a3b2 Merge pull request #1980 from balena-io/dont-change-preloader-config
Dont set the preloader config device type to intel-nuc
2020-08-04 19:26:42 +00:00
505acc19db Dont set the preloader config device type to intel-nuc
Change-type: patch
2020-08-04 20:12:28 +02:00
1d566a72ca v12.11.2 2020-08-04 20:23:26 +03:00
0337e284a6 Merge pull request #1978 from balena-io/1975-fix-os-build-config-undefined
os build-config: Fix output file containing 'undefined' word since v12.9.4
2020-08-04 17:21:25 +00:00
74c6f8a627 os build-config: Fix output file containing 'undefined' word since v12.9.4
Resolves: #1975
Change-type: patch
2020-08-04 17:27:20 +01:00
7aa1708f46 v12.11.1 2020-08-04 19:25:57 +03:00
32a21684e8 Merge pull request #1976 from balena-io/balena-release-v3
Update balena-release to v3
2020-08-04 16:23:50 +00:00
a52a623fdf Update balena-release to v3
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-08-04 15:35:29 +00:00
b63e31e255 v12.11.0 2020-08-04 18:34:05 +03:00
fec01977c7 Merge pull request #1972 from balena-io/1773-browser-login-port-number
login: Use any free port number instead of 8989 for web authentication
2020-08-04 15:32:06 +00:00
cf894d98a5 login: Use any free port number instead of 8989 for web authentication
Change-type: minor
2020-08-03 20:26:10 +01:00
d18f25cb9c Testing: Increase mocha timeout from 6s to 12s (experimental)
Change-type: patch
2020-08-03 20:26:10 +01:00
4cdff9694e Update GitHub issue template (request openBalena vs balenaCloud info)
Change-type: patch
2020-08-03 20:26:10 +01:00
304ade9772 v12.10.2 2020-08-03 18:57:08 +03:00
0865633020 Merge pull request #1973 from balena-io/fix-per-regression
Fix performance regressions from #1967
2020-08-03 15:55:16 +00:00
ddb87f403d Fix performance regressions from #1967
Change-type: patch
2020-08-03 11:04:36 +01:00
8047779c0c v12.10.1 2020-07-31 15:00:00 +03:00
9da7f03b2a Merge pull request #1966 from balena-io/reduce-bluebird
Remove some bluebird usage
2020-07-31 11:58:03 +00:00
9aacb7ec56 Remove some bluebird usage
Change-type: patch
2020-07-31 10:33:51 +00:00
41e7ba12ff v12.10.0 2020-07-30 22:22:32 +03:00
10decc785d Merge pull request #1952 from nwneisen/1951-bulk-device-rm
Add ability to remove multiple devices in one command
2020-07-30 19:19:56 +00:00
47e9d39c6f device rm: Add ability to remove multiple devices in one command
Change-type: minor
2020-07-30 10:31:48 -06:00
0eb4e6d770 v12.9.9 2020-07-30 17:31:34 +03:00
492b877d02 Merge pull request #1967 from balena-io/convert-build
Convert command `build` to typescript, oclif, and refactor
2020-07-30 14:27:36 +00:00
09b8cc495c Convert command build to typescript, oclif, and refactor
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-30 15:53:55 +02:00
94cc84e5ce v12.9.8 2020-07-30 16:04:09 +03:00
cd3fa4521c Merge pull request #1968 from balena-io/tests-reliability
Tests: improve reliability of os/configure.spec.ts
2020-07-30 13:02:04 +00:00
5d7d687d6c Tests: improve reliability of os/configure.spec.ts
Change-type: patch
2020-07-30 13:24:41 +01:00
5b39878d54 v12.9.7 2020-07-29 16:10:35 +03:00
2c24d80492 Merge pull request #1960 from balena-io/convert-push
Convert command `push` to oclif
2020-07-29 13:08:26 +00:00
0f058a4441 Convert command push to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-29 10:53:17 +00:00
66f793e327 v12.9.6 2020-07-29 13:52:06 +03:00
60917f641b Merge pull request #1964 from balena-io/convert-config
Convert `config` commands to typescript, oclif
2020-07-29 10:50:16 +00:00
56cc70cd50 Convert config commands to typescript, oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-29 12:11:18 +02:00
fd4c740d29 v12.9.5 2020-07-28 20:22:34 +03:00
644e643fab Merge pull request #1934 from balena-io/bump-preload-v10
Adjustments for balena-preload v10 (SDK v14). Improved error reporting.
2020-07-28 17:20:34 +00:00
f6529eec26 Adjustments for balena-preload v10 (SDK v14). Improved error reporting.
Change-type: patch
2020-07-28 16:12:11 +00:00
401c116820 v12.9.4 2020-07-28 19:08:34 +03:00
4e37ce14c6 Merge pull request #1953 from balena-io/convert-os-build-config
Convert `os build-config` to oclif, typescript
2020-07-28 16:06:36 +00:00
3fc25cd745 Convert os build-config to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-28 15:33:28 +00:00
598423acaa v12.9.3 2020-07-28 18:12:50 +03:00
1685ce16f4 Merge pull request #1954 from balena-io/update-net-keepalive3
Update net-keepalive to v1.3.3, reclaiming ~200MB disk space (npm install)
2020-07-28 15:10:50 +00:00
d4de25e545 Update net-keepalive to v1.3.3, reclaiming ~200MB disk space (npm install)
Change-type: patch
2020-07-28 14:38:26 +00:00
d1f46a59f7 v12.9.2 2020-07-28 17:28:54 +03:00
29854f8737 Merge pull request #1947 from balena-io/rename-devices-beta-new
Rename BETA to NEW in `devices supported -v`
2020-07-28 14:26:37 +00:00
7eb398c6ef devices supported: Rename 'BETA' to 'NEW' in verbose output
Change-type: patch
2020-07-27 20:23:51 +00:00
9ed3bb2f70 os download: Improve warning message re default balenaOS version
Change-type: patch
2020-07-27 20:23:51 +00:00
839de65df2 v12.9.1 2020-07-16 17:41:39 +03:00
b2c680e824 Merge pull request #1948 from balena-io/convert-os-initialize
Convert `os initialize` to oclif, typescript
2020-07-16 14:39:03 +00:00
b7c74598b2 Convert os initialize to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-16 16:06:41 +02:00
7b78a777ac v12.9.0 2020-07-15 21:04:53 +03:00
82026897c7 Merge pull request #1940 from balena-io/update-net-keepalive2
Update net-keepalive and pkg, Node.js >= v10.20.0 (steps towards Node.js v14)
2020-07-15 18:03:07 +00:00
0534ab1cb4 Update INSTALL.md re new minimum Node.js version of 10.20.0
Change-type: patch
2020-07-15 16:30:15 +00:00
a6a8dc822f Update net-keepalive and pkg, Node.js >= v10.20.0 (steps towards Node.js v14)
Change-type: minor
2020-07-15 16:30:15 +00:00
b0dce6b477 Add ability to conditionally apply patches per platform (Linux, Mac, Windows)
Change-type: patch
2020-07-15 16:30:15 +00:00
b9734b7b09 v12.8.0 2020-07-15 18:02:21 +03:00
24ba9da64b Merge pull request #1939 from nwneisen/323-bulk-device-move
balena device: Add ability to move multiple devices in one command
2020-07-15 15:00:33 +00:00
edaf76e329 device move: Add ability to move multiple devices in one command
Change-type: minor
2020-07-15 08:26:31 -06:00
d419ae9183 v12.7.7 2020-07-15 01:19:21 +03:00
3833dc3adc Merge pull request #1941 from balena-io/convert-os-download
Convert `os download` to oclif, typescript
2020-07-14 22:16:13 +00:00
5d3625f6ae Remove os download command dependency for device init
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-14 23:42:39 +02:00
1c17572db0 Convert os download to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-14 23:42:39 +02:00
c65dafd2ff v12.7.6 2020-07-14 18:48:43 +03:00
33fd24b981 Merge pull request #1943 from balena-io/convert-os-versions
Convert `os versions` to oclif, typescript
2020-07-14 15:46:50 +00:00
41635c746b Convert os versions to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-14 17:11:30 +02:00
8c12510f17 v12.7.5 2020-07-13 15:01:52 +03:00
50a658f2f6 Merge pull request #1937 from balena-io/convert-local-config
Convert `local configure` to oclif, typescript
2020-07-13 11:59:58 +00:00
4f831ef443 Convert local configure to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-13 13:10:26 +02:00
457eff1d43 v12.7.4 2020-07-13 13:42:03 +03:00
9e7a13a992 Merge pull request #1935 from nwneisen/1731-improve-ssh-error-message
Give a better error message on "balena ssh" when the keys don't match
2020-07-13 10:40:05 +00:00
d9cf95149a balena ssh: Improve error message in case of misconfigured SSH keys
Change-type: patch
2020-07-12 19:39:49 -06:00
bcc9f9e766 v12.7.3 2020-07-10 22:17:17 +03:00
1ef13665bc Merge pull request #1938 from balena-io/fix-standalone-env-var
Fix env var for standalone executable tests in package.json
2020-07-10 19:15:01 +00:00
da6c048a3b Fix env var for standalone executable tests in package.json
Change-type: patch
2020-07-10 19:10:10 +01:00
3beaa76ec5 v12.7.2 2020-07-10 13:51:11 +03:00
7b4a9a8bc6 Merge pull request #1936 from balena-io/convert-local-flash
Convert `local flash` to oclif
2020-07-10 10:49:14 +00:00
7ebc94c1e5 Convert local flash to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-10 11:55:24 +02:00
92d37ffcb7 v12.7.1 2020-07-10 10:57:14 +03:00
116dc3e623 Merge pull request #1931 from balena-io/nock-unexpected-req-warn
Test cases: Re-add nock checks for unexpected HTTP requests
2020-07-10 07:54:00 +00:00
17a9d71e59 Disable mixpanel.track() calls while running automated tests
Change-type: patch
2020-07-09 19:54:03 +01:00
6fe8fb7c6e Test cases: Re-add nock checks for unexpected HTTP requests
Connects-to: #1910
Change-type: patch
2020-07-09 19:54:03 +01:00
7da7ff6cf0 v12.7.0 2020-07-09 21:43:41 +03:00
48430fcaee Merge pull request #1930 from balena-io/explicitly-select-device-fields
Device: explicitly fetch only the presented fields
2020-07-09 18:41:43 +00:00
477c48f831 Device: Fix the last_seen field not showing up
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-07-09 18:12:13 +00:00
fb9943a375 Device: explicitly fetch only the presented fields
Depends on open-balena adding the mac_address &
the overall_status device fields, but the latest cli
version is probably already not working, since some
of its dependencies already use the v14 SDK which
needs the v6 model, that the open-balena-api doesn't
have yet either.

Change-type: minor
See: https://www.flowdock.com/app/rulemotion/i-cli/threads/SaSXFlJEv-dpk9uUngWY225zv2D
See: https://github.com/balena-io/open-balena-api/issues/388
See: https://github.com/balena-io/open-balena-api/issues/338
See: https://github.com/balena-io/balena-sdk/issues/920
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-07-09 18:12:13 +00:00
00c78dfcd8 v12.6.8 2020-07-09 19:54:11 +03:00
c0ca1500eb Merge pull request #1933 from balena-io/fix-opn-patch
Fix opn patch for some strange edge case
2020-07-09 16:52:09 +00:00
88b7b9273a Fix opn patch for some strange edge case
Change-type: patch
2020-07-09 17:20:31 +01:00
0c3790bc45 v12.6.7 2020-07-09 17:42:21 +03:00
9069cd3d73 Merge pull request #1928 from balena-io/lazier-oclif-actions
Be lazier with imports in oclif actions
2020-07-09 14:40:18 +00:00
d6f1328238 Be lazier with imports in oclif actions
Change-type: patch
2020-07-09 15:03:38 +01:00
463f3f40ca v12.6.6 2020-07-09 15:30:13 +03:00
38fe9042e5 Merge pull request #1929 from balena-io/convert-util
Convert `util available-drives` to oclif
2020-07-09 12:28:09 +00:00
6f265b24aa Convert util available-drives to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-09 13:58:59 +02:00
e2c9bf86c7 v12.6.5 2020-07-09 13:22:52 +03:00
73ba4a1283 Merge pull request #1927 from balena-io/lazy-resin-cli-form
Enforce and improve lazy loading of resin-cli-form
2020-07-09 10:20:56 +00:00
eea8c83bff Enforce and improve lazy loading of resin-cli-form
Change-type: patch
2020-07-09 10:51:10 +01:00
0bd27bd7ac v12.6.4 2020-07-08 20:46:13 +03:00
b15f4de899 Merge pull request #1926 from balena-io/oclif-reduce-lodash
Reduce lodash usage in oclif actions
2020-07-08 17:44:23 +00:00
5242510481 Reduce lodash usage in oclif actions
Change-type: patch
2020-07-08 18:04:28 +01:00
6082771aad v12.6.3 2020-07-08 19:12:51 +03:00
bf8f41d2b4 Merge pull request #1920 from balena-io/clarify-flag-nocache
Clarify -c flag in balena push
2020-07-08 16:10:53 +00:00
b1ab0337c0 Improve help description for --nocache option of balena push
Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
2020-07-08 15:37:08 +00:00
a27536045d v12.6.2 2020-07-08 17:59:12 +03:00
3b56b7b324 Merge pull request #1925 from balena-io/remove-rindle
Remove rindle dependency
2020-07-08 14:57:03 +00:00
11afbf3da2 Remove rindle dependency
Change-type: patch
2020-07-08 15:28:44 +01:00
0da5f822e4 v12.6.1 2020-07-08 12:55:11 +03:00
9c6b6b3718 Merge pull request #1924 from balena-io/preload-dockerd-stderr
preload: Expand dockerd stderr logs in case of errors
2020-07-08 09:53:14 +00:00
3d7833a640 preload: Expand dockerd stderr logs in case of errors
Change-type: patch
2020-07-08 10:13:22 +01:00
4b110fef8e v12.6.0 2020-07-07 03:25:23 +03:00
89e2bb5945 Merge pull request #1921 from balena-io/1844-build-DOCKER_CERT_PATH
build/deploy/preload: Accept DOCKER_CERT_PATH and DOCKER_TLS_VERIFY env vars
2020-07-07 00:23:06 +00:00
f326994f8e build/deploy/preload: Accept DOCKER_CERT_PATH and DOCKER_TLS_VERIFY env vars
This allows the build and deploy commands to work with 'docker-machine'
(the preload command still does not work with docker-machine, though).

Resolves: #1844
Change-type: minor
2020-07-06 23:07:02 +01:00
e80697013e v12.5.2 2020-07-06 14:24:21 +03:00
3a06701747 Merge pull request #1913 from balena-io/alter-runcommand
Modify runCommand to accept args array instead of string
2020-07-06 11:22:00 +00:00
e20265518d Modify runCommand to accept args array instead of string
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-06 12:49:37 +02:00
d4c513fd41 v12.5.1 2020-07-06 13:47:11 +03:00
dec92a3d9c Merge pull request #1906 from balena-io/convert-logs-oclif
Convert `logs` command to oclif
2020-07-06 10:45:22 +00:00
4cdaf29348 Convert logs command to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-06 11:46:15 +02:00
7301b9c246 v12.5.0 2020-07-04 01:33:30 +03:00
1accb885a9 Merge pull request #1915 from balena-io/1914-mixed-arch-fleets
config generate, os configure: Add support for mixed arch fleets
2020-07-03 22:31:48 +00:00
497023965f config generate, os configure: Add support for mixed arch fleets
Resolves: #1914
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-07-03 22:03:18 +00:00
95f9443c2a v12.4.0 2020-07-04 01:00:01 +03:00
f677156fe0 Merge pull request #1743 from balena-io/unauthenticated-os-downloads
os download: Allow not logged in users to download images
2020-07-03 21:57:58 +00:00
edeea18b15 os download: Allow not logged in users to download images
This allows unauthenticated users to download
unconfigured images. Balena-pine v11 that started
being user by balena-sdk v13 now support
unauthenticated requests.

Change-type: minor
See: https://github.com/balena-io/balena-cli/pull/1742
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-07-03 21:31:13 +00:00
67d6b59cb9 v12.3.15 2020-07-04 00:29:51 +03:00
9997b29ef7 Merge pull request #1917 from balena-io/publish-fast-boot
Publish '.fast-boot.json' to the npm registry to avoid stale caching
2020-07-03 21:28:02 +00:00
224f721a72 Publish '.fast-boot.json' to the npm registry to avoid stale caching
Change-type: patch
2020-07-03 19:38:05 +01:00
467a923353 v12.3.14 2020-07-03 21:37:21 +03:00
20dec8821f Merge pull request #1910 from balena-io/1896-ssh-tests-2
balena ssh: Add test cases
2020-07-03 18:35:41 +00:00
69e9222703 balena ssh: Add test cases
Connects-to: #1896
Change-type: patch
2020-07-03 18:53:56 +01:00
238e5cb9d2 Update os download help re openBalena support
Change-type: patch
2020-07-03 14:50:17 +01:00
f846ef0c19 v12.3.13 2020-07-03 16:13:32 +03:00
8044bb6079 Merge pull request #1912 from balena-io/add-explicit-dep
Add explicit dependency on balena-settings-storage
2020-07-03 13:11:38 +00:00
afc660762f Add explicit dependency on balena-settings-storage
Change-type: patch
2020-07-02 23:12:38 +00:00
5002017de6 v12.3.12 2020-07-02 23:01:13 +03:00
2ba9f9dfcf Merge pull request #1911 from balena-io/convert-device-init
Fix cross-framework command calls and convert `device init` to oclif
2020-07-02 19:59:37 +00:00
40f643c07f Convert device init to async await and oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-02 20:33:58 +02:00
402e48c8f8 Fix cross-framework nested commands
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-02 20:33:05 +02:00
6f6cb42725 v12.3.11 2020-07-02 19:13:32 +03:00
a3c10ded82 Merge pull request #1907 from balena-io/reduce-bluebird
Remove all module level bluebird usage from eagerly loaded modules
2020-07-02 16:11:18 +00:00
178c3f9154 Remove all module level bluebird usage from eagerly loaded modules
Change-type: patch
2020-07-02 14:00:26 +01:00
a74815c1bb v12.3.10 2020-07-02 15:56:37 +03:00
9dbdf7db38 Merge pull request #1905 from balena-io/async-tunnel
Convert lib/actions-oclif/tunnel to async/await
2020-07-02 12:54:42 +00:00
c35f701190 Convert lib/actions-oclif/tunnel to async/await
Change-type: patch
2020-07-02 11:02:41 +00:00
9e465217b2 v12.3.9 2020-07-02 11:50:21 +03:00
d20beae926 Merge pull request #1909 from balena-io/1896-ssh-tests
balena ssh: Refactor error handling and test cases
2020-07-02 08:48:45 +00:00
2307a15b10 balena ssh: Refactor error handling and test cases
Connects-to: #1896
Change-type: patch
2020-07-02 00:50:32 +01:00
fe5e6a1dae Improve pkg dependency resolution (standalone zip package reliability)
Connects-to: #1896
Change-type: patch
2020-07-02 00:45:54 +01:00
33add41dc7 v12.3.8 2020-07-01 16:36:19 +03:00
099ac8b233 Merge pull request #1904 from balena-io/debug-flag-stack-traces
Enable long stack traces for `--debug` as well as `DEBUG=1`
2020-07-01 13:34:33 +00:00
f6ca5ef397 Enable long stack traces for --debug as well as DEBUG=1
Change-type: patch
2020-07-01 13:03:42 +00:00
15ed67422d v12.3.7 2020-07-01 12:53:32 +03:00
d6695d7278 Merge pull request #1891 from balena-io/convert-tunnel
Convert command `tunnel` to oclif, and fix port map spec issues.
2020-07-01 09:51:39 +00:00
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
35200697de v12.3.6 2020-07-01 02:30:55 +03:00
4fc62017ae Merge pull request #1902 from balena-io/reduce-bluebird
Reduce bluebird usage
2020-06-30 23:28:46 +00:00
303c3af061 Switch from Bluebird.join to native version
Change-type: patch
2020-06-30 23:59:18 +01:00
984d1a3fd6 Switch from new Bluebird to native version
Change-type: patch
2020-06-30 23:59:17 +01:00
ef9c2e9c18 Switch from Bluebird.each to native version
Change-type: patch
2020-06-30 23:59:15 +01:00
d4f288394b Switch from Bluebird.map to native version
Change-type: patch
2020-06-30 23:59:11 +01:00
41a8e1b2a4 v12.3.5 2020-07-01 01:51:46 +03:00
2fc50eecf5 Merge pull request #1901 from balena-io/typed-requires
Add typing info to requires wherever possible
2020-06-30 22:50:03 +00:00
5e94f3f9c9 Add typing info to requires wherever possible
Change-type: patch
2020-06-30 23:21:39 +01:00
3d0a93692f v12.3.4 2020-07-01 01:03:52 +03:00
7987e20775 Merge pull request #1900 from balena-io/update-balena-sdk-deps
Update dependencies still using balena-sdk 10.x
2020-06-30 22:01:58 +00:00
209ea64b82 Update dependencies still using balena-sdk 10.x
Change-type: patch
2020-06-30 22:19:48 +01:00
21c8a38c22 v12.3.3 2020-06-30 18:02:52 +03:00
63e30a025e Merge pull request #1888 from balena-io/generate-oclif-manifest
Generate/include an oclif.manifest.json when packaging
2020-06-30 15:00:30 +00:00
d0a4ff0d6b Generate/include an oclif.manifest.json when packaging
This saves ~220ms for me when running oclif commands

Change-type: patch
2020-06-30 14:02:02 +00:00
c95568b5a4 v12.3.2 2020-06-30 16:36:50 +03:00
a252a550ff Merge pull request #1898 from balena-io/import-lodash
Stop importing specific lodash files
2020-06-30 13:35:11 +00:00
2a3479c7c6 Stop importing specific lodash files
We already import the entirety of lodash so importing the individual
files just adds time to also import the single file versions

Change-type: patch
2020-06-30 13:52:08 +01:00
7f2501439d v12.3.1 2020-06-30 13:43:09 +03:00
137349b2f4 Merge pull request #1895 from balena-io/team-codeowners
CODEOWNERS: Change to use the respective GitHub team
2020-06-30 10:40:49 +00:00
7ee59b56c7 CODEOWNERS: Change to use the respective GitHub team
Change-type: patch
See: https://www.flowdock.com/app/rulemotion/i-cli/threads/x_-7-UeioPW_y2qUFbVlRqDyVCD
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-06-30 10:13:17 +00:00
c5628d0056 v12.3.0 2020-06-30 00:56:03 +03:00
a76d49243c Merge pull request #1894 from balena-io/balena-es-version
Use @balena/es-version to set the desired es version for modules
2020-06-29 21:54:11 +00:00
488d9b901c Use @balena/es-version to set the desired es version for modules
Change-type: minor
2020-06-29 21:25:48 +00:00
812b11db5f v12.2.2 2020-06-29 23:54:25 +03:00
d681dacc6d Merge pull request #1742 from balena-io/update-balena-sdk-13.0.0
Fix left-overs from balena-sdk v13 bump
2020-06-29 20:52:46 +00:00
3207a2922a Prepare for field based retrieval of device overall_status
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-06-29 22:55:17 +03:00
45f131ec93 Drop balena-device-status from the dependencies
Change-type: patch
2020-06-29 22:55:17 +03:00
bd4d836a31 Stop using the removed imageMakerUrl balena-sdk argument
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-06-29 22:55:17 +03:00
a039ec86dd v12.2.1 2020-06-29 22:53:40 +03:00
f9a05fe257 Merge pull request #1892 from balena-io/add-back-mac-address
Add back the device mac_address field
2020-06-29 19:51:41 +00:00
6add63c6ac Add back the device mac_address field
Looks like this was accidentally removed during the
oclif refactor of `balena device`

Change-type: patch
See: https://github.com/balena-io/balena-cli/pull/1871
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-06-29 16:04:37 +03:00
361e54b3bd v12.2.0 2020-06-29 11:55:32 +03:00
0ce035f379 Merge pull request #1890 from balena-io/1870-multi-dockerignore
Add --multi-dockerignore (-m) option to push/build/deploy commands
2020-06-29 08:53:41 +00:00
eaf61d801c Add --multi-dockerignore (-m) option to push/build/deploy commands
Connects-to: #1870
Change-type: minor
2020-06-28 23:55:30 +01:00
4cc4a22af3 v12.1.16 2020-06-26 15:29:05 +03:00
6403e29d76 Merge pull request #1887 from balena-io/expected-errors
Recategorize some errors as expected.
2020-06-26 12:27:10 +00:00
1308b64c67 Recategorize some errors as expected.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-26 13:57:39 +02:00
17089a35c3 v12.1.15 2020-06-26 14:45:30 +03:00
e34dca0e36 Merge pull request #1883 from balena-io/convert-ssh
Convert command ssh to oclif.
2020-06-26 11:43:43 +00:00
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
674dccef21 v12.1.14 2020-06-26 13:27:24 +03:00
5b95a16fe1 Merge pull request #1886 from balena-io/directly-import-strip-tags
Import just strip-tags from common-tags to reduce startup time
2020-06-26 10:25:32 +00:00
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
f47a4ccb2b v12.1.13 2020-06-25 15:29:26 +03:00
ece3c06786 Merge pull request #1885 from balena-io/windows-os-configure
Improve documentation regarding Windows support for `os configure`.
2020-06-25 12:27:07 +00:00
b50fef8cb4 Improve documentation regarding Windows support for os configure.
Change-type: patch
Resolves: #1812
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-25 13:57:47 +02:00
4f7ea7e32a v12.1.12 2020-06-25 02:20:42 +03:00
01c12dd5bf Merge pull request #1881 from balena-io/native-fs-promise
Use native fs promises rather than promisify or mz
2020-06-24 23:17:43 +00:00
b114697cab Use native fs promises rather than promisify or mz
Change-type: patch
2020-06-24 18:13:48 +01:00
14ce4d73b6 v12.1.11 2020-06-24 20:12:41 +03:00
051e1f1331 Merge pull request #1884 from balena-io/cache-scope
Use cacheScope for fast-boot2 to allow caching when globally installed
2020-06-24 17:10:40 +00:00
c054d55456 Use cacheScope for fast-boot2 to allow caching when globally installed
Change-type: patch
2020-06-24 16:43:03 +00:00
133daefe83 v12.1.10 2020-06-24 19:13:43 +03:00
232e9c3fc1 Merge pull request #1877 from balena-io/simplify-exports
Simplify some exports
2020-06-24 16:11:46 +00:00
03eed32f12 Simplify some exports
Change-type: patch
2020-06-24 15:23:53 +00:00
e1d51305b0 v12.1.9 2020-06-24 17:57:44 +03:00
af071beef0 Merge pull request #1635 from balena-io/import-type
Use `import type` where possible to explicitly import only type info
2020-06-24 14:56:02 +00:00
6dce5c1212 Use import type where possible to explicitly import only type info
Change-type: patch
2020-06-24 13:46:27 +00:00
a26c3912d3 v12.1.8 2020-06-24 16:31:24 +03:00
f3d86ab37c Merge pull request #1880 from balena-io/standardize-bluebird
Standardize all references to Bluebird
2020-06-24 13:29:19 +00:00
420a282bea Standardize all references to Bluebird
Change-type: patch
2020-06-24 12:38:09 +00:00
cfbf00f543 v12.1.7 2020-06-24 15:05:43 +03:00
83888210d6 Merge pull request #1803 from balena-io/cache-username
Cache username for a given auth to avoid fetching it every time
2020-06-24 12:04:03 +00:00
2f7dd54e37 Cache username for a given auth to avoid fetching it every time
Change-type: patch
2020-06-24 11:36:43 +00:00
ab9dabaf77 v12.1.6 2020-06-24 14:15:03 +03:00
9e98e7142c Merge pull request #1879 from balena-io/convert-login
Convert commands login, logout, whoami to oclif.
2020-06-24 11:13:10 +00:00
4656f8f11d Make offline device error handling more robust.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-24 12:44:42 +02:00
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
7d2e32777f Convert commands login, logout, whoami to oclif.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-24 12:44:42 +02:00
10120bb97f v12.1.5 2020-06-24 11:39:12 +03:00
98c9469151 Merge pull request #1882 from balena-io/install-unsafe-perm
Update INSTALL.md re supported Node.js versions and '--unsafe-perm'
2020-06-24 08:37:13 +00:00
98c0991fe3 Update INSTALL.md re supported Node.js versions and '--unsafe-perm'
Change-type: patch
2020-06-23 22:48:53 +01:00
f686d3a9bf v12.1.4 2020-06-23 19:19:22 +03:00
8dda8d89d5 Merge pull request #1876 from balena-io/errors-stub
Stub the errors module without needing two export methods
2020-06-23 16:17:31 +00:00
7794158062 Stub the errors module without needing two export methods
Change-type: patch
2020-06-22 17:16:45 +01:00
24d6b7fa38 v12.1.3 2020-06-22 14:52:51 +03:00
f5f0c7b4a7 Merge pull request #1875 from balena-io/multi-dockerignore-warning
Add runtime warning for unused .dockerignore files
2020-06-22 11:51:08 +00:00
11d1a3f5a0 Add runtime warning for unused .dockerignore files
Change-type: patch
2020-06-22 01:14:27 +01:00
2859d16b31 Improve error handling for oclif "missing required arg"
Change-type: patch
2020-06-22 01:14:01 +01:00
70bfe4ce8e v12.1.2 2020-06-19 11:35:33 +03:00
6f4db3176a Merge pull request #1873 from balena-io/convert-device-os-update
Convert device os-update command to oclif
2020-06-19 08:33:48 +00:00
ebb0ec5287 Convert device os-update command to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-19 10:04:39 +02:00
4995e9b642 v12.1.1 2020-06-18 22:35:22 +03:00
795057338f Merge pull request #1871 from balena-io/convert-devices
Convert device commands to oclif
2020-06-18 19:30:57 +00:00
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
907508bce1 v12.1.0 2020-06-17 18:00:03 +03:00
599b897721 Merge pull request #1869 from balena-io/gitignore-option
Add --gitignore (-g) option to push/build/deploy commands for v11 compatibility
2020-06-17 14:57:57 +00:00
146de39b83 Add --gitignore (-g) option to push/build/deploy commands for v11 compatibility
Change-type: minor
2020-06-17 14:18:23 +01:00
a3cab32b4e v12.0.0 2020-06-16 11:02:40 +03:00
d709e06f48 Merge pull request #1867 from balena-io/1770-major-sdk-pkg-proxy
Release CLI v12
2020-06-16 08:00:33 +00:00
98f101643d v12 RELEASE NOTES: see https://git.io/Jf7hz
Full URL: https://github.com/balena-io/balena-cli/wiki/CLI-v12-Release-Notes

Change-type: patch
2020-06-16 00:30:58 +01:00
c619bd4b99 Update 'balena-lint' and apply new prettier rules
Change-type: patch
2020-06-15 23:53:07 +01:00
19c3069b22 Convert 'logs' command to async/await and add tests
Change-type: patch
2020-06-15 23:53:05 +01:00
7e1d58546c Add tests for standalone executable via proxy server
Change-type: patch
2020-06-15 23:53:04 +01:00
2c01f8adee Update 'global-agent' (fix proxy server issues with unauthenticated setup)
Change-type: patch
2020-06-15 23:53:02 +01:00
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
06ab84fd10 Update 'pkg' dependency (improve support for Node v14)
Change-type: patch
2020-06-15 23:52:59 +01:00
a7b78d2ccd Turn v12 feature switch on
See https://github.com/balena-io/balena-cli/issues/1770

Change-type: major
2020-06-15 23:52:58 +01:00
432109060e Update minimum Node.js requirement from v8 to v10
Change-type: major
2020-06-15 23:52:54 +01:00
b32ae4a667 v11.36.0 2020-06-11 20:04:33 +03:00
36e4b3249c Merge pull request #1859 from balena-io/1857-device-mac_address
balena device: Add the mac_address field
2020-06-11 17:02:28 +00:00
41e5fdbe27 balena device: Add the mac_address field
Connects-to: #1857
HQ: https://github.com/balena-io/balena/issues/2195
Depends-on: https://github.com/balena-io/balena-sdk/pull/914
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-06-11 18:54:53 +03:00
6dc0fe10bc v11.35.21 2020-06-11 18:39:32 +03:00
656591fde4 Merge pull request #1864 from balena-io/preconfigure-device-name
config: Allow setting the initialDeviceName when configuring an OS image
2020-06-11 15:37:58 +00:00
d967b942e0 Allow setting the initialDeviceName
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-06-11 16:02:17 +01:00
7e34fdfeeb v11.35.20 2020-06-10 16:07:09 +03:00
995f8a3338 Merge pull request #1863 from balena-io/remove-string-error-handling
Restrict error handler typing
2020-06-10 15:05:39 +02:00
ff282205d5 Restrict error handler typing
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-10 12:37:09 +02:00
be144fafa2 v11.35.19 2020-06-10 09:25:32 +03:00
683037cd2f Merge pull request #1862 from balena-io/fix-balenaexpiredtoken-handling
Fix handling of BalenaExpiredToken error
2020-06-10 08:23:46 +02:00
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
a85c482416 v11.35.18 2020-06-05 22:26:41 +03:00
523d563b4e Merge pull request #1856 from balena-io/default-convert-eol
v12 preparations: Add feature switch for default eol-converson
2020-06-05 19:25:04 +00:00
1569915fae v12 preparations: Add feature switch for default eol-converson
Change-type: patch
Connects-to: #1770
2020-06-05 16:37:44 +01:00
b1552f8e9b v12 preparations: Fix dockerignore tests on Windows
Change-type: patch
2020-06-05 16:35:07 +01:00
f455602c73 v11.35.17 2020-06-02 23:04:51 +03:00
3e97669b3c Merge pull request #1854 from balena-io/convert-devices-publicurl
Convert 'balena devices public-url' commands to oclif
2020-06-02 20:01:40 +00:00
728c4f4296 Convert 'balena device public-url' commands to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-02 19:00:32 +02:00
bf073942f0 v11.35.16 2020-06-02 19:27:43 +03:00
b9290f4859 Merge pull request #1855 from balena-io/1770-build-deploy-logs-nologs
v12 preparations: Add feature switch for build/deploy `--logs` option
2020-06-02 16:25:47 +00:00
626d328194 v12 preparations: Add feature switch for build/deploy --logs option
Connects-to: #1770
Change-type: patch
2020-06-02 16:42:51 +01:00
21dd959344 v11.35.15 2020-06-01 10:47:04 +03:00
5c8d822aee Merge pull request #1853 from balena-io/1770-devices-supported-et-al
v12 preparations: Add feature switches ('devices supported' and others)
2020-06-01 07:45:32 +00:00
2ab8ae1c10 v12 preparations: Add feature switch for project directory validation
Connects-to: #1770
Change-type: patch
2020-05-29 22:03:55 +01:00
fcc13f9476 v12 preparations: Add feature switch for 'balena apps --verbose'
Connects-to: #1770
Change-type: patch
2020-05-29 22:03:39 +01:00
a38b41f339 v12 preparations: Add feature switch for 'devices supported' default columns
Connects-to: #1770
Change-type: patch
2020-05-29 20:06:14 +01:00
2fc0728a09 v12 preparations: Amend test cases for '--nogitignore' option
Connects-to: #1770
Change-type: patch
2020-05-29 20:06:14 +01:00
040c4987fc v11.35.14 2020-05-29 19:59:53 +03:00
254d9c49a4 Merge pull request #1851 from balena-io/envs-all-as-default
v12 preparations: Add feature switch for 'envs --all'
2020-05-29 16:57:00 +00:00
6e5e1c4f5f v12 preparations: Add feature switch for 'envs --all'
Change-type: patch
Connects-to: #1770
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-29 17:39:40 +02:00
d7213e868f v11.35.13 2020-05-29 18:33:19 +03:00
d82b019480 Merge pull request #1852 from balena-io/remove-id-from-tags-output
v12 preparations: Add feature switch to remove id from 'tags' output
2020-05-29 15:31:20 +00:00
1693bd91c0 v12 preparations: Add feature switch to remove id from 'tags' output
Change-type: patch
Connects-to: #1770
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-29 17:07:53 +02:00
e4f605d6ac v11.35.12 2020-05-29 10:03:49 +03:00
fd7e7f57eb Merge pull request #1850 from balena-io/1770-nogitignore-feature-switch
v12 preparations: Add feature switch for '--nogitignore'
2020-05-29 07:02:15 +00:00
1d073af31a v12 preparations: Add feature switch for '--nogitignore'
Connects-to: #1770
Change-type: patch
2020-05-29 01:12:15 +01:00
fcaaec1fff v11.35.11 2020-05-29 02:38:31 +03:00
ac3a688d46 Merge pull request #1841 from balena-io/convert-tags
Convert `tags`, `tag set`, `tag rm` to oclif.
2020-05-28 23:35:47 +00:00
979284b071 Convert tags, tag set, tag rm to oclif.
Change-type: patch
Resolves: #1805
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-28 19:49:23 +02:00
bc4aa6006e v11.35.10 2020-05-27 19:57:29 +03:00
2cad44915b Merge pull request #1845 from balena-io/change-login-message
v12 preparations - Add versionOverride function, change login message
2020-05-27 16:55:44 +00:00
889c7b08cf v12 preparations: Add version switch, update login message.
Change-type: patch
Connects-to: #1770
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-27 18:29:36 +02:00
56a196210d v11.35.9 2020-05-25 20:01:01 +03:00
a23759a1ba Merge pull request #1840 from balena-io/fix-deploy-authorize-token
balena deploy: Fix "access denied" pushing images to registry
2020-05-25 16:59:24 +00:00
ba0024645d balena deploy: Fix "access denied" pushing images to registry
Change-type: patch
2020-05-25 17:10:17 +01:00
3cb184c8af v11.35.8 2020-05-25 18:10:31 +03:00
644d54a113 Merge pull request #1839 from balena-io/fix-lazy-loading
Fix lazy loading in utils/compose
2020-05-25 15:08:32 +00:00
a6f905b71c Fix lazy loading in utils/compose
Change-type: patch
2020-05-25 15:35:03 +01:00
3b426e4a53 v11.35.7 2020-05-25 10:30:29 +03:00
d241523d93 Merge pull request #1838 from balena-io/remove-dns-workaround
Replace windows dns workaround with single lookup
2020-05-25 09:28:26 +02:00
1c354c800b Replace windows dns workaround with single lookup
Change-type: patch
Connects-to: #1518
Resolves: #1727
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-22 12:14:58 +00:00
e5861a708e v11.35.6 2020-05-22 15:13:49 +03:00
6a019af25f Merge pull request #1837 from balena-io/1045-deploy-typescript
Convert selected functions to Typescript and async/await (compose.js)
2020-05-22 13:12:12 +01:00
8522363cd3 Convert selected functions to Typescript and async/await (compose.js)
Connects-to: #1045
Change-type: patch
2020-05-22 00:24:46 +01:00
480228d8f4 Add tests for 'balena deploy'
Connects-to: #1045
Change-type: patch
2020-05-22 00:24:46 +01:00
175413af34 v11.35.5 2020-05-21 14:27:10 +03:00
d1b4560b37 Merge pull request #1834 from balena-io/preserve-file-stats
Fix caching by preserving all file stats when pushing to device or cloud
2020-05-21 07:24:57 -04:00
77f3fa4b6c Fix caching by preserving all file stats when pushing to device or cloud
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-21 12:01:34 +01:00
a21d3fe2d2 v11.35.4 2020-05-19 17:40:08 +03:00
df440f0580 Merge pull request #1827 from balena-io/errors-tests
Add unit tests for errors module
2020-05-19 16:38:18 +02:00
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
d33b7ec585 v11.35.3 2020-05-18 16:31:06 +03:00
08d5a77734 Merge pull request #1826 from balena-io/update-typescript
Update typescript to 3.9
2020-05-18 14:28:26 +01:00
744122b1b8 Update typescript to 3.9
Change-type: patch
2020-05-18 13:32:15 +01:00
c3a8bb3de6 v11.35.2 2020-05-18 13:14:46 +03:00
e50d92727e Merge pull request #1829 from balena-io/1404-1710-web-login
Fix 'balena login' web authorization hanging with Google Chrome
2020-05-18 11:13:03 +01:00
3bb5e495a6 Fix 'balena login' web authorization hanging with Google Chrome
Resolves: #1404
Change-type: patch
2020-05-16 23:32:07 +01:00
803a9070fd Update web page wording for 'balena login' web authorization
Resolves: #1710
Change-type: patch
2020-05-16 00:01:09 +01:00
a84ab793a0 Update balena preload help message (clarify accepted image formats)
Connects-to: #1810
Change-type: patch
2020-05-16 00:00:22 +01:00
81269e92d5 Update pre-commit script error message (automation/check-doc.js)
Change-type: patch
2020-05-15 21:38:23 +01:00
11d5deef4c v11.35.1 2020-05-14 17:58:20 +03:00
c98bc3280d Merge pull request #1823 from balena-io/issue-template
Update GitHub templates for new issues and pull requests
2020-05-14 10:55:21 -04:00
8c2a40cb39 Update GitHub templates for new issues and pull requests
Change-type: patch
2020-05-14 15:25:45 +01:00
2fdd023a64 v11.35.0 2020-05-14 16:19:51 +03:00
aff370e9c3 Merge pull request #1825 from balena-io/1824-app-exists
`app create`: "You already have an application with that name!"
2020-05-14 09:15:18 -04:00
be21c8d43e balena apps: add --verbose option to list application slugs (full app name)
Change-type: minor
2020-05-14 11:15:51 +01:00
5b33826309 balena app create: fix application existence check
Resolves: #1824
Change-type: patch
2020-05-14 11:15:51 +01:00
052c8d138e v11.34.0 2020-05-14 01:18:30 +03:00
d0228f20fd Merge pull request #1813 from balena-io/1032-revisit-gitignore2
Add --nogitignore flag (new treatment of .gitignore and .dockerignore files)
2020-05-13 18:11:26 -04:00
4577d72ead push/build/deploy: add --nogitignore option and update dockerignore filter library
Connects-to: #1032
Connects-to: #1148
Change-type: minor
2020-05-13 22:33:37 +01:00
0dde84ec0b v11.33.4 2020-05-13 01:17:16 +03:00
81b620f55e Merge pull request #1821 from balena-io/1820-avg-antivirus
Re-create standalone zip package (release asset) for Windows
2020-05-12 18:12:07 -04:00
4b056b4d4c Re-create standalone zip package (release asset) for Windows
Change-type: patch
2020-05-12 22:22:23 +01:00
5723e69267 v11.33.3 2020-05-12 11:47:07 +03:00
2d341cac48 Merge pull request #1818 from balena-io/fix-livepush-v3
Fix livepush v3
2020-05-12 09:45:18 +01:00
4e50d08f7b Fix usage of livepush v3 features
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-12 09:24:05 +01:00
aff5cd9b0d v11.33.2 2020-05-12 00:37:55 +03:00
2bb0933a42 Merge pull request #1817 from balena-io/1815-numeric-app-id
Fix 'balena app' (rm, restart, info) with numeric app IDs
2020-05-11 17:35:51 -04:00
8d60cd1f92 Fix 'balena app' (rm, restart, info) with numeric app IDs
Resolves: #1815
Change-type: patch
2020-05-11 19:27:49 +01:00
9756efb539 v11.33.1 2020-05-11 21:02:19 +03:00
61ed6ff69d Merge pull request #1811 from balena-io/update-multibuild
Update resin-multibuild
2020-05-11 18:58:32 +01:00
127560fa65 Update resin-multibuild
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-11 17:55:04 +01:00
2611ea22f9 v11.33.0 2020-05-11 15:38:28 +03:00
d7021a556e Merge pull request #1809 from balena-io/1802-deprecation-policy
Add a deprecation policy
2020-05-11 15:30:30 +03:00
9412a21d40 Add a deprecation policy
Resolves: #1802
Change-type: minor
See: https://app.frontapp.com/open/cnv_7d92qx9
HQ: https://github.com/balena-io/balena/issues/2032
See: https://www.flowdock.com/app/rulemotion/r-product/threads/A6-bJBldfUFnhG9vixTz-DLz9iB
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-05-11 11:12:58 +03:00
f63be0b4cd v11.32.15 2020-05-06 14:12:03 +03:00
c2561938c1 Merge pull request #1806 from balena-io/errors-improvements
Improve presentation of errors, help
2020-05-06 13:09:52 +02:00
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
ee54d638ad v11.32.14 2020-05-04 17:51:13 +03:00
d9b044c1b8 Merge pull request #1804 from balena-io/disable-oclif-ts-node
Disable oclif's ts-node registering when running against built code
2020-05-04 15:47:24 +01:00
dd20a8b00f Disable oclif's ts-node registering when running against built code
Change-type: patch
2020-05-04 15:08:24 +01:00
01147c31a4 v11.32.13 2020-05-04 15:19:27 +03:00
2f6889cca1 Merge pull request #1749 from balena-io/convert-api-key
Convert `balena api-key generate` to oclif
2020-05-04 14:17:23 +02:00
83286e6729 Convert balena api-key generate to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-04 13:50:50 +02:00
97def08ec5 v11.32.12 2020-05-04 13:15:15 +03:00
1a57385626 Merge pull request #1801 from balena-io/sentry-command
Configure the sentry command scope earlier
2020-05-04 11:13:05 +01:00
1301f62981 Configure the sentry command scope earlier
Change-type: patch
2020-05-04 10:04:44 +01:00
6ae337db8a v11.32.11 2020-05-01 19:31:39 +03:00
b84cdd6230 Merge pull request #1799 from balena-io/avoid-unnecessary-api-calls
Avoid unnecessary api calls in `balena build` and `balena deploy`
2020-05-01 17:29:44 +01:00
2f24e591ef Avoid unnecessary api calls in balena build and balena deploy
Change-type: patch
2020-05-01 15:58:44 +01:00
597b894917 v11.32.10 2020-05-01 16:07:04 +03:00
3b53b75626 Merge pull request #1791 from balena-io/errors-refactor
Errors refactor
2020-05-01 15:04:30 +02:00
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
153cdf4bb0 Refactor: use checkLoggedIn() instead of exitIfNotLoggedIn()
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 14:40:37 +02:00
1d9a397f71 v11.32.9 2020-05-01 14:16:11 +03:00
6167c7b8b3 Merge pull request #1797 from balena-io/ts-qemu
Convert qemu.js to typescript
2020-05-01 12:13:44 +01:00
cbcd7694a9 Merge qemu-ts.ts and qemu.ts files 2020-05-01 11:43:45 +01:00
52bece7f17 Convert qemu.js to typescript
Change-type: patch
2020-05-01 11:43:44 +01:00
4f6550e7eb v11.32.8 2020-05-01 12:58:14 +03:00
ec17ed6ef2 Merge pull request #1798 from balena-io/enforce-lazy-loading
Enforce lazy loading via tslint import-blacklist
2020-05-01 10:56:17 +01:00
0df6368ab9 Enforce lazy loading via tslint import-blacklist
Change-type: patch
2020-05-01 09:33:29 +00:00
b5cac122cf v11.32.7 2020-05-01 11:25:23 +03:00
ae75e1396e Merge pull request #1752 from balena-io/convert-app
Convert app commands to oclif
2020-05-01 10:23:17 +02:00
3b519f0258 Convert app commands to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 08:48:58 +02:00
275fa9c16b v11.32.6 2020-05-01 08:26:26 +03:00
a00db0f5d8 Merge pull request #1790 from balena-io/modify-oclif-errors
Improve oclif missing argument/flag errors
2020-05-01 07:24:22 +02:00
2a8eb3a6ed Improve oclif missing argument/flag errors
Change-type: patch
Resolves: #1776
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 06:31:12 +02:00
bcd49e0292 v11.32.5 2020-05-01 07:26:14 +03:00
d8e1cd6597 Merge pull request #1781 from balena-io/modify-oclif-help
Modify oclif help to match balena conventions
2020-05-01 06:24:04 +02:00
52c2b041da Modify oclif help to match balena conventions
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 05:30:35 +02:00
d5d0486c3f v11.32.4 2020-04-30 21:33:54 +03:00
6f51807e8c Merge pull request #1793 from balena-io/js-lib-app-capitano
Convert lib/app-capitano.coffee and gulpfile.coffee to javascript
2020-04-30 19:31:42 +01:00
ab526c9ed8 Convert gulpfile.coffee to javascript
Change-type: patch
2020-04-30 17:58:13 +01:00
14c5b27cdd Convert lib/app-capitano.coffee to javascript
Change-type: patch
2020-04-30 17:57:37 +01:00
ce01ce73b1 v11.32.3 2020-04-30 19:56:04 +03:00
0f6d160b2e Merge pull request #1792 from balena-io/ts-lib-actions-index
Convert lib/actions/index.coffee to typescript
2020-04-30 17:53:29 +01:00
6d7d1956ea Convert lib/actions/index.coffee to typescript
Change-type: patch
2020-04-30 17:04:12 +01:00
692eddf43f v11.32.2 2020-04-30 18:56:15 +03:00
eb5cfecfaf Merge pull request #1771 from balena-io/js-lib-actions-deploy
Convert lib/utils/deploy.coffee to javascript
2020-04-30 16:54:11 +01:00
73d6d7b264 Convert lib/utils/deploy.coffee to javascript
Change-type: patch
2020-04-30 16:11:42 +01:00
14ced9f384 Merge pull request #1772 from balena-io/js-lib-actions-build
Convert lib/actions/build.coffee to javascript
2020-04-30 16:01:16 +01:00
4d8cd1cc46 Convert lib/actions/build.coffee to javascript
Change-type: patch
2020-04-30 15:17:18 +01:00
dbe9a727d5 v11.32.1 2020-04-30 16:49:46 +03:00
8ac65c3800 Merge pull request #1775 from balena-io/check-new-version-before-notify
Only notify of an update if the new version is actually newer
2020-04-30 14:45:25 +01:00
4ae91ef846 Only notify of an update if the new version is actually newer
Change-type: patch
2020-04-30 12:55:39 +00:00
7311cfa755 v11.32.0 2020-04-30 15:50:36 +03:00
a200bf268d Merge pull request #1787 from balena-io/integrate-new-livepush
Integrate livepush v3 and live directives
2020-04-30 14:48:29 +02:00
d398e22c58 Integrate livepush v3 and live directives
Change-type: minor
Resolves: #1784
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-30 12:25:17 +00:00
b51d2fffbb v11.31.28 2020-04-30 15:24:05 +03:00
5fef98bdf8 Merge pull request #1769 from balena-io/js-lib-utils-deploy-legacy
Convert lib/utils/deploy-legacy.coffee to javascript
2020-04-30 13:22:03 +01:00
203ccaf97b Convert lib/utils/deploy-legacy.coffee to javascript
Change-type: patch
2020-04-30 12:50:20 +01:00
a348528ed3 v11.31.27 2020-04-30 14:45:04 +03:00
04c4250fba Merge pull request #1780 from balena-io/js-lib-actions-help
Convert lib/actions/help.coffee to javascript
2020-04-30 12:42:46 +01:00
a97398950e Convert lib/actions/help.coffee to javascript
Change-type: patch
2020-04-30 10:56:48 +00:00
f55376df32 v11.31.26 2020-04-30 13:56:36 +03:00
3f285cc26d Merge pull request #1789 from balena-io/1788-update-qemu
balena build/deploy: Update QEMU version to support newer balenalib images
2020-04-30 06:54:13 -04:00
6d95c5bad5 balena build/deploy: Update QEMU version to support newer balenalib images
Change-type: patch
2020-04-30 10:47:51 +01:00
6b33f95661 v11.31.25 2020-04-30 07:36:33 +03:00
9ab34c2deb Merge pull request #1785 from balena-io/add-debug-flag
Add support for global --debug flag
2020-04-30 06:34:15 +02:00
db247307db Add support for global --debug flag
Change-type: patch
Resolves: #1777
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-29 17:25:05 +02:00
ad0b667bc7 v11.31.24 2020-04-29 18:13:56 +03:00
d98bc9fb06 Merge pull request #1786 from balena-io/1783-images-push-not-iterable
balena deploy: Fix "TypeError: images.push is not iterable"
2020-04-29 16:11:44 +01:00
74cdd80b51 balena deploy: Fix "TypeError: images.push is not iterable"
Change-type: patch
2020-04-29 15:13:51 +01:00
5c39952002 v11.31.23 2020-04-28 15:46:45 +03:00
2874a69d7d Merge pull request #1774 from balena-io/fix-unhandled-promise-rejection
Fix unhandled promise rejection when using `balena deploy`
2020-04-28 13:44:25 +01:00
6ec05e8dcf Fix unhandled promise rejection when using balena deploy
Change-type: patch
2020-04-28 13:22:15 +01:00
6602845202 v11.31.22 2020-04-25 17:36:24 +03:00
e8cd4153c7 Merge pull request #1766 from balena-io/js-lib-actions-device
Convert lib/actions/device.coffee to javascript
2020-04-25 15:34:31 +01:00
0cfa1a0dfb Convert lib/actions/device.coffee to javascript
Change-type: patch
2020-04-25 14:08:30 +00:00
00ce3ab751 v11.31.21 2020-04-25 16:57:15 +03:00
5c1323d583 Merge pull request #1767 from balena-io/add-types
Install types for modules used in javascript to improve type checking
2020-04-25 14:55:03 +01:00
d9f42b888d Install types for modules used in javascript to improve type checking
Change-type: patch
2020-04-25 12:01:05 +01:00
0db8c85fc8 v11.31.20 2020-04-25 02:19:34 +03:00
bc601d07e3 Merge pull request #1762 from balena-io/js-lib-actions-preload
Convert lib/actions/preload.coffee to javascript
2020-04-25 00:16:18 +01:00
e1a91035ae Convert lib/actions/preload.coffee to javascript
Change-type: patch
2020-04-24 22:44:10 +00:00
8dced8afe2 v11.31.19 2020-04-25 01:10:05 +03:00
ffded6736a Merge pull request #1763 from balena-io/js-lib-actions-config
Convert lib/actions/config.coffee to javascript
2020-04-24 23:07:43 +01:00
1a851f552e Convert lib/actions/config.coffee to javascript
Change-type: patch
2020-04-24 21:06:23 +00:00
68b64016ab v11.31.18 2020-04-25 00:01:35 +03:00
edac54ccfe Merge pull request #1756 from balena-io/js-lib-utils-compose
Convert lib/utils/compose.coffee to javascript
2020-04-24 21:59:35 +01:00
560b0abbe7 Convert lib/utils/compose.coffee to javascript
Change-type: patch
2020-04-24 16:17:23 +01:00
b48d238be6 v11.31.17 2020-04-24 18:04:06 +03:00
a10d5b9abe Merge pull request #1764 from balena-io/js-lib-utils-docker-coffee
Convert lib/utils/docker-coffee.coffee to javascript
2020-04-24 16:01:58 +01:00
23f2242e22 Convert lib/utils/docker-coffee.coffee to javascript
Change-type: patch
2020-04-24 15:25:20 +01:00
f8612fd748 v11.31.16 2020-04-24 17:14:18 +03:00
36446ff488 Merge pull request #1761 from balena-io/js-lib-actions-os
Convert lib/actions/os.coffee to javascript
2020-04-24 15:12:13 +01:00
a5ce0436c7 Convert lib/actions/os.coffee to javascript
Change-type: patch
2020-04-24 13:38:34 +01:00
3302e2f639 v11.31.15 2020-04-24 12:57:15 +03:00
c3c1c5fc41 Merge pull request #1755 from balena-io/js-lib-utils-qemu
Convert lib/utils/qemu.coffee to javascript
2020-04-24 10:55:10 +01:00
9f59b6dde5 Convert lib/utils/qemu.coffee to javascript
Change-type: patch
2020-04-24 10:20:15 +01:00
8be56ef092 v11.31.14 2020-04-23 19:35:54 +03:00
e9f8cadb73 Merge pull request #1744 from balena-io/os-update-overall-progress
device os-update: Refactor to use the overall_progress field
2020-04-23 19:34:00 +03:00
3e4f9f9572 device os-update: Refactor to use the overall_progress field
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-04-23 16:10:09 +00:00
f7d4a37060 v11.31.13 2020-04-23 14:48:05 +03:00
d0e268815a Merge pull request #1754 from balena-io/remove-unnecessary-files
Remove unnecessary files
2020-04-23 12:46:07 +01:00
c3454d3abb Remove unnecessary files
Change-type: patch
2020-04-23 11:21:38 +00:00
6b0f645094 v11.31.12 2020-04-23 14:15:45 +03:00
ada7801a0d Merge pull request #1746 from balena-io/js-lib-actions-local-configure
Convert lib/actions/local/configure.coffee to javascript
2020-04-23 12:12:15 +01:00
da5e26f37e Convert lib/actions/local/index.coffee to typescript
Change-type: patch
2020-04-23 11:30:04 +01:00
9447195c26 Convert lib/actions/local/configure.coffee to javascript
Change-type: patch
2020-04-23 11:12:02 +01:00
cd59496f11 Merge pull request #1602 from balena-io/ts-lib-utils-tty
Convert lib/utils/tty to typescript
2020-04-23 10:35:54 +01:00
9fda165d34 Convert lib/utils/tty to typescript
Change-type: patch
2020-04-23 09:42:23 +01:00
fe0ad92b43 v11.31.11 2020-04-22 18:37:33 +03:00
81c5a62380 Merge pull request #1750 from balena-io/npm-files-patches0
Avoid patch-package warning with 'npm install -g --production'
2020-04-22 16:34:57 +01:00
ebdd04ec73 Avoid patch-package warning with 'npm install -g --production'
Change-type: patch
2020-04-22 15:59:38 +01:00
e6264ced7a v11.31.10 2020-04-22 17:07:19 +03:00
247f31a3cc Merge pull request #1666 from balena-io/convert-scan-ts
Convert command `scan` to TypeScript, migrate to oclif
2020-04-22 16:05:29 +02:00
a2b761ec4b Convert command scan to TypeScript, migrate to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-22 11:13:40 +00:00
e3672bc655 v11.31.9 2020-04-22 14:12:25 +03:00
028141c0b0 Merge pull request #1739 from balena-io/1723-update-patch-package
Update patch-package (fix remaining source of seemingly random ENOENT error)
2020-04-22 12:10:14 +01:00
e3c42cf63e Update patch-package (fix remaining source of seemingly random ENOENT error)
Connects-to: #1723
Change-type: patch
2020-04-22 11:42:09 +01:00
0ae138db03 v11.31.8 2020-04-22 13:40:55 +03:00
9350af9ddf Merge pull request #1745 from balena-io/balena-release
Update to balena-release
2020-04-22 11:39:02 +01:00
88e4009e88 Update to balena-release
Change-type: patch
2020-04-21 17:39:25 +01:00
cb7692690d Merge pull request #1740 from balena-io/update-deps
Update dependencies to pick up performance improvements
2020-04-21 16:49:42 +01:00
82e17cea6a Update dependencies to pick up performance improvements
Change-type: patch
2020-04-21 15:42:56 +01:00
9ed363da9e v11.31.7 2020-04-21 12:09:47 +03:00
8aa4bd6173 Merge pull request #1738 from balena-io/update-codeowners
Update codeowners
2020-04-21 11:06:59 +02:00
5f098e7410 Update codeowners
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-21 10:40:11 +02:00
2de33d185a v11.31.6 2020-04-21 10:52:06 +03:00
66b9f5a337 Merge pull request #1736 from balena-io/validation-test-coverage
Add test coverage for validation module
2020-04-21 09:49:47 +02:00
bbcb3a702f Add test coverage for validation module
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-21 09:23:55 +02:00
57d0014e32 v11.31.5 2020-04-20 18:05:13 +03:00
8d9133e6a6 Merge pull request #1734 from balena-io/convert-keys-oclif
convert commands `key`, `keys`, `key add`, `key rm` to oclif.
2020-04-20 17:03:17 +02:00
be82bcfa63 convert commands key, keys, key add, key rm to oclif.
Also:
 - Display keys with `name` instead of `title`.
 - Check for empty key before calling API.

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-20 16:07:39 +02:00
7c9a23451b v11.31.4 2020-04-20 16:17:14 +03:00
1319e0642b Merge pull request #1735 from balena-io/fix-instance-of
Unpin balena-sdk and review 'instanceof' usage
2020-04-20 14:15:19 +01:00
e3b6db25d8 Review CONTRIBUTING.md and add 'instanceof' usage advice
Change-type: patch
2020-04-18 02:50:00 +01:00
655534469a Review 'instanceof' usage with classes of external packages
Change-type: patch
2020-04-18 02:50:00 +01:00
a8b0573699 Unpin balena-sdk (bump balena-sdk to v12.33.0)
Change-type: patch
2020-04-18 02:50:00 +01:00
99963cbb89 v11.31.3 2020-04-17 02:40:26 +03:00
92715c3182 Merge pull request #1732 from balena-io/fix-ssh-app-not-found
Fix balena ssh "Application not found" (pin balena-sdk to v12.30.0)
2020-04-17 00:38:24 +01:00
264c8535b4 Fix balena ssh "Application not found" (pin balena-sdk to v12.30.0)
Change-type: patch
2020-04-17 00:11:33 +01:00
159ee44d7e v11.31.2 2020-04-16 03:39:14 +03:00
7e4b62c28a Merge pull request #1730 from balena-io/1723-update-is-installed-globally
Fix seemingly random ENOENT error (update 'is-installed-globally' dependency)
2020-04-16 01:37:15 +01:00
52b2ba6a30 Fix seemingly random ENOENT error (update 'is-installed-globally' dependency)
Change-type: patch
Resolves: #1723
2020-04-15 18:58:51 +01:00
cc1ba3d84e v11.31.1 2020-04-15 19:46:53 +03:00
01d05fb148 Merge pull request #1729 from balena-io/convert-device-ts
improve input validation for `key`, `key rm`
2020-04-15 18:44:55 +02:00
cff9e50a22 improve input validation for key, key rm
Change-type: patch
Resolves: #1728
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-15 17:08:25 +02:00
eba2e7e4fb v11.31.0 2020-04-15 16:48:28 +03:00
9a9d56b419 Merge pull request #1726 from balena-io/convert-device-ts
Enable CLI upgrade of dev OS versions
2020-04-15 15:46:21 +02:00
320b4864d9 device os-update: allow host OS upgrade with development balenaOS images
also:
fix `device os-update` incorrectly showing 0% progress
convert `device os-update` to use async/await

Change-type: minor
Resolves: #1725
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-15 15:07:10 +02:00
7f79451376 v11.30.17 2020-04-10 00:05:24 +03:00
68fa831843 Merge pull request #1702 from balena-io/convert-join-leave
Convert commands leave, join to oclif.
2020-04-09 23:03:30 +02:00
3aa72dde4c Convert commands join, leave to oclif.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-09 20:50:42 +02:00
f72d78954d v11.30.16 2020-04-07 21:43:29 +03:00
cf87ca95a0 Merge pull request #1695 from balena-io/saintaardvark-patch-1
Minor grammar fix in balena ssh documentation
2020-04-07 11:41:41 -07:00
a50ca78eef Minor grammar fix in balena ssh documentation
Minor grammar fix in balena ssh documentation

Change-type: patch
Signed-off-by: Hugh Brown <hugh@balena.io>
2020-04-07 10:08:24 -07:00
4fe5a10029 v11.30.15 2020-04-03 18:01:50 +03:00
9812239862 Merge pull request #1693 from balena-io/convert-internal
Convert `internal scandevices`, `internal osinit` to typescript & oclif
2020-04-03 17:00:07 +02:00
bc3fe29624 Convert internal scandevices, internal osinit to typescript & oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-03 16:39:39 +02:00
7e2ee7ab93 v11.30.14 2020-04-03 15:46:50 +03:00
f151a208e5 Merge pull request #1692 from balena-io/update-kind-of
Updated dependencies (vulnerability advisory CVE-2019-20149)
2020-04-03 13:44:57 +01:00
292ad89b7e Updated dependencies (vulnerability advisory CVE-2019-20149)
https://nvd.nist.gov/vuln/detail/CVE-2019-20149

Change-type: patch
2020-04-03 13:06:33 +01:00
c062e6e876 v11.30.13 2020-04-02 22:24:40 +03:00
dcb1c11700 Merge pull request #1694 from balena-io/fix-project-validation-deploy
Fix project directory validation for 'balena deploy' with pre-built image
2020-04-02 20:23:02 +01:00
96e28f3d45 Fix project directory validation for 'balena deploy' with pre-built image
Change-type: patch
2020-04-02 19:44:27 +01:00
ff319d67f3 v11.30.12 2020-04-01 17:18:17 +03:00
f14e44a2e8 Merge pull request #1690 from balena-io/remove-code-note
Remove unused code from balena note
2020-04-01 16:16:11 +02:00
9aa6b0bc57 Remove unused code from balena note
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-01 15:07:40 +02:00
cbe12d5be7 v11.30.11 2020-04-01 14:53:30 +03:00
c177f222ba Merge pull request #1691 from balena-io/build-improvements
Small improvements to `balena build`
2020-04-01 13:51:37 +02:00
d2fd1ec80a Check logged in for balena build if application specified
Correct eroneous -f flag in `balena build` help

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-01 12:39:30 +02:00
77873cf919 v11.30.10 2020-03-31 18:55:44 +03:00
07c09c5f89 Merge pull request #1689 from balena-io/add-ssh-tty-option
balena ssh: handle exit codes and add `-t` option (force TTY allocation)
2020-03-31 16:53:51 +01:00
159cb752d1 Add '-t' option to 'balena ssh' to bypass TTY autodetection (force allocation)
Change-type: patch
2020-03-31 14:50:09 +01:00
a74f0413df Handle ssh process exit codes
Change-type: patch
2020-03-31 14:27:30 +01:00
43b1c5c24f v11.30.9 2020-03-31 14:21:28 +03:00
45e7e9cb32 Merge pull request #1677 from balena-io/js-lib-action-local-common
Convert lib/actions/local/common.coffee to javascript
2020-03-31 12:20:00 +01:00
1a71bad8bb Convert lib/actions/local/common.coffee to javascript
Change-type: patch
2020-03-31 11:57:47 +01:00
2d55df4704 v11.30.8 2020-03-31 02:36:18 +03:00
6c0b3a5e53 Merge pull request #1685 from balena-io/1681-fix-ssh-msys
Fix balena ssh to local device (MSYS/Windows and command pipe to service)
2020-03-31 00:34:00 +01:00
3e955f3a91 Update README regarding proxy server support
Change-type: patch
2020-03-30 14:45:16 +01:00
30738d93b0 Fix "the input device is not a TTY" when piping to 'balena ssh' (local device)
Change-type: patch
2020-03-30 14:45:16 +01:00
be76b8adbd Fix 'balena ssh' on MSYS Windows shell ("unexpected end of file")
Resolves: #1681
Change-type: patch
2020-03-30 14:45:16 +01:00
d6a065a230 Delete unused code (ssh.coffee)
Change-type: patch
2020-03-30 14:45:15 +01:00
7b8e86372b v11.30.7 2020-03-30 16:43:29 +03:00
bc15ad6e05 Merge pull request #1678 from balena-io/convert-settings-oclif
Convert commands `settings`, `note` to oclif
2020-03-30 15:41:48 +02:00
fcad35402a Convert command note to oclif
Add oclif support for piped input

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-30 14:47:43 +02:00
49b00e18ae Convert command settings to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-30 14:47:43 +02:00
a6ccd87069 v11.30.6 2020-03-26 15:41:08 +02:00
0c1904fbdb Merge pull request #1680 from balena-io/1679-improve-device-osupdate-help
Clarify `balena device os-update` help re balenaCloud
2020-03-26 14:39:05 +01:00
e5d2661c96 Clarify balena device os-update help re balenaCloud
Change-type: patch
Resolves: #1679
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-26 13:59:12 +01:00
eca3e91512 v11.30.5 2020-03-25 14:57:29 +02:00
eb5ad08649 Merge pull request #1676 from balena-io/js-linting-type-checking
Use balena-lint for javascript linting and add javascript type-checking
2020-03-25 12:55:58 +00:00
b3b22d6399 Use balena-lint for javascript linting and add javascript type-checking
Change-type: patch
2020-03-25 12:12:03 +00:00
217cba819a v11.30.4 2020-03-24 20:57:00 +02:00
c8275b52c3 Merge pull request #1641 from balena-io/improve-events
Improve events
2020-03-24 18:54:55 +00:00
47e85da789 Deduplicate balenaUrl fetching in events
Change-type: patch
2020-03-24 17:35:44 +00:00
c8cade95da v11.30.3 2020-03-24 19:33:02 +02:00
a4de7143b1 Merge pull request #1656 from balena-io/type-check-tests
Add type checking for tests
2020-03-24 17:30:52 +00:00
6574745a23 Preserve symlinks for the sake of the balenaCI worker
Change-type: patch
2020-03-24 16:54:19 +00:00
1ee74df67e Add type checking for tests
Change-type: patch
2020-03-24 16:42:18 +00:00
3e1b10007a v11.30.2 2020-03-24 18:18:18 +02:00
448211e49c Merge pull request #1675 from balena-io/add-oclif-auth-support
Add support for authentication checking to oclif
2020-03-24 17:14:33 +01:00
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
6ec8bcddaa v11.30.1 2020-03-19 21:16:18 +02:00
d138c40ebd Merge pull request #1674 from balena-io/add-oclif-root-support
Add support for `root` property on oclif commands
2020-03-19 20:14:40 +01:00
f24c4a036c Add support for root property on oclif commands
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-19 19:50:17 +01:00
dabe81c31b v11.30.0 2020-03-19 17:14:26 +02:00
c2f0f9a894 Merge pull request #1673 from balena-io/support-oclif-secondary
Add support for primary/secondary oclif commands
2020-03-19 16:12:51 +01:00
46b695cf22 Add support for primary/secondary oclif commands
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-19 15:45:04 +01:00
9b79f79bac v11.29.5 2020-03-19 01:00:58 +02:00
dddfad9dec Merge pull request #1672 from balena-io/installmd-linux-wsl
INSTALL.md: emphasize the standalone zip package recommendation for WSL
2020-03-18 18:58:47 -04:00
0690554a94 INSTALL.md: emphasize the standalone zip package recommendation for WSL
Change-type: patch
2020-03-18 22:35:12 +00:00
62ea7518bc v11.29.4 2020-03-16 19:41:10 +02:00
f30e486562 Merge pull request #1668 from balena-io/native-check
Switch to native type checks
2020-03-16 17:39:13 +00:00
809a5fae25 Switch to native number check
Change-type: patch
2020-03-13 16:15:07 +00:00
eccb1bd9ad Switch to native string check
Change-type: patch
2020-03-13 16:13:21 +00:00
f859d5025a Switch to native Array.isArray instead of aliases
Change-type: patch
2020-03-13 16:09:43 +00:00
18d3ca3413 v11.29.3 2020-03-13 02:37:28 +02:00
a826f16469 Merge pull request #1664 from balena-io/remove-unused-typing
Remove unused typings
2020-03-13 00:35:45 +00:00
505c3ec7d3 Remove unused typings
Change-type: patch
2020-03-13 00:13:49 +00:00
47fa2a6151 v11.29.2 2020-03-13 01:09:53 +02:00
b4b19637f4 Merge pull request #1665 from balena-io/fix-opn-patch
Fix opn patch (npm installation warning)
2020-03-12 19:08:05 -04:00
5f552cf9a8 Fix opn patch (npm installation warning)
Change-type: patch
2020-03-12 22:34:59 +00:00
e42650f433 v11.29.1 2020-03-13 00:16:33 +02:00
731bd909d6 Merge pull request #1663 from balena-io/fix-local-flash
Fix `balena local flash`
2020-03-12 22:14:42 +00:00
2860535c45 Fix balena local flash
Change-type: patch
2020-03-12 21:34:40 +00:00
122b5a0655 v11.29.0 2020-03-12 21:11:52 +02:00
ec66c82d3f Merge pull request #1645 from balena-io/update-deps
Update dependencies
2020-03-12 19:09:58 +00:00
09a59ab03f Remove dependency on inquirer-dynamic-list 2020-03-12 18:03:10 +00:00
3d2e109e7f Update dependencies
Update balena-sdk from 12.26.7 to 12.29.1

Change-type: minor
2020-03-12 18:03:10 +00:00
26803067f1 v11.28.17 2020-03-12 20:01:37 +02:00
7dc3977e82 Merge pull request #1662 from balena-io/1658-remove-old-files-during-standalone-install
Make windows installer remove old files before installation.
2020-03-12 18:59:51 +01:00
10cbf514a2 Make windows installer remove old files before installation.
Change-type: patch
Resolves: #1658
2020-03-12 17:31:43 +01:00
e2114f73d7 v11.28.16 2020-03-12 02:55:02 +02:00
2f448951c9 Merge pull request #1653 from balena-io/1649-build-emulated-tests
Add test case for `build --emulated`
2020-03-11 20:53:18 -04:00
385d3e107b Update CONTRIBUTING.md regarding ./bin/balena-dev and oclif commands
Change-type: patch
2020-03-11 22:16:37 +00:00
d98b2fa72f Update CONTRIBUTING.md regarding Coffeescript to Typescript conversion
Change-type: patch
2020-03-11 22:12:26 +00:00
c6baa7a908 Prevent auto merge of npm-shrinkwrap.json and explain it in CONTRIBUTING.md
Change-type: patch
2020-03-11 22:11:54 +00:00
daa34feeda Add test case for build --emulated
Connects-to: #1649
Change-type: patch
2020-03-11 22:02:01 +00:00
f813dad4d9 v11.28.15 2020-03-11 13:45:11 +02:00
d7633b5f08 Merge pull request #1659 from balena-io/1657-xdg-open-ENOENT
Fix 'balena login' web auth on Linux standalone zip install (xdg-open ENOENT)
2020-03-11 07:43:09 -04:00
f44c2b777f Fix 'balena login' web auth on Linux standalone zip install (xdg-open ENOENT)
Resolves: #1657
Change-type: patch
2020-03-11 01:16:38 +00:00
bcfba693a5 v11.28.14 2020-03-10 16:54:18 +02:00
08f40c0566 Merge pull request #1654 from balena-io/1523-update-sentry
Replace Raven SDK with "new" Sentry "Unified" SDK (fix "CLI prints 'null' and exits")
2020-03-10 11:52:48 -03:00
5a80654305 Avoid Sentry reporting of selected common "expected" errors
Change-type: patch
2020-03-09 12:51:56 +00:00
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
36d3d1256e Don't send the full command line to Sentry.io
Resolves: #703
Change-type: patch
2020-03-09 12:51:56 +00:00
b77cb56cd0 Fix occasionally missed command tracking request (oclif commands)
Change-type: patch
2020-03-09 12:51:56 +00:00
524397fc9b v11.28.13 2020-03-06 17:48:03 +02:00
ec73ee270b Merge pull request #1652 from balena-io/more-correct-livepush-ux
Improve the UX by only printing effective file changes in livepush
2020-03-06 15:46:23 +00:00
b83431c2e0 Improve the UX by only printing effective file changes in livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-03-06 15:17:02 +00:00
40c559322a v11.28.12 2020-03-06 04:56:19 +02:00
2c5cf9dab6 Merge pull request #1651 from balena-io/1649-fix-build-emulated
Fix `build --emulated` on Linux ("exec format error")
2020-03-05 23:54:10 -03:00
ca8272b477 Fix build --emulated on Linux ("exec format error")
Resolves: #1649
Change-type: patch
2020-03-06 01:51:36 +00:00
d6e7359400 v11.28.11 2020-03-02 18:47:38 +02:00
af8d7283a5 Merge pull request #1644 from balena-io/skip-proxy-on-no-config
Don't try to setup a proxy agent when there's no proxy configured
2020-03-02 16:45:42 +00:00
9470e804c0 Don't ignore BALENARC_NO_PROXY env var if HTTP(S)_PROXY env vars are defined
Change-type: patch
2020-03-02 15:11:02 +00:00
00943463a4 Use types for global-agent and global-tunnel-ng
Change-type: patch
2020-03-02 15:10:58 +00:00
3f6d770233 Remove lodash usage in proxy setup
Change-type: patch
2020-03-02 15:05:15 +00:00
c4a6086e9c Don't try to setup a proxy agent when there's no proxy configured
Change-type: patch
2020-03-02 15:04:52 +00:00
4e61c00255 v11.28.10 2020-03-02 17:01:29 +02:00
1713988e94 Merge pull request #1643 from balena-io/update-deps
Update dependencies
2020-03-02 14:59:33 +00:00
fe4e1d09d7 Update dependencies
Update balena-sdk from 12.21.1 to 12.26.7

Change-type: patch
2020-03-02 11:20:20 +00:00
766695ceef v11.28.9 2020-03-02 10:30:58 +02:00
e50a3270ba Merge pull request #1642 from balena-io/object-spread
Switch to object spreading in favor of _.assign
2020-03-02 08:29:17 +00:00
235c13bea9 Switch to object spreading in favor of _.assign
Change-type: patch
2020-02-29 22:08:10 +00:00
62e4930e5b v11.28.8 2020-02-29 02:17:58 +02:00
fb321b8c5b Merge pull request #1640 from balena-io/lazy-load-chalk
Lazy-load chalk
2020-02-29 00:16:03 +00:00
98152c0b09 Lazy-load chalk
Change-type: patch
2020-02-28 18:34:54 +00:00
0ab0e417b8 v11.28.7 2020-02-28 18:06:18 +02:00
3642943896 Merge pull request #1638 from balena-io/lazy-load-visuals
Simplify lazy-loading of resin-cli-visuals with a shared function
2020-02-28 16:04:30 +00:00
7c62e34455 Simplify lazy-loading of resin-cli-visuals with a shared function
This also avoids current unnecessary requiring of resin-cli-visuals
for every command

Change-type: patch
2020-02-28 15:29:07 +00:00
86af954f3b v11.28.6 2020-02-28 17:26:48 +02:00
0c7947e185 Merge pull request #1639 from balena-io/use-capitano-promise-support
Make use of capitano's promise support to simplify the code
2020-02-28 15:24:53 +00:00
48b281d7c6 Make use of capitano's promise support to simplify the code
Change-type: patch
2020-02-28 13:27:07 +00:00
8598223b61 v11.28.5 2020-02-28 02:14:29 +02:00
cdd67e25f0 Merge pull request #1636 from balena-io/simpler-lazy-load
Simplify lazy-loading of balena-sdk
2020-02-28 00:12:41 +00:00
eac6bb5e5c Simplify lazy-loading of balena-sdk by utilizing a shared function
This also avoids instantiating multiple balena-sdk

Change-type: patch
2020-02-27 17:17:36 +00:00
077d1db9b7 v11.28.4 2020-02-25 22:48:49 +02:00
d86f213b68 Merge pull request #1628 from balena-io/1624-transpose-specified-dockerfile
Fix build/deploy commands with QEMU emulation and alternative Dockerfile
2020-02-25 17:47:13 -03:00
cdfd1d124b Fix build/deploy commands with QEMU emulation and alternative Dockerfile name
Resolves: #1624
Change-type: patch
2020-02-25 16:42:12 -03:00
28c00696b8 Fix CONTRIBUTING markdown
Change-type: patch
2020-02-24 22:11:31 -03:00
dec570a6e2 v11.28.3 2020-02-24 17:43:44 +02:00
9067558d18 Merge pull request #1626 from balena-io/update-type-deps
Update type deps
2020-02-24 15:41:43 +00:00
4abdd71ce7 Update type deps
Change-type: patch
2020-02-24 14:15:48 +00:00
36f2f491b3 v11.28.2 2020-02-22 00:05:12 +02:00
5e750b33c3 Merge pull request #1623 from balena-io/check-cli-markdown-timestamp
Add pre-commit check for cli.markdown updates and coffeelint execution
2020-02-21 22:02:28 +00:00
03053e125f Add pre-commit check for cli.markdown updates and coffeelint execution
These checks compare the timestamps of cli.markdown with those of staged files,
effectively enforcing that 'npm run build' or 'npm test' are executed.

Change-type: patch
2020-02-21 18:22:48 -03:00
bdc7c0fa39 Fix 'test:fast' npm script definition
Change-type: patch
2020-02-21 18:22:48 -03:00
ad4981328f v11.28.1 2020-02-21 15:40:29 +02:00
3f35d6fde6 Merge pull request #1622 from balena-io/add-nested-changelogs-script
Add a script to automate nested changelogs
2020-02-21 15:38:45 +02:00
f2be811e18 Add a script to automate nested changelogs
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-02-21 15:18:17 +02:00
6439aa5552 v11.28.0 2020-02-20 05:01:08 +02:00
977fadab69 Merge pull request #1625 from balena-io/additional-template-vars
Update resin-multibuild and add app and release template vars
2020-02-20 09:57:54 +07:00
95c93d24da Update resin-multibuild and add app and release template vars
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-02-18 10:21:12 +07:00
278d7fd02c v11.27.0 2020-02-17 17:51:58 +02:00
59b9429570 Merge pull request #1571 from balena-io/1421-validate-project-dir
Add project directory validation for balena push / build / deploy
2020-02-17 15:50:03 +00:00
9e870b08a7 Add tests for project directory validation
Change-type: patch
2020-02-17 15:19:07 +00:00
671dca8287 Add project directory validation for balena push / build / deploy commands
Change-type: minor
2020-02-17 15:19:07 +00:00
a15060e9fc Refactor 'balena push' error handling
Change-type: patch
2020-02-17 15:19:07 +00:00
0738dd1520 Add and refactor tests for push/build/deploy commands (docker-compose)
Change-type: patch
2020-02-17 15:19:07 +00:00
5dbace353d v11.26.0 2020-02-14 17:26:58 +02:00
e773549297 Merge pull request #1617 from balena-io/1616-deploy-cachefrom
Add '--cachefrom' option to balena build/deploy commands
2020-02-14 15:25:25 +00:00
a1c406a479 Add '--cache-from' option to balena build and deploy commands
It implements the same feature as the "docker build --cache-from" option.

Resolves: #1616
Change-type: minor
2020-02-13 18:43:15 +00:00
5e196b8f63 v11.25.18 2020-02-13 19:32:57 +02:00
054e59c6af Merge pull request #1615 from balena-io/1611-replace-mmmagic
Fix balena push "Segmentation fault" on Windows (replace 'mmmagic' with 'isBinaryFile')
2020-02-13 17:31:18 +00:00
88a1e413a3 Fix balena push "Segmentation fault" on Windows (replace 'mmmagic' with 'isBinaryFile')
Connects-to: #1611
Change-type: patch
2020-02-13 15:51:45 +00:00
1a74dcf4cf Re-add windows-crlf.sh to git index (fix git warnings) 2020-02-12 17:34:17 +00:00
d48672fa93 v11.25.17 2020-02-12 19:01:59 +02:00
9a7fcfffe8 Merge pull request #1601 from balena-io/ts-lib-actions-auth
Convert lib/actions/auth to typescript
2020-02-12 17:00:07 +00:00
f9ece2ce7d Convert lib/actions/auth to typescript
Change-type: patch
2020-02-12 14:26:32 +00:00
9d04e616a8 v11.25.16 2020-02-12 15:57:18 +02:00
b8c7f23443 Merge pull request #1600 from balena-io/ts-lib-auth-index
Convert lib/auth/index to typescript
2020-02-12 13:55:27 +00:00
2b04763ac0 Convert lib/auth/index to typescript
Change-type: patch
2020-02-12 13:20:36 +00:00
bff845a0e4 v11.25.15 2020-02-12 15:01:04 +02:00
5076ca7532 Merge pull request #1598 from balena-io/ts-lib-auth-server
Convert lib/auth/server to typescript
2020-02-12 12:59:07 +00:00
93ba5832d8 Convert lib/auth/server to typescript
Change-type: patch
2020-02-12 12:10:12 +00:00
af86ac73e6 v11.25.14 2020-02-12 13:56:18 +02:00
173a48eede Merge pull request #1613 from balena-io/ts-lib-actions-keys
Convert lib/actions/keys to typescript
2020-02-12 11:54:41 +00:00
a4b34c109d Convert lib/actions/keys to typescript
Change-type: patch
2020-02-10 22:22:06 +00:00
69714a646b v11.25.13 2020-02-11 00:11:34 +02:00
a41ef3764e Merge pull request #1612 from balena-io/ts-lib-actions-notes
Convert lib/actions/notes to typescript
2020-02-10 22:10:02 +00:00
f1220c6377 Convert lib/actions/notes to typescript
Change-type: patch
2020-02-10 18:31:40 +00:00
cefb3acc1f v11.25.12 2020-02-10 17:53:58 +02:00
277da3ea9c Merge pull request #1594 from balena-io/ts-lib-actions-app
Convert lib/actions/app to typescript
2020-02-10 15:52:25 +00:00
99f84c2f6a Convert lib/actions/app to typescript
Change-type: patch
2020-02-10 15:02:00 +00:00
a9c0899c32 v11.25.11 2020-02-10 16:28:18 +02:00
8d3fb8fef5 Merge pull request #1597 from balena-io/ts-lib-auth-utils
Convert lib/auth/utils to typescript
2020-02-10 14:26:48 +00:00
4de41ce3e0 Convert lib/auth/utils to typescript
Change-type: patch
2020-02-10 13:42:50 +00:00
4b8cec652a v11.25.10 2020-02-08 02:54:39 +02:00
2dd8e71adc Merge pull request #1608 from balena-io/1607-fix-mmmagic-build
Node 13 compatibility: update ext2fs module
2020-02-08 00:52:47 +00:00
05d478b759 CI builds: revert patch-package upgrade to fix patch errors
This fixes a build error caused by a recent version bump of 'patch-package':
"Patch file found for package execa which is not present at node_modules/qqjs/node_modules/execa"

Change-type: patch
2020-02-08 00:19:05 +00:00
9a7a364776 Node 13 compatibility: upgrade ext2fs module
Change-type: patch
Resolves: #1591
Signed-off-by: Scott Lowe <scott@balena.io>
2020-02-07 22:30:02 +00:00
2cb5e28258 v11.25.9 2020-02-08 00:29:18 +02:00
02e8429155 Merge pull request #1604 from balena-io/gitattributes
Add .gitattributes to check out with the correct line-ending on windows
2020-02-07 22:27:33 +00:00
467afb3de6 Add .gitattributes to check out with the correct line-ending on windows
Change-type: patch
2020-02-07 21:40:48 +00:00
324a406e7f v11.25.8 2020-02-07 23:36:09 +02:00
17bf061853 Merge pull request #1606 from balena-io/faster-tests
Speed up tests
2020-02-07 21:34:27 +00:00
6d543b79ff Merge resin-lint linting and fixing steps into one
Change-type: patch
2020-02-07 19:34:35 +00:00
85aaf77e44 Remove redundant type checking of tests
Change-type: patch
2020-02-07 19:34:35 +00:00
83c5684491 Remove duplicate type checking of automation code
Change-type: patch
2020-02-07 19:34:35 +00:00
6bc4fbb750 v11.25.7 2020-02-07 21:32:58 +02:00
1da96a0eb0 Merge pull request #1609 from balena-io/1607-fix-pkg-magic
Fix Windows standalone zip installer ("could not load any valid magic files")
2020-02-07 19:31:02 +00:00
be209f1626 Fix Windows standalone zip installer (missing mmmagic db for CRLF conversion)
Change-type: patch
2020-02-07 18:19:10 +00:00
654d1dcff8 v11.25.6 2020-02-07 13:21:48 +02:00
0a03e79d9d Merge pull request #1599 from balena-io/opn-to-open
Switch from opn to its new name of open
2020-02-07 11:20:00 +00:00
3f84045127 Switch from opn to its new name of open
Change-type: patch
2020-02-06 19:55:22 +00:00
544f8fb4bd v11.25.5 2020-02-06 20:50:18 +02:00
76997c99dc Merge pull request #1605 from balena-io/powershell-debug
Add debug instructions for powershell
2020-02-06 18:48:29 +00:00
f4525bc11e Add debug instructions for powershell
Change-type: patch
2020-02-06 18:24:53 +00:00
f732c5bf5d v11.25.4 2020-02-06 19:58:38 +02:00
2bc3348aff Merge pull request #1595 from balena-io/resin-lint-autofix
Use resin-lint for automatic lint fixing
2020-02-06 17:56:35 +00:00
895be0be5d Use resin-lint for automatic lint fixing
Change-type: patch
2020-02-06 17:29:23 +00:00
0f17129c2e v11.25.3 2020-02-06 19:25:49 +02:00
9005affe64 Merge pull request #1603 from balena-io/1591-1596-mmmagic-linux
Fix "could not load any valid magic files"
2020-02-06 17:24:10 +00:00
4502f2a203 Avoid loading 'mmmagic' on Linux (fix "could not load any valid magic files")
Resolves: #1596
Change-type: patch
2020-02-05 23:59:11 +00:00
da3c11533c v11.25.2 2020-02-05 05:14:59 +02:00
6acff945ef Merge pull request #1586 from balena-io/disable-debug-mode-with-zero-or-empty
Debug mode can now be disabled with DEBUG=0 env var
2020-02-05 12:13:22 +09:00
b3948d538c Debug mode can now be disabled with DEBUG=0 env var
Added assignment to `process.env.DEBUG` if `process.env.DEBUG` is negative string to `lib/app.ts` and `automation/run.ts` entrypoints

Resolves: #1502
Change-type: patch
Signed-off-by: Thomas Manning <thomasm@balena.io>
2020-02-05 11:17:12 +09:00
f53a69feb1 v11.25.1 2020-02-04 12:33:13 +02:00
405b92114d Merge pull request #1590 from balena-io/remove-unnecessary-code
Remove unnecessary code now that typescript understands `process.exit`
2020-02-04 10:31:23 +00:00
27e1f3f7d7 Remove unnecessary code now that typescript understands process.exit
Change-type: patch
2020-02-03 13:06:23 +00:00
1417875110 v11.25.0 2020-02-03 10:23:28 +02:00
f58a49d6c3 Merge pull request #1583 from balena-io/1273-convert-crlf-on-push
Convert CRLF on push
2020-02-03 09:21:53 +01:00
f9743b269a Add more tests for push/build/deploy commands (--convert-eol)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-02-02 20:16:57 +00:00
0f5f65e0d3 Add more tests for push/build/deploy commands (--dockerfile)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-02-02 20:16:43 +00:00
58e7880f1d Add support for auto-conversion of CRLF line endings.
Applies to commands:
 balena push
 balena build
 balena deploy --build

Change-type: minor
Resolves: #1273
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-31 16:27:22 +01:00
041823189f Add support for deferred log messages.
eg. so that info can be output at the end of the process.

Change-type: patch
Connects-to: #1273
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-31 11:26:54 +01:00
38194e6175 v11.24.0 2020-01-31 01:42:39 +02:00
c04e9665ad Merge pull request #1582 from balena-io/1579-global-agent-proxy
Fix proxy support and add proxy exclusion feature (Node.js >= 10.16.0)
2020-01-30 23:41:06 +00:00
1e37c97ffb Fix proxy support and add proxy exclusion feature (Node.js >= 10.16.0 only)
See README for more details on proxy configuration and Node.js compatibility.

Resolves: #1579
Resolves: #1335
Connects-to: #1580
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-27 12:11:11 +00:00
913f09924a Update Github's templates for new CLI pull requests and issues
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-27 12:11:11 +00:00
ceb47e9969 v11.23.0 2020-01-27 13:12:47 +02:00
305755549e Merge pull request #1581 from balena-io/update-deps
Update dependencies
2020-01-27 11:11:02 +00:00
77931b314a Update dependencies
Change-type: minor
2020-01-24 23:28:15 +00:00
b38b5b0b61 v11.22.0 2020-01-21 23:45:41 +02:00
5cf407b483 Merge pull request #1576 from balena-io/add-gsm-configuration-action
configure: Allow passing system-connection files to `os configure` command
2020-01-21 21:44:07 +00:00
8f6902f4cb configure: Allow passing system-connection files to 'os configure' command
Allow passing files to `os configure` via `--system-connection` to allow
pre-configuration of network connections, such as cellular/GSM.

Change-type: minor
Connects-to: #957
Connects-to: #1162
Connects-to: #1498
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-01-21 21:05:23 +00:00
751f67e997 v11.21.8 2020-01-21 13:06:33 +02:00
be1a260af6 Merge pull request #1572 from balena-io/add-tests-push-build-deploy
Add test cases for the push, build and deploy commands
2020-01-21 06:04:40 -05:00
9db6961a7e Add catch-uncommitted to balena CI build
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-20 23:25:24 +00:00
b978230f9e Update resin-lint and prettier, and re-prettify
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-20 22:46:32 +00:00
cc5fe60a15 Add tests for push, deploy and build commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-20 13:27:52 +00:00
bbea58a9c8 v11.21.7 2020-01-20 13:26:30 +02:00
56e35f6e9f Merge pull request #1558 from balena-io/1445-multicontainer-push-fix
Prevent file ignorer from ignoring Dockerfile, docker-compose.yml
2020-01-20 12:24:36 +01:00
95b5ac1c7f Prevent file ignorer from ignoring Dockerfile (and variants), docker-compose.yml
Change-type: patch
Resolves: #1445
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-20 11:59:04 +01:00
df3e1f1886 v11.21.6 2020-01-20 05:22:14 +02:00
5d34659991 Merge pull request #1563 from balena-io/1562-scan-windows-bonjour
Add Windows-specific hint to 'balena scan' output
2020-01-19 19:20:25 -08:00
aca794b267 Add Windows-specific hint to 'balena scan' output
An extra Windows-specific message is now appended to the 'Could not find any balenaOS devices' message - if the OS is Windows.

Also updated the INSTALL instructions with details of the dependency on Bonjour.

Change-type: patch
Signed-off-by: Graham McCulloch <graham@balena.io>
2020-01-20 07:21:04 +07:00
cd6072ac73 v11.21.5 2020-01-15 13:37:57 +02:00
bda696ad8c Merge pull request #1569 from balena-io/apps-git_repository-to-slug
Change the balena app action to present the slug instead of the git_repository
2020-01-15 13:36:18 +02:00
ef4ee54a00 Change the balena app action to present the slug instead of the git_repository
The `git_repository` field was replaced in the v5
endpoint with the `slug` field. As a result the CLI atm
never shows the `git_repository` in the printed
visual.


Change-type: patch
2020-01-15 01:53:48 +02:00
a2ca8e8f73 v11.21.4 2020-01-14 22:16:39 +02:00
620a0abf31 Merge pull request #1559 from balena-io/1557-ssh-hangs-windows
Fix join and leave commands on Windows (hanging on stdin and argument escaping)
2020-01-14 15:15:07 -05:00
95561864a6 Fix 'balena join' when the user is not logged in
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 19:34:53 +00:00
51adfeaa3b Fix join and leave commands on Windows (hanging on stdin and argument escaping)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 19:34:53 +00:00
76447a2177 v11.21.3 2020-01-14 21:32:33 +02:00
a6153869e5 Merge pull request #1556 from balena-io/1182-push-hangs-windows
Fix 'balena push' hanging on Windows
2020-01-14 14:30:43 -05:00
3466be1992 Increase default mocha test timeout to avoid spurious CI failures
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 17:12:17 +00:00
95843dd816 Fix 'balena push' hanging on Windows (CTRL-C was required after the unicorn)
Resolves: #1182
Resolves: #1554
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:09 +00:00
edd755d41c Add hint about the 'jq' utility in the documentation of the --json option
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:09 +00:00
290c06074a Add '.nyc_output' folder to '.gitignore' (test coverage reporting)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:08 +00:00
dd7d9d1570 v11.21.2 2020-01-14 18:05:30 +02:00
c4829153fc Merge pull request #1561 from balena-io/contributing-npm-install
Update CONTRIBUTING.md regarding npm installation and some common gotchas
2020-01-14 11:03:52 -05:00
615f24edd3 Update CONTRIBUTING.md regarding npm installation and some common gotchas
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 14:47:15 +00:00
a94e6d550e v11.21.1 2020-01-14 02:19:39 +02:00
75044030cf Merge pull request #1555 from balena-io/american-british
meta: Americanize all spellings
2020-01-13 19:18:22 -05:00
046743071d meta: Americanize all spellings
Connects-to: https://github.com/balena-io/docs/issues/1300
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2020-01-03 13:42:34 -05:00
4e95cb0cca v11.21.0 2019-12-27 14:32:41 +02:00
4666019c84 Merge pull request #1553 from balena-io/467-supported-aliases
Add --verbose and --json options to the 'devices supported' command
2019-12-27 12:31:02 +00:00
323c9191b6 Add --verbose and --json options to the 'devices supported' command
The command was also converted to oclif.

Resolves: #467
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-27 11:54:27 +00:00
024bf2996b v11.20.2 2019-12-17 16:55:00 +02:00
5210d474a9 Merge pull request #1538 from balena-io/update-livepush
Update livepush to fix windows path issue.
2019-12-17 15:53:06 +01:00
3cce8d822c Update livepush to fix windows path issue.
Change-type: patch
Connects-to: https://github.com/balena-io-modules/livepush/issues/55
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-17 15:24:34 +01:00
65250e431e v11.20.1 2019-12-13 11:01:49 +02:00
29cc75598f Merge pull request #1533 from balena-io/1530-fix-missing-app-issues
Fix issues with devices associated with inaccessible applications.
2019-12-13 10:00:25 +01:00
33552724a1 Fix issues with devices associated with inaccessible applications.
Change-type: patch
Resolves: #1530
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-13 09:33:59 +01:00
c88b317143 v11.20.0 2019-12-13 02:54:30 +02:00
658b0a5233 Merge pull request #1529 from balena-io/1153-envs-microservices
Add multicontainer (microservices) support for 'balena env(s)'
2019-12-13 00:52:57 +00:00
7fd436cd91 Add multicontainer (microservices) support for 'balena env rename'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
7c1faa6de0 Add multicontainer (microservices) support for 'balena env rm'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
90e184ea1f Add multicontainer (microservices) support for 'balena env add'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
38920a1c59 Add multicontainer (microservices) support for 'balena envs'
Connects-to: #1153
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
df58ac7673 Add balena envs '-j' option to produce JSON output
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
630d53311a Add logged-in check for balena 'env' commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
b1eda160e8 v11.19.1 2019-12-06 17:14:20 +02:00
a63c766f04 Merge pull request #1525 from balena-io/1518-workaround-windows-dns-bug
Introduce workaround for windows dns issue on local `balena push`
2019-12-06 16:12:54 +01:00
53325b7c05 Introduce workaround that fixes windows dns issue on balena push using .local device names.
Improve error handling in deployToDevice so that versionErrors don't mask other errors.

Resolves:#1518
Change-type:patch
Signed-off-by:Scott Lowe <scott@balena.io>
2019-12-06 15:32:08 +01:00
622c510d65 v11.19.0 2019-12-05 16:37:52 +02:00
890bea549f Merge pull request #1527 from balena-io/mock-balena-api
Introduce balena-mock-api module and use in tests.
2019-12-05 15:36:04 +01:00
bb19903826 Update app/create and device/supported tests to use new api-mock.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-05 15:10:44 +01:00
33210b896b Introduce balena-api-mock module to simplify api mocking.
Upgrade nock to latest.

Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-05 15:10:34 +01:00
c2a0e457c0 v11.18.3 2019-11-21 19:12:40 +02:00
f464597069 Merge pull request #1522 from balena-io/1429-device-move-join
Fix 'balena help join' docs re moving devices between apps on the same server
2019-11-21 17:10:57 +00:00
02dcff5b67 Fix 'balena help join' docs re moving devices between apps on the same server
Resolves: #1429
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-21 15:31:45 +00:00
2f4539b4d1 Merge pull request #1521 from balena-io/598-git-for-windows-console
Add README note regarding Git for Windows console installation choice
2019-11-21 12:00:08 +00:00
6c3429eb0c Add README note regarding Git for Windows console installation choice
Resolves: #598
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-20 23:38:49 +00:00
a8bd5d332a v11.18.2 2019-11-15 14:41:22 +02:00
0462574d8d Merge pull request #1501 from balena-io/1485-filter-discontinued-devices
Hide discontinued device types in `balena devices supported`, `balena app create`.
2019-11-15 13:39:41 +01:00
1325fb8c9a Use helpers version of cleanOutput in tests.
Simplify expect semantics in tests.

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:56 +01:00
cf42dca777 Hide discontinued device types in balena app create.
Add basic tests for `balena app create`

Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:56 +01:00
afd97bd304 Hide discontinued device types in balena devices supported.
Add tests for action.
Convert action to TypeScript.

Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:55 +01:00
45ce442cf2 v11.18.1 2019-11-15 12:18:56 +02:00
e8c5c9e9ef Merge pull request #1514 from balena-io/1511-invalid-containerPort
Fix "Invalid containerPort" error with EXPOSE instructions in local QEMU builds
2019-11-15 10:17:10 +00:00
caac6855da Fix "Invalid containerPort" error with EXPOSE instructions in local QEMU builds
Bump docker-qemu-transpose package to v1.0.2

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-15 09:31:14 +00:00
e379900526 v11.18.0 2019-11-12 23:47:46 +02:00
0bc1e7057f Merge pull request #1507 from balena-io/1504-os-configure
Fix 'os configure --config', and migrate it to oclif + TypeScript
2019-11-12 21:46:07 +00:00
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
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
268bc36843 v11.17.5 2019-11-12 21:14:37 +02:00
8e7eaaae24 Merge pull request #1506 from balena-io/miscellaneous-fixes
Miscellaneous commits (preload docs, long stack traces, exit code, ExpectedError)
2019-11-12 19:12:58 +00:00
b69ba0b617 Improve command usage format consistency in 'balena help' output
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
1bedf937f8 Add Scott (@srlowe) to CODEOWNERS file
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
74a521a271 Set the process exit code to 1 (instead of 0) for unknown commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
6376ac28d5 Fix logged-in check in "logs" and "ssh" commands (async/await usage)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
2222a90884 Enable debug-mode "long stack traces" for Bluebird promises (async code)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
09f04be77d Fix Node.js download link and improve installation instructions
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
636ecaf4e0 Improve help and docs (CLI install dependencies) for the preload command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-09 14:04:50 +00:00
07fa504c78 v11.17.4 2019-11-06 13:08:49 +02:00
5f74023bb8 Merge pull request #1496 from balena-io/support-optional-containers
Support optional containers when pushing to local target
2019-11-06 11:07:15 +00:00
b31e253fa4 Support optional containers when pushing to local target
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-11-06 10:30:28 +00:00
f75f00e4d0 v11.17.3 2019-11-04 14:45:54 +02:00
13deb83517 Merge pull request #1472 from balena-io/fix-cache-usage
Use all available on-device images during local push
2019-11-04 12:43:46 +00:00
62b7d2fd1a Use all available on-device images during local push
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-11-04 10:27:35 +00:00
aa5062ea6f v11.17.2 2019-11-01 18:05:45 +02:00
394f2e0999 Merge pull request #1493 from balena-io/1491-bugfix-no-arguments
Fix warnings when executing CLI without arguments.
2019-11-01 17:03:33 +01:00
4a967b126b Fix warnings when executing CLI without arguments.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-01 16:21:36 +01:00
5f780a0947 v11.17.1 2019-10-29 12:50:40 +02:00
0671ee0bef Merge pull request #1488 from balena-io/fix-undefined-contract
Fix potentialy undefined build task when livepushing
2019-10-29 10:48:43 +00:00
55b2b5a467 Fix potentialy undefined build task when livepushing
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-28 17:50:02 +00:00
f7a4160c3f v11.17.0 2019-10-23 14:03:38 +03:00
294290908b Merge pull request #1484 from balena-io/update-livepush-for-build-args
Update livepush to support build arguments
2019-10-23 12:01:47 +01:00
8ed4f547e0 Update livepush to support build arguments
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-22 13:24:00 +01:00
3393e797d0 v11.16.6 2019-10-22 13:49:34 +03:00
7de059b95e Merge pull request #1480 from balena-io/1479-catalina-warning
Add installation note regarding macOS Catalina (10.15)
2019-10-22 12:47:36 +02:00
c2b0091f86 Add installation note regarding macOS Catalina (10.15)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-22 12:21:25 +02:00
d96ad93e1e v11.16.5 2019-10-22 13:18:17 +03:00
e0373e6f19 Merge pull request #1481 from balena-io/husky-shrinkwrap
Bump livepush and reconcile husky dependency
2019-10-22 12:16:48 +02:00
f50f169ff0 Bump livepush and reconcile husky dependency
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-22 11:01:02 +02:00
eada1ab87e v11.16.4 2019-10-18 04:40:16 +03:00
51d4ffc5d9 Merge pull request #1477 from balena-io/move-check-npm-version
Move npm version check from npm 'preinstall' to git 'pre-commit' hook
2019-10-18 02:38:24 +01:00
59a7b9d12b Move npm version check from npm 'preinstall' to git 'pre-commit' hook
This should allow end users to use npm v6.4.1 that ships with Node 8,
while still requiring CLI developers to use npm v6.9.0 or later.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-18 00:25:23 +01:00
3bb5ca50b2 v11.16.3 2019-10-17 22:38:45 +03:00
353ee4a576 Merge pull request #1476 from balena-io/fix-check-npm-version
Fix npm install (missing automation/check-npm-version.js)
2019-10-17 20:36:54 +01:00
eaffc2574f Fix npm install (missing automation/check-npm-version.js)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-17 19:57:09 +01:00
5142274e9d v11.16.2 2019-10-17 21:36:16 +03:00
a05b592f00 Merge pull request #1475 from balena-io/check-npm-version
Add npm preinstall check for npm version 6.9.0 or later
2019-10-17 19:34:11 +01:00
e7c89cf77c Add npm preinstall check for npm version 6.9.0 or later
Older npm versions cause the npm-shrinkwrap.json file to be incorrectly
updated. This should avoid regression bugs related to issue #1332.
https://github.com/balena-io/balena-cli/issues/1332

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-17 15:43:21 +01:00
09444f0cff v11.16.1 2019-10-17 14:23:47 +03:00
f329acc2ec Merge pull request #1474 from balena-io/re-run-npm-update
Fix shrinkwrap unwanted changes from older npm version
2019-10-17 14:22:05 +03:00
ee3a0cc630 Fix shrinkwrap unwanted changes from older npm version
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-17 13:59:21 +03:00
b40498786a v11.16.0 2019-10-16 23:33:34 +03:00
43f551dd2e Merge pull request #1473 from balena-io/1471-support-private-device-types
Add support for private device types
2019-10-16 23:32:08 +03:00
1f4382bea8 Add support for private device types
Resolves: #1471
Depends-on: https://github.com/balena-io/balena-sdk/pull/761
Depends-on: https://github.com/balena-io-modules/balena-config-json/pull/15
HQ: https://github.com/balena-io/balena/pull/1740
See: https://www.flowdock.com/app/rulemotion/resin-tech/threads/IGXgYQxfnJfGO8rtTMOJ2yUZ1RU
See: https://www.flowdock.com/app/rulemotion/resin-frontend/threads/FNuwNgrDfJGRcsoJI7yJV-bx5DD
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 16:26:19 +03:00
96bc8a829e Fix missing code formatting
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 15:47:05 +03:00
0cdf4d95e5 v11.15.0 2019-10-16 14:13:14 +03:00
a6ac0ee17b Merge pull request #1470 from balena-io/1064-release-tags-by-commit
Support managing tags using release commit hashes
2019-10-16 14:11:40 +03:00
1b943bdf7d Support managing tags using release commit hashes
The sdk version in the shrinkwrap already
supports setting tags by commit hashes and as a
result this already works in the cli as of v11.9.6.
This PR just adds some docs and some extra
handling when the commit param prefix is all
numeric.

Resolves: #1064
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 09:12:17 +03:00
f831bb4645 v11.14.5 2019-10-16 02:19:15 +03:00
82c486b202 Merge pull request #1455 from balena-io/1428-os-initialize
Fix 'os initialize' (auto sudo execution)
2019-10-16 00:17:28 +01:00
02b888f7c1 Fix privilege elevation for standalone zip package on Windows (windosu)
* Add pkgExec internal command
* Patch windosu to be aware of process.pkg and use pkgExec

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
69c97fed09 Remove 'internal sudo' command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
05cb89725e Fix privilege elevation (sudo) for 'os initialize', 'join', 'leave'
* sudo shell arguments required escaping for 'os initialize'
* sudo was not working for standalone zip packages (incorrect
  Node.js path in argv[0])
* Interactive 'join' and 'leave' not working on Windows because
  'windosu' does not capture stderr.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
43ae9b672c v11.14.4 2019-10-14 19:53:05 +03:00
27270dd589 Merge pull request #1469 from balena-io/local-contract-support
Support container contracts when pushing to local devices
2019-10-14 17:51:27 +01:00
0c5ed7adfb Support container contracts when pushing to local devices
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-14 17:18:56 +01:00
4280a3cd4a v11.14.3 2019-10-14 16:55:01 +03:00
b8944ba65c Merge pull request #1467 from balena-io/update-windows-dev-install-instructions
Selected chore commits and docs updates
2019-10-14 14:53:19 +01:00
a8fcd85f1a Update/improve npm install instructions for Windows
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-14 13:34:02 +01:00
cc45d872c7 Update CLI tests to pass with Node 12
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-14 01:27:34 +01:00
e0e76a1aa8 Avoid stack trace and Sentry report if user answers No to confirmation prompts
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-10 16:02:41 +01:00
d9b417e9e5 Sort the output of balena devices supported alphabetically by slug
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-10 16:02:41 +01:00
101a4bc209 Chore: replace typings/intercept-stdout with @types/intercept-stdout
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-10 16:02:41 +01:00
449461afae v11.14.2 2019-10-09 16:22:55 +03:00
1987206b94 Merge pull request #1464 from balena-io/1132-build-windows-docker-qemu
Fix 'balena build --emulated' on Windows (including default docker socket)
2019-10-09 14:21:20 +01:00
7dd33adfd1 Fix 'balena build --emulated' on Windows (including default docker socket)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-09 13:10:49 +01:00
63fe3d41cc v11.14.1 2019-10-04 16:00:33 +03:00
59e4eb5143 Merge pull request #1461 from balena-io/1355-SecretRemovalError-multibuild-script
Bump resin-multibuild to 4.3.1 (fix more cases of SecretRemovalError)
2019-10-04 13:58:47 +01:00
78e627a471 Bump resin-multibuild to 4.3.1 (fix more cases of SecretRemovalError)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-04 12:33:39 +01:00
3adc06d11b v11.14.0 2019-10-03 14:33:52 +03:00
85fc9daa8b Merge pull request #1460 from balena-io/1459-env-rm-config-var
Allow deleting config vars with 'env rm'
2019-10-03 14:32:00 +03:00
d463a2f0e5 Allow deleting config vars with 'env rm'
Resolves: #1459
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-03 13:51:33 +03:00
863eae42c5 v11.13.1 2019-09-30 17:36:18 +03:00
4b373d5ed4 Merge pull request #1452 from balena-io/troubleshooting-ssh-line-wrapping
Update TROUBLESHOOTING doc re 'balena ssh' line wrapping / cursor behavior
2019-09-30 15:34:39 +01:00
4077da1491 Update TROUBLESHOOTING doc re 'balena ssh' line wrapping / cursor behavior
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-30 14:16:10 +01:00
3718473f05 v11.13.0 2019-09-30 15:59:02 +03:00
54bcbb5d91 Merge pull request #1454 from balena-io/1453-api-image-download
Bump balena-sdk to v12.12.0 to stop using image maker endpoints
2019-09-30 15:57:32 +03:00
408f739e2d Bump balena-sdk to v12.12.0 to stop using image maker endpoints
Resolves: #1453
Depends-on: https://github.com/balena-io/balena-sdk/pull/735
Depends-on: https://github.com/balena-io-modules/balena-image-manager/pull/45
HQ: https://github.com/balena-io/balena/issues/1744
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-30 15:36:46 +03:00
f481d5edae v11.12.0 2019-09-25 13:20:45 +03:00
cff81ae86d Merge pull request #1449 from balena-io/1448-mix-rpi-to-armv7-aarch64
Allow mixing armv7 & aarch64 devices in RPi 1 / zero apps
2019-09-25 13:19:08 +03:00
f9d6a0ee72 Allow mixing armv7 & aarch64 devices in RPi 1 / zero apps
Resolves: #1448
HQ: https://github.com/balena-io/balena/issues/1905
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-24 13:22:13 +03:00
9ea999f15f v11.11.3 2019-09-23 11:47:15 +03:00
eac229ab7c Merge pull request #1438 from balena-io/debug-to-stderr
Send all debug output to stderr
2019-09-23 09:45:53 +01:00
7a865b2e15 Send all debug output to stderr
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-19 13:25:40 +01:00
32c588db55 v11.11.2 2019-09-19 13:23:45 +03:00
aa670ad6f1 Merge pull request #1439 from balena-io/roman/mixpanel-token
Use balena analytics project name
2019-09-19 13:22:12 +03:00
c1ba73a2da Use balena analytics project name
It's needed to properly integrate CLI with balena
analytics proxy service.

Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-09-18 18:00:35 +03:00
606b6c88ab v11.11.1 2019-09-18 16:12:54 +03:00
a6f329750c Merge pull request #1414 from balena-io/1391-refactor-oclif
Migrate "env rename" and "envs" to oclif and refactor the preparser
2019-09-18 14:11:14 +01:00
c07b28e694 Migrate 'envs' and 'env rename' commands to oclif
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-18 12:54:31 +01:00
b3bef9e556 Simplify/refactor 'env add' and 'env rm' implementation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-17 17:20:16 +01:00
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
3d89b0c7a1 v11.11.0 2019-09-16 21:59:27 +03:00
90db52db47 Merge pull request #1435 from balena-io/1431-balena-join-compatible-arch
Support `balena join` to applications of compatible architectures
2019-09-16 21:57:07 +03:00
87004621ce Support balena join to applications of compatible architectures
Resolves: #1431
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-16 21:31:07 +03:00
de8089b0bb v11.10.0 2019-09-16 21:13:23 +03:00
ae691391b6 Merge pull request #1434 from balena-io/1433-move-same-arch-apps
Support moving devices to applications of a compatible architecture
2019-09-16 21:11:02 +03:00
a64b36fdb9 Support moving devices to applications of a compatible architecture
Connects-to: #1433
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-16 19:16:51 +03:00
db5c473952 v11.9.7 2019-09-16 10:26:12 +03:00
2b0bff8f16 Merge pull request #1430 from balena-io/add-scrutinizer-config
ci: add scrutinizer config
2019-09-16 09:24:45 +02:00
2e7f606667 ci: add scrutinizer config
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-09-13 15:58:52 +02:00
73e9f801e2 v11.9.6 2019-09-12 15:27:34 +03:00
9a40f20004 Merge pull request #1425 from balena-io/1304-bump-balena-sdk
Update balena-sdk to v12 and mitigate MaxListenersExceededWarning
2019-09-12 13:25:51 +01:00
6631fb5a69 Mitigate "MaxListenersExceededWarning" by reusing Logger instance
The full warning output was:
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-12 01:49:40 +01:00
f76ca1804a Update balena-sdk from 11.18.0 to 12.10.0 (pre-req for #1153 and #1304)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 16:08:30 +01:00
d25ad328f3 v11.9.5 2019-09-11 14:29:15 +03:00
dfbcdc2c1b Merge pull request #1416 from balena-io/1415-warn-emulation
Detect Docker Desktop (Docker for Mac) and warn about architecture emulation
2019-09-11 12:27:30 +01:00
d484c957bb Detect Docker Desktop (Docker for Mac) and warn about architecture emulation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 12:05:07 +01:00
70714b6feb v11.9.4 2019-09-11 13:49:06 +03:00
c9db5fd856 Merge pull request #1423 from balena-io/1419-fix-pkg-target-node
Fix Node.js version errors in standalone package on Windows
2019-09-11 11:47:09 +01:00
d54a709e7c Fix mismatched Node.js version errors in standalone package on Windows
Resolves: #1419
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 01:17:26 +01:00
09f20ecc1c Update etcher-sdk to v2.0.14 (pre-requisite to supporting Node 12)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-10 16:08:07 +01:00
b8b0221ce6 v11.9.3 2019-09-02 03:56:54 +03:00
596d1bdc21 Merge pull request #1410 from balena-io/oclif-mixpanel
Add missing oclif-based commands to mixpanel tracking
2019-09-02 01:55:02 +01:00
fb1dce9dbb Add missing oclif-based commands to mixpanel tracking
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-01 23:42:21 +01:00
fedfb603f6 v11.9.2 2019-08-30 21:00:06 +03:00
8478b95e45 Merge pull request #1405 from balena-io/1359-update-release-descriptions
Deploy scripts: edit GitHub release descriptions given semver ranges
2019-08-30 18:57:33 +01:00
7bb2741a5a Deploy scripts: edit GitHub release descriptions given semver ranges
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-30 18:09:58 +01:00
693a438d42 v11.9.1 2019-08-29 00:59:52 +03:00
2a8e68cec2 Merge pull request #1412 from balena-io/log-tarring
logging: note that tarring is occurring
2019-08-28 23:57:14 +02:00
e3435c66df logging: note that tarring is occurring
As noted in #1411, this tarring can be particularly expensive so cluing
in the user may help alleviate pain

Connects-to: #1411
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-28 20:37:50 +02:00
192b751e57 v11.9.0 2019-08-22 16:33:03 +03:00
d9643eb59e Merge pull request #1403 from balena-io/1355-SecretRemovalError
Fix 'SecretRemovalError' and enable certain emulated builds on a remote device
2019-08-22 14:31:21 +01:00
19c3178062 Enable emulated builds on remote devices running a different OS as the CLI
E.g. "balena build -e -h <IP> -p 2375" with the CLI running on a Mac laptop,
using balenaEngine on an Intel NUC device, building an image for the RPi (ARM
image arch). Previously, QEMU setup by the CLI assumed that docker ran on the
same OS as the CLI (Docker for Mac has built-in binfmt_misc support and does
not require additional setup, but balenaEngine on Linux requires explicit QEMU
setup.)

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-22 13:37:07 +01:00
516fa90a20 Fix SecretRemovalError (balena build) when docker daemon arch != target arch
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-21 22:25:18 +01:00
56aabad8ad v11.8.3 2019-08-20 04:34:24 +03:00
4a80beac35 Merge pull request #1400 from balena-io/1397-fix-build-registry-secrets
Fix failing registry secrets authentication under certain conditions
2019-08-20 02:32:59 +01:00
cdedc58ec1 Fix failing registry secrets authentication under certain conditions
('balena build' and 'balena deploy')

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-19 16:41:59 +01:00
ed084edc48 v11.8.2 2019-08-19 18:29:03 +03:00
b435a0e7ac Merge pull request #1392 from balena-io/ssh-formatting
balena-ssh: add info about remote vs local connections
2019-08-19 17:25:30 +02:00
731db63e78 balena-ssh: add info about remote vs local connections
small formatting fixups

Closes: https://github.com/balena-io/docs/issues/974
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-19 16:14:26 +02:00
2ee2bc8b02 v11.8.1 2019-08-16 09:51:01 +03:00
b4c99dc03a Merge pull request #1398 from balena-io/oclif-args
Fix incorrect arguments passed to oclif bootstrap function
2019-08-16 07:49:09 +01:00
730c09989d Fix incorrect arguments passed to oclif bootstrap function
Adds tests for existing oclif commands to avoid regressions

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-15 18:26:42 +01:00
9e0733a143 v11.8.0 2019-08-13 11:40:19 +03:00
8dd1106a44 Merge pull request #1393 from balena-io/cli-tests
Implement full command testing, beginning with "balena version"
2019-08-13 09:38:32 +01:00
4d389bb6cc Implement full command testing, beginning with "balena version"
This also modifies the core CLI to be fed command programatically, which
is useful for being able to do thing like mock endpoints with tools like
"nock", and provide an easier debugging experience.
The tests utilise a "runCommand" helper that intercepts and captures
stdout/stderr writes and returns them once the command has finished
running. At this point the test implementation can parse the
stdout/stderr logs and assess nock interceptions to determine if the
command ran correctly.
This change also homogenises debug messages to start with `[debug]`,
however this is not strictly enforced by linting rules.

Change-type: minor
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 14:50:41 +01:00
6d6b3cb1a3 v11.7.10 2019-08-12 16:38:49 +03:00
e84482fbbe Merge pull request #1383 from balena-io/1380-env-rm
Improvements to the "env rm" command and oclif migration
2019-08-12 14:36:49 +01:00
f1d9c29786 Fix bug where "env rm" fails silently if an additional arg is present
Fixes #1380

Argument parsing of "env rm" command was improved by migrating it to oclif

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 13:47:31 +01:00
34f4c1f6cc Exit with a warning if "env rm" id value is not an integer
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-09 15:12:30 +01:00
2390ddc02d v11.7.9 2019-08-09 17:08:09 +03:00
70561705e5 Merge pull request #1387 from balena-io/tests-3
Tests part 3: Convert tests to Typescript
2019-08-09 15:06:35 +01:00
05d58d8248 Fix CI instability when building Typescript
The error appears to happen when symlinking typing files and manifests
on case sensitive file systems (like windows) with the error:
```
lib/actions-oclif/env/add.ts(73,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags'. This is likely not portable. A type annotation is necessary.
lib/actions-oclif/version.ts(42,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags.js'. This is likely not portable. A type annotation is necessary.
```

This appears to be reported on the Typescript repo here https://github.com/microsoft/TypeScript/issues/29221
The suggested workaround is to explicitly set the type of the `flags` static
property.

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-09 12:01:46 +01:00
13610ef814 Convert test files to Typescript
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 16:50:50 +01:00
9c49890399 v11.7.8 2019-08-08 18:42:41 +03:00
b9884ec545 Merge pull request #1386 from balena-io/tests-2
Tests part 2: Decaffeinate existing test files
2019-08-08 16:40:35 +01:00
ebd8f348ca Decaffeinate test files
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 13:53:00 +01:00
90c4cbf2ae v11.7.7 2019-08-08 15:45:41 +03:00
987e16cad0 Merge pull request #1385 from balena-io/tests
Tests part 1: Remove mochainon dependency and replace with direct testing dependencies
2019-08-08 13:44:04 +01:00
15dfdc2229 Remove mochainon dependency and replace with direct testing dependencies
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 10:04:32 +01:00
35110e0610 v11.7.6 2019-08-07 12:31:08 +03:00
bf722f61c7 Merge pull request #1382 from balena-io/contributing-doc
Fix incorrect start command in contributing document
2019-08-07 10:29:14 +01:00
08e8151b1f Fix incorrect start command in contributing document
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-07 09:18:00 +01:00
9977451b07 v11.7.5 2019-08-06 12:23:48 +03:00
9f610a521e Merge pull request #1369 from balena-io/headless-remote-builds
Support headless remote builds
2019-08-06 10:22:10 +01:00
67a4e88e44 Support headless remote builds
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-06 08:45:05 +01:00
f0bd2f197d v11.7.4 2019-08-02 00:28:38 +03:00
5fe908bbbf Merge pull request #1375 from balena-io/unzip2-dependency
Update unzip2 dependency
2019-08-01 22:27:09 +01:00
f9fc8fd2e8 Update unzip2 dependency
That dependency has been updated upstream, but not published to npm,
thus we are pulling the latest (0.2.8) version from our own fork.
Fork is created temporarily.

Fixes: #1373
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-08-01 18:35:30 +01:00
9ea5198bda v11.7.3 2019-07-22 16:42:50 +03:00
35732515ac Merge pull request #1362 from balena-io/mixpanel-args
Update mixpanel tracking
2019-07-22 14:41:23 +01:00
3ea905dc68 Update mixpanel tracking
Change-type: patch
2019-07-22 13:42:44 +01:00
062fadfa49 v11.7.2 2019-07-18 17:46:59 +03:00
58983670f1 Merge pull request #1354 from balena-io/update-balena-preload-8.2.1
Update balena-preload to ^8.2.1
2019-07-18 16:45:10 +02:00
18fadf5634 Update balena-preload to ^8.2.1
Change-type: patch
2019-07-18 16:21:33 +02:00
80917b7198 v11.7.1 2019-07-17 23:21:01 +03:00
f21dc3e2f4 Merge pull request #1353 from balena-io/typos-gitter
chore: fix up small typos, remove gitter link
2019-07-17 21:17:32 +01:00
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
cd491a7935 v11.7.0 2019-07-15 19:51:36 +03:00
90269525be Merge pull request #1344 from balena-io/1164-local-secrets
Add build secrets and variables support for push/build/deploy to/on/via balena devices
2019-07-15 17:49:19 +01:00
225408c57d Add "build secrets" and "build variables" support for push/build/deploy
to/on/via balena devices

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 16:23:35 +01:00
8cfacc9cbc Fix truncated logs in local multicontainer image builds (balena build/deploy)
Resolves: #1346
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 16:19:41 +01:00
9a270539c6 v11.6.1 2019-07-15 18:17:55 +03:00
df22d42412 Merge pull request #1351 from balena-io/remove-beta-suffix
Remove BETA suffix from Windows and macOS installers, and update INSTALL.md
2019-07-15 16:15:49 +01:00
49a7eb30c0 Remove BETA suffix from Windows and macOS installers, and update INSTALL.md
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 14:08:27 +01:00
e41ea6fb1a v11.6.0 2019-07-09 18:30:13 +03:00
636ec2a8f2 Merge pull request #1341 from mwohlert/feature/include_sshKeys_in_os_configure
Add support for sshKeys in config file with os configure
2019-07-09 16:28:01 +01:00
9eae9dcee3 Add os.sshKeys to generateBaseConfig
Change-type: minor
2019-07-09 14:01:58 +02:00
6c26e1235c v11.5.0 2019-07-05 17:54:12 +03:00
bacca5383a Merge pull request #1298 from balena-io/integrate-balena-ci
Integrate with balena CI (installer signing)
2019-07-05 15:52:40 +01:00
32e72c832f Add release target in repo.yml
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-07-05 15:16:59 +02:00
05aaed07b2 Patch oclif to use "npx npm@6.9.0 install" if npm is older than 6.9.0
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-04 20:01:08 +01:00
7c750f9e43 balena CI: Add balena-cli executable signing step
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-04 20:01:08 +01:00
55bf4dc0f0 Add 'npm run package' command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-04 20:01:07 +01:00
0afbd6f17a Refactor build:standalone / build:installer / run release
So that:
- Standalone zip files are created in the standalone step,
- oclif installers are renamed in the installer step, and
- npm run release (which is skipped by balena CI) is reduced to
  uploading the files to the GitHub releases page.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-04 20:01:07 +01:00
66b997d98c balena CI integration: Use C:\tmp to avoid 260-char path length limit
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-03 11:56:03 +01:00
d485fd00a0 v11.4.4 2019-07-03 02:18:55 +03:00
3322faeeb2 Merge pull request #1337 from balena-io/include-shrinkwrap-in-published
Add npm-shrinkwrap in package.json so that it gets published to the npm registry
2019-07-03 00:17:09 +01:00
c32d894e97 Add 'patches' to files section of package.json for npm publishing
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-02 21:00:01 +01:00
ad737b8e02 Add npm-shrinkwrap in package.json so that it gets published to the
registry

Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-07-02 19:15:32 +02:00
bcc86fbcb6 v11.4.3 2019-07-01 13:23:47 +03:00
d5c7527f8d Merge pull request #1334 from balena-io/1332-shrinkwrap-web-stream-polyfill
Fix "Error: Cannot find module 'web-streams-polyfill'"
2019-07-01 11:22:09 +01:00
5df65f67c3 Fix "Error: Cannot find module 'web-streams-polyfill'"
Fix npm-shrinkwrap.json produced by npm v6.4.1, by using npm v6.9.0

Resolves: #1332
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-01 11:07:36 +01:00
79e65025cb v11.4.2 2019-07-01 12:15:22 +03:00
dff6dafe85 Merge pull request #1330 from balena-io/upgrade-livepush
Explicitly upgrade livepush version to 2.0.1 to pick up fix
2019-07-01 02:13:33 -07:00
adcc862acb Explicitly upgrade livepush version to 2.0.1 to pick up fix
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-07-01 09:59:07 +01:00
8bf884d425 v11.4.1 2019-06-28 18:55:39 +03:00
a6b282598b Merge pull request #1326 from balena-io/1293-add-npm-shrinkwrap
Add npm-shrinkwrap.json to control dependency updates
2019-06-28 16:54:04 +01:00
77089e31e4 Unpin selected dependencies following addition of npm-shrinkwrap.json
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-28 12:30:56 +01:00
7c6bae491f Add npm-shrinkwrap.json file to control dependency updates
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-28 12:29:50 +01:00
d5586e12d4 v11.4.0 2019-06-27 19:01:52 +03:00
7e1f4791ed Merge pull request #1328 from balena-io/1327-balena-version-options
Add options to `balena version` to show Node.js version
2019-06-27 17:00:14 +01:00
9d5ecb5f9c Add options to 'balena version' to show Node.js version
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-27 16:22:26 +01:00
236dce37da Pin the major Node version used by standalone zip packages to Node 10
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-27 13:10:55 +01:00
a2ee48f2fb v11.3.6 2019-06-27 15:06:08 +03:00
b74a0d1141 Merge pull request #1329 from balena-io/1306-patch-preload-tarfs
Patch 'pkg' package to resolve 'preload' issue in standalone installations
2019-06-27 13:04:19 +01:00
34d7b84d1e Patch 'pkg' package to resolve 'preload' issue in standalone installs
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-27 00:50:35 +01:00
d999b901bb v11.3.5 2019-06-26 15:29:12 +03:00
4a9d133c11 Merge pull request #1325 from balena-io/changelog
Add machine-readable changelog
2019-06-26 13:27:36 +01:00
3a7604368a Add machine-readable changelog
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-06-26 12:24:03 +01:00
df2e611c42 v11.3.4 2019-06-26 14:13:33 +03:00
30e48b658f Merge pull request #1324 from balena-io/1302-fix-ssh-numeric-short-uuid
Fix incorrect parsing of numeric short UUIDs in ssh and tunnel actions
2019-06-26 14:12:08 +03:00
f095ac169a patterns: Add debug logs in the getOnlineTargetUuid resolution
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
f0030a1891 tunnel: Fix incorrect parsing of numeric short UUIDs
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
1d3af3245a ssh: Fix incorrect parsing of numeric short UUIDs
Resolves: #1302
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
f4612116b9 v11.3.3 2019-06-20 19:33:22 +03:00
65ab3008e6 Merge pull request #1318 from balena-io/fix-multiple-image-use-push
Fix using an image more than once in a balena push
2019-06-20 09:31:34 -07:00
36026d8556 Fix using an image more than once in a balena push
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-20 16:46:29 +01:00
436ad60f4e v11.3.2 2019-06-20 18:42:01 +03:00
e0ee333717 Merge pull request #1320 from balena-io/remove-double-printed-log
Remove the livepush initialisation double printed log
2019-06-20 08:40:38 -07:00
3b09c5ac91 Remove the livepush initialisation double printed log
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-20 15:20:19 +01:00
6994499f14 v11.3.1 2019-06-18 15:03:27 +03:00
9e19b5875b Merge pull request #1313 from balena-io/fix-livepush-newline
Fix output of seperation newline during livepush
2019-06-18 05:00:09 -07:00
c3e5147a19 Fix output of seperation newline during livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-18 11:45:12 +01:00
5e46815ac7 v11.3.0 2019-06-18 13:44:55 +03:00
7b37c60e11 Merge pull request #1314 from balena-io/file-based-secrets
If a secrets file is not specified, read it from the data directory
2019-06-18 03:43:03 -07:00
cf9fdbe6e4 If a secrets file is not specified, read it from the data directory
Change-type: minor
Closes: #1164
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-18 11:13:09 +01:00
66dfddc96d v11.2.2 2019-06-16 17:20:25 +03:00
1fa2347608 Merge pull request #1307 from balena-io/1300-issue-template
docs: update GitHub issue template, Node versions and sample Dockerfile
2019-06-16 15:18:42 +01:00
6bed43fe1f docs: update GitHub issue template, required Node version and sample Dockerfile
Resolves: #1300
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-16 01:42:55 +01:00
46806c8377 v11.2.1 2019-06-12 16:00:40 +03:00
cf93438df1 Merge pull request #1305 from balena-io/live-ignore-dev
livepush: Ignore the .git directory when performing a livepush
2019-06-12 05:58:47 -07:00
ea43130135 livepush: Ignore the .git directory when performing a livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-12 12:41:46 +01:00
5e4daf8c3d v11.2.0 2019-06-11 15:53:33 +03:00
20474aeb55 Merge pull request #1143 from balena-io/788-hup
Add device OS update action
2019-06-11 15:51:28 +03:00
825213c02a Add device OS update action
Resolves: #788
Depends-on: https://github.com/balena-io/balena-sdk/pull/638
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-11 15:27:23 +03:00
13cef01374 v11.1.0 2019-06-10 13:38:49 +03:00
7271f90dc6 Merge pull request #1301 from balena-io/cancellable-livepushes
Add cancellable livepushes, when a file changes during a current livepush
2019-06-10 03:36:51 -07:00
8b5ebe0645 Pin prettier and add formatting changes
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-10 11:07:51 +01:00
24e49bf131 Cancel ongoing livepushes when a new change occurs
Also fix livepush logging when a new container is created (previously
the logs of the commands would stop working after this has happened)

Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-07 15:59:27 +01:00
5a0ef354f1 Fix ts-node invocation in balena-dev
Properly pull in the project file, as it exists in a different
directory.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-07 15:02:25 +01:00
f8a9c10a77 v11.0.7 2019-06-07 04:01:30 +03:00
bace8b5c1e Merge pull request #1299 from balena-io/add-missing-doc
Update tunnel documentation after argument changes
2019-06-07 01:59:25 +01:00
d8c942c77e Fix "catch-uncommitted" build failure (npm run prettify)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-07 01:30:32 +01:00
7fccd4a35e Update tunnel documentation after argument changes
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-06 17:56:20 +01:00
b78dd26f23 v11.0.6 2019-06-06 19:41:44 +03:00
47c63e0e1d Merge pull request #1296 from balena-io/fix-tunnel-device-prompt
Add single code path to get full, online-only device UUIDs
2019-06-06 17:38:59 +01:00
5d137f3c20 fix: Add single code path to get full, online-only device UUIDs
Both the tunnel and SSH commands require a full UUID for an online
device. A single code path was added to provide this, taking either
an application name or a partial UUID as a search parameter.

In the event of an application name being provided, a device select
form is presented to the user to pick from the online devices at that
time.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2019-06-06 17:05:08 +01:00
2bbdfda92e v11.0.5 2019-06-06 16:51:58 +03:00
2f2f16267f Merge pull request #1278 from balena-io/resin-cli-form.d.ts
Add initial typings for resin-cli-form
2019-06-06 16:49:53 +03:00
051268168a Add initial typings for resin-cli-form
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-06 16:21:35 +03:00
2b264df41b v11.0.4 2019-06-06 12:45:39 +03:00
eba193278e Merge pull request #1294 from balena-io/docs-scan
Add 'scan' command to the website reference documentation
2019-06-06 10:43:16 +01:00
462b41b4ea Add 'scan' command to the website reference documentation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-05 23:17:59 +01:00
ab5815c277 v11.0.3 2019-06-05 18:38:08 +03:00
f75ffb53f5 Merge pull request #1292 from balena-io/1291-regex-s-flag
Fix 'npm help' SyntaxError on Node 8 (invalid 's' regex flag)
2019-06-05 16:35:08 +01:00
3387f8f656 Fix 'npm help' SyntaxError on Node 8 (invalid 's' regex flag)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-05 16:12:16 +01:00
e8325e8268 v11.0.2 2019-06-05 16:23:27 +03:00
c2491497b5 Merge pull request #1290 from balena-io/1289-fix-patch-package-production
Fix "npm install --production" installation (missing patch-package dependency)
2019-06-05 14:21:27 +01:00
4596005a1f Fix "--production" installation (missing patch-package dependency)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-05 13:42:27 +01:00
8d9cbbb526 v11.0.1 2019-06-04 22:32:52 +03:00
17e51799f5 Merge pull request #1286 from balena-io/fix-travis-release
Fix Travis release
2019-06-04 20:30:13 +01:00
df797cdc2c Fix Travis release
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 20:13:18 +01:00
57fc26c0f7 v11.0.0 2019-06-04 21:17:56 +03:00
abc2cfd14c Merge pull request #1285 from balena-io/release-v11
Release balena-cli v11.0.0
2019-06-04 19:16:16 +01:00
612fefcc65 Merge pull request #1284 from balena-io/1283-remove-signup
Remove 'signup' command
2019-06-04 17:24:52 +01:00
0bbe376e41 Remove 'signup' command
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 17:06:46 +01:00
04223dbc58 Revert bin/balena (previously renamed bin/run for oclif compatibility)
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:38 +01:00
b5c4348de1 balena CI integration: Patch @oclif/dev-cli to install 7zip on demand
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:38 +01:00
751749325f Add warning notices for replaced 'local' commands in v11
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:37 +01:00
1e2e48b149 Revert 'balena flash' to 'balena local flash'
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:37 +01:00
01b454351b Fix SSH'ing into a device from application
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:36 +01:00
6696b1b5f7 Make livepush the default when pushing to a local device
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:36 +01:00
5da307f02e Make the CommandDefinition option parameter a Partial
This ensures that no code accidentally relies on them being present, and
the types are then correct.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
b391c96e64 Allow multiple services to be tailed with balena logs and push
Also correctly type the input.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
0ee73f5164 Don't require a login for commands operating on local devices
Change-type: patch
Closes: #1195
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
1a1861bfcb Remove or move most local namespaced commands
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:34 +01:00
717c43f10b Update the CLI's installation instructions for executable installers
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:34 +01:00
dafbdd5f34 Add native installers for Windows and macOS
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:33 +01:00
c204dbd6cd Bump denymount version and delete redundant patch (chore task)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:59 +01:00
6e7f51758e Add CONTRIBUTING.md and some guidance on commit messages and doc files.
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:59 +01:00
ea89a6f221 Update documentation markdown following v11-meta branch rebase
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:58 +01:00
94c9e13106 Fix windows straight-to-container SSH
Closes: #1211
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:51:58 +01:00
64c2f00d2a Update balena ssh command to support local devices and multicontainer
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:51:57 +01:00
8f8d6b5f08 Sort 'balena help' primary commands in manually specified order
Connects-to: #1140
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:57 +01:00
c49a1d3fbf Remove --dockerPort's -p alias for balena preload
It was conflicting with --pin-device-to-release -p alias

Changelog-entry: Remove --dockerPort's -p alias for `balena preload`
Change-type: major
2019-06-04 13:51:56 +01:00
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
13e3e5e8ea Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4.
Refactor typings folder for use with the tsconfig typeRoots option.

Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:55 +01:00
faa558b432 v10.17.5 2019-06-04 09:10:48 +03:00
4eea5e822b Merge pull request #1282 from balena-io/pin-moment-duration-format
Pin moment-duration-format package (ReferenceError: window is not defined)
2019-06-04 09:08:50 +03:00
fe3e348128 Pin moment-duration-format package (ReferenceError: window is not defined)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 02:47:45 +01:00
7535b7110d v10.17.4 2019-06-03 14:19:41 +03:00
0aaf6dff41 Merge pull request #1277 from balena-io/gitignore-fast-boot
.gitignore: Add fast-boot.json generated by balena-dev command
2019-06-03 14:17:30 +03:00
aca58743ea .gitignore: Add fast-boot.json generated by balena-dev command
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-03 13:57:12 +03:00
f6a262bcde v10.17.3 2019-05-31 17:23:25 +03:00
9cc81866eb Merge pull request #1276 from balena-io/1275-npmrc
Use an .npmrc to prevent creating a package-lock on each install
2019-05-31 17:21:30 +03:00
0607c2f231 Use an .npmrc to prevent creating a package-lock on each install
Resolves: #1275
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-31 16:52:55 +03:00
fe0ba62026 v10.17.2 2019-05-30 18:05:43 +03:00
f2af7b2588 Merge pull request #1269 from balena-io/newline-build-arg
Allow newline characters in build/deploy --buildArg values
2019-05-30 16:03:40 +01:00
e145540132 Allow newline characters in build/deploy --buildArg values
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-30 15:03:56 +01:00
d21b84956c v10.17.1 2019-05-30 16:02:58 +03:00
841ce9fd68 Merge pull request #1270 from balena-io/fix-build-types-mz
Fix CI build error (missing @types/mz)
2019-05-30 14:00:05 +01:00
a4efc7c9c4 Fix CI build error (missing @types/mz)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-30 12:57:03 +01:00
e6ecb0ec0b v10.17.0 2019-05-29 18:05:38 +03:00
c420d0f63c Merge pull request #1262 from balena-io/preload-add-certificate-option
Add preload --add-certificate option
2019-05-29 17:03:24 +02:00
f3ef7f6e18 Add preload --add-certificate option
Change-type: minor
2019-05-28 16:35:29 +02:00
e36435bb4c v10.16.0 2019-05-27 17:38:47 +03:00
825964fdc6 Merge pull request #1258 from balena-io/1070-remove-20-image-limit
compose: remove artificial 20 repo limit
2019-05-27 22:36:26 +08:00
5202e137d5 compose: remove artificial 20 repo limit
This issue has now been fixed server-side

Connects-to: #1070
Change-type: minor
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-27 22:12:58 +08:00
d23d837b8c v10.15.0 2019-05-27 17:06:11 +03:00
8c537c112d Merge pull request #1257 from balena-io/better-livepush-dockerfile-change-restart
Better livepush dockerfile change restart
2019-05-27 07:04:05 -07:00
106b971410 Add a much faster container replacement for livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:48:53 +01:00
39cf86ed85 Add a containerId request function to the device api module
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:48:53 +01:00
5de7a50fc0 v10.14.0 2019-05-27 15:47:25 +03:00
ba4301487f Merge pull request #1256 from balena-io/1255-local-push-vars
Add the ability to specify an environment variable when pushing to local mode device
2019-05-27 05:45:41 -07:00
f77156772a Add the ability to specify an environment variable when pushing to local
mode device

Closes: #1255
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:23:55 +01:00
a6d6035725 v10.13.6 2019-05-22 18:51:56 +03:00
5e0d24a1f1 Merge pull request #1248 from balena-io/fix-latest-commit-alias
Fix `balena preload --commit current` alias
2019-05-22 17:50:06 +02:00
9434570c2d Improve preload's --commit parameter description
Change-type: patch
2019-05-22 17:29:08 +02:00
674c0ca7b8 Fix balena preload --commit current alias
Change-type: patch
2019-05-22 17:13:55 +02:00
cccc8012c9 v10.13.5 2019-05-22 15:55:18 +03:00
29bfcf7ac5 Merge pull request #1244 from balena-io/update-balena-preload
Update balena preload
2019-05-22 14:52:46 +02:00
2091768c84 Rename preload --commit latest to preload --commit current
`latest` is still supported

Change-type: patch
2019-05-21 18:00:01 +02:00
36ab6f5808 Update balena-preload to 8.1.4
Change-type: patch
2019-05-21 14:02:45 +02:00
b45e80654c v10.13.4 2019-05-20 19:54:18 +03:00
8c60c9e076 Merge pull request #1242 from balena-io/1241-apps-length-undefined
Fix TypeError when running 'balena apps'
2019-05-20 17:51:40 +01:00
d47fe0609f Fix TypeError when running 'balena apps'
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-20 17:21:01 +01:00
3b5f3c6665 v10.13.3 2019-05-17 21:16:35 +03:00
1bfba85d58 Merge pull request #1239 from balena-io/1238-fix-apps-device-counts
apps: Fix the device count columns being empty
2019-05-17 21:14:28 +03:00
cb14928866 apps: Fix the device count columns being empty
Connects-to: #1238
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-17 20:48:55 +03:00
4088e4c66e v10.13.2 2019-05-17 20:00:43 +03:00
01a1bcdc8a Merge pull request #1237 from balena-io/1236-rm-intermediate-containers
Remove intermediate containers when doing a local push
2019-05-17 09:58:32 -07:00
05c3d2a5db Remove intermediate containers when doing a local push
Change-type: patch
Closes: #1236
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-17 17:43:41 +01:00
7da250914e v10.13.1 2019-05-16 13:05:40 +03:00
eaad5377b4 Merge pull request #1232 from balena-io/1231-os-build-config-example-fix
docs: Fix os configure example in os build-config docs
2019-05-16 13:03:23 +03:00
9f15ee58df docs: Fix os configure example in os build-config docs
Connects-to: #1231
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-16 12:38:44 +03:00
ee267cd114 v10.13.0 2019-05-16 12:33:46 +03:00
b35a51ef3a Merge pull request #1228 from balena-io/1177-api-device-type-versions
Use the open-balena-api endpoints for device type & version info
2019-05-16 12:31:58 +03:00
7ce43f4018 Use the open-balena-api endpoints for device type & version info
Resolves: #1177
HQ: https://github.com/balena-io/balena/issues/1744
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-15 21:03:57 +03:00
3ba8be02e7 v10.12.1 2019-05-15 20:19:04 +03:00
9a9d3f5c32 Merge pull request #1230 from balena-io/preload
preload: bump version to fix preloading on logstream supervisors
2019-05-15 18:16:58 +01:00
0adaeb5465 preload: bump version to fix preloading on logstream supervisors
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-15 17:56:00 +01:00
783cab2e50 v10.12.0 2019-05-15 17:40:55 +03:00
a47d2d4454 Merge pull request #1229 from balena-io/update-cli-video-2
Fix video url
2019-05-15 16:38:45 +02:00
1f728050c8 Fix video url
Change-type: minor
Signed-off-by: Daniel Andrade <daniel@balena.io>
2019-05-15 14:33:54 +01:00
15ec99577a v10.11.1 2019-05-15 16:33:39 +03:00
fb2e498aa9 Merge pull request #1221 from balena-io/debounced-livepush
Debounce livepush invocations to collect changes together
2019-05-15 06:31:29 -07:00
7529a9a2a2 Debounce livepush invocations to collect changes together
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-15 14:01:30 +01:00
22b02c261f v10.11.0 2019-05-15 13:42:35 +03:00
8f014710c0 Merge pull request #1227 from balena-io/update-video-url
Update balena-cli video url
2019-05-15 12:40:14 +02:00
308d1afb83 Update balena-cli video url
Change-type: minor
Signed-off-by: Daniel Andrade <daniel@balena.io>
2019-05-15 11:16:52 +01:00
c15276d239 v10.10.5 2019-05-14 16:22:38 +03:00
ecae517de0 Merge pull request #1224 from balena-io/Jazzagi-patch-1
Update instructions for adding folder to path in MacOS
2019-05-14 14:19:52 +01:00
69cc2a0946 Update instructions for adding folder to path in MacOS
Change-type: patch
2019-05-14 13:53:02 +01:00
7a8fc14686 v10.10.4 2019-05-14 15:25:44 +03:00
eaa886c31c Merge pull request #1220 from balena-io/1219-tcp-keepalive
Use TCP keepalive probes to detect local log stream closing
2019-05-14 05:23:18 -07:00
20ae2bc57a Pin pkg version to avoid node 6 error
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-14 12:37:27 +01:00
96c975d17e Use TCP keepalive probes to detect local log stream closing
Change-type: patch
Closes: #1219
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-14 11:39:57 +01:00
ff8d784582 v10.10.3 2019-05-10 19:14:41 +03:00
53bee83047 Merge pull request #1213 from balena-io/977-denymount-pkg
Fix 'local configure' on macOS standalone installation
2019-05-10 17:12:43 +01:00
6e343c36a8 Fix 'local configure' on macOS standalone installation
Resolves: #977
Resolves: #1212
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-10 16:18:13 +01:00
e29c275b4c v10.10.2 2019-05-10 18:04:14 +03:00
7faf363180 Merge pull request #1218 from balena-io/update-deps
Update dependencies including a balena-preload fix for lots of releases
2019-05-10 16:02:09 +01:00
a503cb4757 Update dependencies including a balena-preload fix for lots of releases
Change-type: patch
2019-05-10 15:38:12 +01:00
b3470ac909 v10.10.1 2019-05-04 22:53:16 +03:00
ba4c93ccf5 Merge pull request #1203 from balena-io/842-update-notifier-standalone
Update daily upgrade notifier message for non-npm installations
2019-05-04 20:51:37 +01:00
87401ad569 Replace 'npm' upgrade notifier message with INSTALL.md URL
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-04 18:34:08 +01:00
181afb34f8 v10.10.0 2019-05-03 15:32:30 +03:00
bfdfa28922 Merge pull request #1206 from balena-io/qemu
qemu: use v4.0.0
2019-05-03 13:30:24 +01:00
21840d9245 qemu: use v4.0.0-balena
Also append the QEMU version to the locally cached copy, so the
CLI can correctly bump version whenever QEMU_VERSION is bumped
in the future.

Change-type: minor
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-03 12:37:36 +01:00
d9c3332cb2 v10.9.4 2019-05-02 16:19:15 +03:00
29d684f9c3 Merge pull request #1202 from balena-io/1196-better-detached-logging
Better livepush ux
2019-05-02 14:16:44 +01:00
a832f47508 Improve livepush UX
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-02 14:06:34 +01:00
4557cf626f Improve logging for detached mode + livepush
Change-type: patch
Closes: #1196
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-02 14:06:26 +01:00
8c68aaad49 v10.9.3 2019-05-02 15:38:03 +03:00
260c6fccd2 Merge pull request #1208 from balena-io/dependencies
update dependencies and tests
2019-05-02 13:36:05 +01:00
d40f2eb500 actions/auth: fix mixed indentation error
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-02 13:22:22 +01:00
b6f3975bc1 dependencies: bump gulp to v4
To fix the same error as here https://github.com/nodejs/node/issues/20285
Task changes as described at https://fettblog.eu/gulp-4-parallel-and-series/

Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-02 11:53:54 +01:00
f2bd3c0ffb dependencies: bump etcher-sdk to pull in fixes
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-02 11:53:50 +01:00
3ae01fdaa0 v10.9.2 2019-05-02 13:53:25 +03:00
2452b42f81 Merge pull request #1204 from balena-io/1174-add-INSTALL-md-review
Update README and INSTALL docs (review typos and some rewording)
2019-05-02 11:51:23 +01:00
3303ac21c9 Update README and INSTALL docs (review typos and some rewording)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-01 18:15:47 +01:00
1b277bda87 v10.9.1 2019-05-01 11:16:23 +03:00
5f67c243c0 Merge pull request #1205 from balena-io/better-.local-detection
Allow any amount of subdomains when parsing .local addresses
2019-05-01 09:14:36 +01:00
9bbfb31bf7 Allow any amount of subdomains when parsing .local addresses
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-01 08:50:27 +01:00
5b805fe1da v10.9.0 2019-04-29 16:50:50 +03:00
24ed25aa37 Merge pull request #1175 from balena-io/1174-add-INSTALL-md
Add INSTALL.md file and centralise other docs on README.md
2019-04-29 14:48:12 +01:00
2ad0b60aeb Unify the CLI instructions between capitanodoc.ts and README.md, move
the installation instructions to INSTALL.md, and update the markdown
generation scripts.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-29 14:27:32 +01:00
37bd6be77b v10.8.2 2019-04-29 13:13:22 +03:00
88ad591a83 Merge pull request #1194 from balena-io/1187-numeric-app-name
Handle app names that look like a number (e.g. 1234)
2019-04-29 11:11:15 +01:00
30c36a26e2 Handle app names that look like a number (eg 1234)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-27 00:54:15 +01:00
6d6afc5140 v10.8.1 2019-04-26 19:02:14 +03:00
fc79d89f10 Merge pull request #1191 from balena-io/better-detached-live
Add better semantics for detached mode + live for push
2019-04-26 16:59:49 +01:00
57fba32fa2 Add better semantics for detached mode + live for push
Now if you pass both --live and --detached, the logs won't be displayed
but livepush will continue to run.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-26 16:50:27 +01:00
b41f9b9261 v10.8.0 2019-04-25 13:37:06 +03:00
a9aa7538f3 Merge pull request #1190 from balena-io/push-logs-.local
Allow specifying a .local address for logs and push
2019-04-25 11:34:55 +01:00
1b13d1b969 Allow specifying a .local address for logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-25 11:00:45 +01:00
e6b09f1b94 v10.7.0 2019-04-24 19:47:46 +03:00
8fa592dff0 Merge pull request #1188 from balena-io/system-logs
Allow filtering of system logs with push and logs commands
2019-04-24 17:45:40 +01:00
a6d2950260 Allow filtering of system logs with push and logs commands
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 17:30:18 +01:00
b22ddb50f1 v10.6.0 2019-04-24 17:56:56 +03:00
0aa10ba2a1 Merge pull request #1186 from balena-io/per-service-log-filtering
Add per-service filtering to logs and push
2019-04-24 15:54:41 +01:00
56c74af1ff Add per-service filtering to logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 15:05:05 +01:00
6460d850ca v10.5.0 2019-04-24 17:00:45 +03:00
b05aa7b385 Merge pull request #1185 from balena-io/add-detached-logs-push
push: Add detached flag to avoid streaming logs after local push
2019-04-24 14:58:12 +01:00
97c15208b5 push: Add detached flag to avoid streaming logs after local push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 14:31:30 +01:00
375464eb1a v10.4.1 2019-04-24 16:03:11 +03:00
811262ed8b Merge pull request #1184 from balena-io/local-logs
Refactor and improve balena logs, with consistent interface and local mode support
2019-04-24 14:00:54 +01:00
f816cb4ce8 Fix and update log documentation
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 13:04:49 +01:00
7b5272e926 Add tslint config to enable consistent lint process
The lint configuration used seems to vary between build machines, and
this is a bug in resin-lint. Until that's fixed, we provide another
tslint which points to the resin-lint configuration.

Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:52 +01:00
d412d39164 Add ability to use balena logs with a local mode device
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:52 +01:00
d41fb72ded refactor: Convert logs action to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:51 +01:00
4676396b5f logs: Make device logs consistent across the CLI
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:25:09 +01:00
b97565d2e7 refactor: Create and use validation functions for input
This includes IP address, application name and dotlocal url parsing.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:11:46 +01:00
a697121b97 v10.4.0 2019-04-24 13:17:19 +03:00
12615cd0dc Merge pull request #1180 from balena-io/tunnel-short-uuid
tunnel: allow using partial device uuids
2019-04-24 11:15:05 +01:00
cba73eec44 tunnel: allow using partial device uuids
Connects-to: #1173
Change-type: minor
Signed-off-by: Will Boyce <will@balena.io>
2019-04-24 10:51:42 +01:00
f5ed0648ba v10.3.0 2019-04-23 19:43:25 +03:00
ac5ffeda09 Merge pull request #1171 from balena-io/587-build-dockerfile-f-flag
Add --dockerfile option to the build, deploy and push commands
2019-04-23 17:41:17 +01:00
db25a65753 Add --dockerfile option to the build, deploy and push commands
It allows the selection of an alternative Dockerfile in single-
container projects that do not include a docker-compose file.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-23 15:34:19 +01:00
296f1ae2de Fix push and deploy issues under Windows ('/' vs '\' path separators)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-23 15:16:47 +01:00
579cdaa2e2 v10.2.0 2019-04-23 16:29:53 +03:00
69db3c0171 Merge pull request #1076 from balena-io/add-livepush
Add livepush to balena push
2019-04-23 14:27:54 +01:00
7c71098d86 Update livepush documentation and required versions
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
490f833a33 Cleanup intermediate containers on exit of livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
a81c1971f1 livepush: Perform full rebuild on Dockerfile-like file change
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
76034696e9 Fix lint warnings
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
454f82883e Add supervisor version information to push documentation
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
6a9a9e1fdb Add livepush ability to balena push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
cf2ad66955 log: Add livepush logging functions
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 12:14:09 +01:00
4cfaf6e666 Add device status endpoint api function
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 12:14:05 +01:00
bc563ea963 v10.1.1 2019-04-22 20:25:24 +03:00
65ac35a93e Merge pull request #1179 from balena-io/1178-filter-before-patching-release-status
Ensure not marking successful releases as canceled
2019-04-22 20:23:13 +03:00
1ee51ca9a7 Ensure not marking successful releases as canceled
Resolves: #1178
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-04-22 20:09:32 +03:00
e9e15dbbe3 v10.1.0 2019-04-18 18:44:46 +03:00
a665a3d153 Merge pull request #1170 from balena-io/update-readme
Add more information about the stantalone version
2019-04-18 16:43:00 +01:00
9da5f88ecf Updated CLI installation notes on README.md and ran prettier
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-18 14:52:51 +01:00
14e9b34636 Add more information about the stantalone version
Change-type: minor
Signed-off-by: Daniel Andrade <daniel@balena.io>
2019-04-17 17:56:33 +01:00
e619caea42 v10.0.1 2019-04-13 19:14:09 +03:00
a133fe8c6f Merge pull request #1163 from balena-io/fix-ignore
Fix file ignore rules matching metadata folders
2019-04-13 17:12:29 +01:00
29dd5e71a1 Fix docs markdown (deprecation messages for 'local push' and 'sync')
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-13 16:23:06 +01:00
9b52dec725 Fix file ignore rules matching metadata folders breaking qemu builds
Change-type: patch
2019-04-12 16:16:56 +03:00
6bc55ea7ab Merge pull request #1160 from balena-io/change-sync-deprecation-message
Remove information about livepush in sync deprecation message
2019-04-09 14:35:30 +01:00
717affa591 Remove information about livepush in sync deprecation message
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-09 11:08:40 +01:00
6a9eeaaba2 v10.0.0 2019-04-03 20:01:58 +03:00
98eaeddbfe Merge pull request #1152 from balena-io/1140-1141-deprecate-commands
Remove 'quickstart' command and deprecate 'local push'.
2019-04-03 18:00:15 +01:00
30698c62e3 Remove 'quickstart' command and deprecate 'local push'.
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-03 17:34:55 +01:00
79e240f630 v9.15.6 2019-03-29 15:58:58 +02:00
6825ffe416 Merge pull request #1149 from balena-io/local-push-upgrades
Support nocache flag in push <ip>
2019-03-29 13:56:20 +00:00
b9bf00d329 Support nocache flag in push <ip>
Change-type: patch
Closes: #1128
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-28 13:29:52 +00:00
5ae7457f45 v9.15.5 2019-03-28 14:26:33 +02:00
d78dfcb1de Merge pull request #1147 from balena-io/bump-docker-progress-400
Bump docker-progress version (4.0.0) to improve `balena deploy` error handling
2019-03-28 12:23:55 +00:00
95c4c59ca0 Bump docker-progress (4.0.0) to improve balena deploy error
handling.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-26 23:30:13 +00:00
3a06c5df72 v9.15.4 2019-03-26 01:00:24 +02:00
d30144a16a Merge pull request #1146 from balena-io/resin-compose-parse-2.0.4
Update resin-compose-parse to 2.0.4 to fix an error with extra_hosts
2019-03-25 15:58:41 -07:00
c0990fe6c4 Update resin-compose-parse to v2.0.4
This fixes an issue parsing extra_hosts when building multicontainer projects.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-25 15:43:20 -07:00
af382bfee4 Update resin-multibuild to v2.1.5
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-25 15:42:19 -07:00
6705369ca6 v9.15.3 2019-03-25 20:13:28 +02:00
fb05957198 Merge pull request #1145 from balena-io/1130-allow-not-logged-in-push-to-device
Allow 'balena push <deviceIpAddress>' when not logged in to balenaCloud.
2019-03-25 18:11:31 +00:00
6b21f5aa5a Allow 'balena push <deviceIpAddress>' when not logged in to balenaCloud.
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-25 17:46:38 +00:00
0fac8d8d3b v9.15.2 2019-03-18 16:32:00 +02:00
f39193ab61 Merge pull request #1138 from balena-io/bump-resin-lint-301-multibuild-214
Bump resin-lint major version (3.0.1), resin-multibuild (2.1.4) and docker-progress (3.0.5)
2019-03-18 14:30:09 +00:00
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
da86d3303f v9.15.1 2019-03-12 15:54:38 +02:00
2f3138208a Merge pull request #1137 from balena-io/codeowners
Add maintainer as code owner
2019-03-12 13:52:34 +00:00
e688e10684 Add maintainer, reviewers, and devexp team as code owners
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-03-12 13:34:27 +00:00
66b62df70b v9.15.0 2019-03-12 14:13:19 +02:00
a4dd45e6a6 Merge pull request #1136 from balena-io/ssh-no-suggest
ssh: add flag not to suggest devices to connect to
2019-03-12 12:11:19 +00:00
b4439b7d78 ssh: add --noninteractive flag not to suggest devices to connect to
The suggestion happens if the UUID supplied is not found. Because
of that function, it's impossible to do an atomic connect to a device
in non-interactive mode. The auto-suggestion results connecting to
the first available device, which is likely not the intended action.
The current workaround is running a `balena device UUID` and check
its exit code before running `balena ssh UUID`, but since these
are independent steps, still can connect to another device, if between
the two commands anything changes. With this flag used, one could never
connect accidentally to the wrong device due to suggestions.

Change-type: minor
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-03-12 11:50:17 +00:00
bf566b7bb7 v9.14.7 2019-03-11 18:46:47 +02:00
2c897a1b18 Merge pull request #1134 from balena-io/ssh-version
ssh: correct the minimum OS version that allows host OS connection
2019-03-11 16:45:00 +00:00
a5cfbb3181 ssh: correct the minimum OS version that allows host OS connection
Since openBalena API v0.11.0 (downstream API 9.16.0) the minimum
OS version has been lowered from 2.7.5 to 2.0.0 for host OS access.

Change-type: patch
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
2019-03-11 15:24:12 +00:00
119a630643 v9.14.6 2019-03-08 15:51:06 +02:00
c6fe6b5e3e Merge pull request #1131 from balena-io/1102-owner-legacy-deploy
Fix 'unauthorized' error for additional members of legacy apps
2019-03-08 13:47:05 +00:00
6ff43b11b1 Fix 'unauthorized' error for additional members of legacy apps
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-07 18:01:19 +00:00
f35655028e v9.14.5 2019-03-05 16:19:34 +01:00
709af3e92b Merge pull request #1125 from balena-io/1010-retry-image-push-unknown-blob
Handle 'unknown blob' errors and retry image pushing
2019-03-05 15:17:55 +00:00
5ec9dce507 Retry image push a few times (balena deploy, 'unknown blob')
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-05 15:02:52 +00:00
1e81638433 Harden 'remote-build' error handling (balena push)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-05 13:17:37 +00:00
145b613f5d v9.14.4 2019-03-05 11:00:31 +01:00
a243c3f577 Merge pull request #1126 from balena-io/update-resin-multibuild
Update resin-multibuild to pick up fixes
2019-03-05 09:58:15 +00:00
75b9ba907f Update resin-multibuild to pick up fixes
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-05 09:51:08 +00:00
1a368ac4d4 v9.14.3 2019-03-04 21:06:12 +01:00
2833e8ba23 Merge pull request #1124 from balena-io/conditional-debug-hint
Minor doc updates (add DEBUG=1 hint)
2019-03-04 20:04:19 +00:00
de3837f777 Minor doc updates (add DEBUG hint)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-04 19:53:18 +00:00
8dc5eaca52 v9.14.2 2019-03-01 12:54:23 +01:00
5c41de0c9d Merge pull request #1122 from balena-io/bump-resin-multibuild-context-bug
Bump resin-multibuild version to fix docker-compose 'context' issue
2019-03-01 11:52:45 +00:00
7a258f022f Bump resin-multibuild version to fix docker-compose 'context' issue
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-01 11:38:16 +00:00
cbdf1c3ccf v9.14.1 2019-02-28 11:21:18 +01:00
dcab2404fa Merge pull request #1119 from balena-io/registry-secrets-help-msg-build-deploy
Add registry-secrets help documentation for the build and deploy commands
2019-02-28 10:19:30 +00:00
05e80094de Add registry-secrets help msg for build and deploy commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-27 21:58:44 +00:00
9fab994dec v9.14.0 2019-02-27 16:23:49 +01:00
6eddd1ccd3 Merge pull request #1118 from balena-io/1116-private-reg-build-deploy
Extend private registry support to balena build and deploy commands
2019-02-27 15:21:46 +00:00
211fb824a1 Extend private registry support to balena build and deploy commands
Resolves: #1116
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-27 13:16:09 +00:00
17c7b97abe v9.13.0 2019-02-27 14:14:56 +01:00
ac3c539d45 Merge pull request #1115 from balena-io/1114-private-reg-compose-image
Integrate new resin-multibuild major version (private registry auth for docker-compose 'image' instruction)
2019-02-27 13:13:15 +00:00
c1e94e661f Integrate new resin-multibuild major version (private docker registry
authentication support for the docker-compose 'image' instruction).

Resolves: #1114
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-27 10:33:25 +00:00
8a6ee5905a v9.12.7 2019-02-27 11:05:02 +01:00
36c636474d Merge pull request #1112 from balena-io/1108-device-uuid-starts-with-zero
Fix parsing of not-really-numeric device UUID parameters
2019-02-27 10:02:54 +00:00
0bff122b1c Fix parsing of not-really-numeric device UUID parameters
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-26 10:43:57 +00:00
2ffb9bb574 v9.12.6 2019-02-22 18:54:30 +01:00
6190d00644 Merge pull request #1111 from balena-io/fix-docs-toc
Fix regression in ee75ff and restore functionality to ToC in docs
2019-02-22 17:53:12 +00:00
67673a55f7 Fix regression in ee75ff and restore functionality to ToC in docs
Change-type: patch
Signed-off-by: Chris Crocker-White <chriscw@balena.io>
2019-02-22 16:37:57 +00:00
4448509d92 v9.12.5 2019-02-22 11:01:02 +01:00
8482961f7f Merge pull request #1110 from balena-io/1109-prettier-on-master
Re-run newest prettier on master
2019-02-22 11:59:17 +02:00
552f8cc4ef Re-run newest prettier on master
Resolves: #1109
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-02-22 10:02:02 +02:00
21b32633c5 v9.12.4 2019-02-20 22:53:48 +01:00
8863132e8e Merge pull request #1105 from balena-io/refactor-tunnel-command
tunnel: Refactor to improve log output
2019-02-20 21:52:18 +00:00
f72b556d92 tunnel: Refactor to improve log output
Improve the log output and error handling in the tunnel
command code.

Signed-off-by: Rich Bayliss <rich@balena.io>
Change-type: patch
2019-02-20 21:42:59 +00:00
4b7e0a19eb v9.12.3 2019-02-19 17:14:01 +01:00
3db92322ba Merge pull request #1101 from balena-io/add-tunnel-command
tunnel: Add the tunnel command
2019-02-19 16:12:24 +00:00
aac668dfca tunnel: Add the tunnel command
This allows a user to easily use the tunneling service
to open connections into their balena-managed devices.

Signed-off-by: Rich Bayliss <rich@balena.io>
Change-type: patch
2019-02-15 16:08:00 +00:00
0636dcf19d v9.12.2 2019-02-07 19:42:22 +01:00
3fca56e819 Merge pull request #1095 from balena-io/mixpanel-api-proxy
Remove fetching of Mixpanel token
2019-02-07 18:40:38 +00:00
6124d8c493 Remove fetching of Mixpanel token
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-07 17:06:10 +00:00
9ef99a3aa9 v9.12.1 2019-02-05 18:09:34 +01:00
66fc47edae Merge pull request #1094 from balena-io/commit-to-release
Rename localcommit to localrelease in target state for local mode
2019-02-05 17:07:22 +00:00
af948e76f3 Rename localcommit to localrelease in target state for local mode
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 16:55:49 +00:00
dfd98efe8b v9.12.0 2019-01-22 15:02:07 +01:00
a8de833c43 Merge pull request #1083 from balena-io/dont-offer-to-disable-automatic-updates-when-device-is-pinned
Don't offer to disable automatic application updates when using pinning
2019-01-22 15:00:21 +01:00
3bff748fbe Don't offer to disable automatic application updates when using pinning
--pin-device-to-release disables the automatic updates disabling
message.

Change-type: minor
2019-01-22 14:44:16 +01:00
8adf66512b v9.11.2 2019-01-18 01:39:02 +01:00
d4313e6f95 Merge pull request #1079 from balena-io/692-local-flash-zip-img-doc
Update 'balena help local flash' documentation re zipped images
2019-01-18 00:37:48 +00:00
24fdfc9aef Update 'balena help local flash' documentation re zipped images
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-01-17 17:52:28 +00:00
e5f454bac3 v9.11.1 2019-01-16 20:56:29 +01:00
ca9ce5ed16 Merge pull request #1077 from balena-io/733-typescript-migration-notice
typescript: Add TypeScript migration notice to README file
2019-01-16 19:54:59 +00:00
2087622bd6 typescript: Add TypeScript migration notice to README file
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-01-16 17:45:01 +00:00
a651e27a20 v9.11.0 2019-01-16 15:13:33 +01:00
0fd0b6e1fd Merge pull request #1078 from balena-io/flash-compressed-images
Support compressed images in `balena local flash`
2019-01-16 15:12:03 +01:00
c63569d592 Support compressed images in balena local flash
Change-type: minor
2019-01-16 14:56:31 +01:00
7b7d00c642 v9.10.1 2019-01-15 21:37:37 +01:00
9e27889f91 Merge pull request #1056 from balena-io/typo
Fix up small docs typo
2019-01-15 15:36:19 -05:00
8bbb1966a4 Merge branch 'master' into typo 2019-01-15 14:27:02 -05:00
5d00e295fd v9.10.0 2019-01-14 13:58:32 +01:00
0d4a2b65a0 Merge pull request #1071 from balena-io/fast-boot
Improve startup time by adding fast-boot
2019-01-14 12:57:12 +00:00
2ba53649bd Improve startup time by adding fast-boot
Change-type: minor
Signed-off-by: Shaun Mulligan <shaun@balena.io>
2019-01-14 12:43:51 +00:00
31f4af721d v9.9.4 2019-01-14 12:20:58 +01:00
ce734ba783 Merge pull request #1073 from balena-io/lazy-load-sdk
Lazy load the sdk as much as possible
2019-01-14 11:19:24 +00:00
77196746b3 Lazy load the sdk as much as possible
Change-type: patch
2019-01-13 18:03:06 +00:00
99650ab732 v9.9.3 2019-01-13 15:17:19 +01:00
96b7d4a15d Merge pull request #1074 from balena-io/lazy-load-docker-toolbelt
Lazy-load docker-toolbelt
2019-01-13 14:15:50 +00:00
ce1aff1557 Lazy-load docker-toolbelt
Change-type: patch
2019-01-13 13:43:21 +00:00
9d5949e9d1 Merge branch 'master' into typo 2019-01-13 12:15:00 +01:00
3ca681a4a6 v9.9.2 2019-01-11 19:49:35 +01:00
49449e42be Merge pull request #1072 from balena-io/lazy-load-patterns
Lazy-load resin-cli-form and resin-cli-visuals to speed up startup
2019-01-11 18:48:05 +00:00
dad3167f16 Lazy-load drive list 2019-01-11 18:36:13 +00:00
3cc632fbbb Lazy-load etcher-sdk to speed up startup
Change-type: patch
2019-01-11 18:29:58 +00:00
f780d47198 Lazy-load resin-cli-form and resin-cli-visuals to speed up startup
Change-type: patch
2019-01-11 18:11:32 +00:00
e0bd6b9d4e v9.9.1 2019-01-11 18:23:33 +01:00
5cf0f7030d Merge pull request #1052 from balena-io/update-local-flash-action
Update "local flash" and "util available-drives" actions
2019-01-11 18:22:04 +01:00
77b763a88f Update util available-drives action
* switch from coffeescript to typescript
 * use etcher-sdk instead of drivelist

Change-Type: patch
2019-01-11 17:56:34 +01:00
f9390ceb10 Update lib/actions/local/flash.coffee
* switch to typescript
 * replace etcher-image-stream with etcher-sdk

Change-type: patch
2019-01-11 17:56:34 +01:00
bc41ff0540 v9.9.0 2019-01-10 14:52:32 +01:00
54e91eb074 Merge pull request #1057 from balena-io/access_old_repos
Request access to previously pushed release via `balena deploy`
2019-01-10 08:50:32 -05:00
a42a1a97ba Request access to previously pushed release via balena deploy
This access is used to cross mount the old layers, rather than
reuploading the layers each time.

Connects-to: #1045
Change-type: minor
Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2019-01-10 08:27:53 -05:00
f3d5e26e1e v9.8.0 2019-01-07 19:45:17 +01:00
99eae385b8 Merge pull request #1059 from balena-io/balena-cli-docs-deps
Moving docs from PR #1055
2019-01-07 10:43:52 -08:00
f6d67b94f3 Escape backticks in JS template literal
Escape backticks in JS template literal

Change-type: minor
Signed-off-by: Trevor Sullivan <trevor@balena.io>
2019-01-01 08:53:09 -08:00
2d9bb2130e Moving docs from PR #1055
Added documentation about the dependencies required to build balena-cli

Change-type: minor
Signed-off-by: Trevor Sullivan <trevor@balena.io>
2018-12-31 11:58:33 -08:00
10fff8f0f5 Merge branch 'master' of github.com:balena-io/balena-cli into typo 2018-12-31 08:22:32 -05:00
8ee994ce7d v9.7.0 2018-12-28 23:11:23 +01:00
86aed2185d Merge pull request #1055 from balena-io/balena-cli-deps
Adding information about dependency installation
2018-12-28 14:09:51 -08:00
64ec151e4b Added documentation about the dependencies required to build balena-cli
Change-type: minor
Signed-off-by: Trevor Sullivan <trevor@balena.io>
2018-12-28 13:00:43 -08:00
3e4e661b28 Fix up small docs typo
Change-type: patch
Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2018-12-28 08:40:18 -05:00
7713ca31e5 v9.6.0 2018-12-18 22:19:12 +01:00
b0da1b4811 Merge pull request #1041 from balena-io/1015-build-secrets-command-line-options
Add --registry-secrets option for balena push (private registry auth)
2018-12-18 21:17:14 +00:00
0f302d30ec Add push --registry-secrets option for private docker registry authentication
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2018-12-18 00:01:15 +00:00
140e851fcd v9.5.0 2018-12-14 17:07:40 +02:00
b9b4343fd5 Merge pull request #1047 from balena-io/1013-os-configure-device-type
Add explicit device type option to `os configure` & `config generate`
2018-12-14 17:06:05 +02:00
eff49beb36 Wait for the device type compatibility check before showing the form
Also now fetches the device type from the image/API only once.

Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 15:46:27 +02:00
952d74207d Check that the provided device type option is of the same arch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 15:46:27 +02:00
853d146457 Update the os configure examples to better explain --device-type
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 15:46:27 +02:00
97d6a39677 Add explicit device type option to os configure & config generate
Resolves: #1013
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 12:56:43 +02:00
095a597381 v9.4.1 2018-12-14 12:38:50 +02:00
a66aec6965 Merge pull request #1050 from balena-io/node6-types
Fix deploy action on node 6
2018-12-14 11:37:07 +01:00
03a3ef38e1 Fix deploy action on node 6
Downgrade @types/node to version 6 as we support node6

Change-type: patch
2018-12-14 11:26:59 +01:00
464d706920 v9.4.0 2018-12-10 23:22:40 +02:00
61dd5acb80 Merge pull request #1046 from balena-io/866-resource-tags
actions: Add resource tag operations
2018-12-10 23:21:04 +02:00
1e5cf8655e actions: Add resource tag operations
Resolves: #866
HQ: https://github.com/resin-io/hq/issues/150
HQ: https://github.com/resin-io/hq/pull/281
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-10 23:05:48 +02:00
f096f4f55f v9.3.6 2018-12-03 15:25:48 +02:00
85442c4634 Merge pull request #1042 from balena-io/fix-arch-docs
Make architecture checking more stringent when installing emulators
2018-12-03 14:23:58 +01:00
a357405f3a Make architecture checking more stringent when installing emulators
Also change the documentation to an armv7hf.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-03 13:10:54 +00:00
6070ee0f83 v9.3.5 2018-11-28 20:30:15 +02:00
f8721a324d Merge pull request #1040 from balena-io/fix-event-stream-vulnerability
Fix potential dependency security issue
2018-11-28 20:28:48 +02:00
ca861a6349 Fix potential dependency security issue
Until further investigation it is recommended to pin event-stream
to v3.3.4.

Change-type: patch
See: https://github.com/dominictarr/event-stream/issues/116
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-28 20:15:28 +02:00
493c6576c3 v9.3.4 2018-11-28 19:53:54 +02:00
a8765af589 Merge pull request #1037 from balena-io/update-docker-qemu-transpose
Update dependencies and pin event-stream
2018-11-28 18:52:12 +01:00
ca8484b466 Update dependencies
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-28 17:03:47 +00:00
7a8d746a54 v9.3.3 2018-11-27 17:32:16 +02:00
1cffcd9b9e Merge pull request #1039 from balena-io/1038-is-initialize-nonbluebird-promise
actions/os-initialize: Convert Promise to a Bluebird one
2018-11-27 17:30:13 +02:00
b6c041c9b5 actions/os-initialize: Convert Promise to a Bluebird one
Resolves: #1038
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-27 10:34:21 +02:00
47b35db03e v9.3.2 2018-11-26 11:04:04 +02:00
78985ff633 Merge pull request #1034 from balena-io/1033-fix-os-configure-wo-version
actions/os: Fix os configure using bluebird methods on plain promise
2018-11-26 11:02:50 +02:00
93a5380c09 actions/os: Fix os configure using bluebird methods on plain promise
Resolves: #1033
Connects-to: #1007
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-26 10:00:49 +02:00
6677f1faf5 v9.3.1 2018-11-26 10:00:27 +02:00
e7b32e941a Merge pull request #1035 from balena-io/1007-document-configure-version
actions/config: Fix examples to include --version as required
2018-11-26 09:58:59 +02:00
5abd240d50 actions/config: Fix examples to include --version as required
Connects-to: #1007
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-23 16:01:01 +02:00
759c2d4a6f v9.3.0 2018-11-22 16:28:28 +02:00
92772952fd Merge pull request #1027 from balena-io/update-node-ext2fs-and-preload
Stop pinning ext2fs and update preload to ^8.0.4
2018-11-22 15:26:55 +01:00
2f53cbf088 Stop pinning ext2fs and update preload to ^8.0.4
* ext2fs fixes build issues on 32 bit Linux platforms
 * preload fixes issues with the --dont-check-arch flag

Change-type: minor
2018-11-22 14:46:45 +01:00
c3b74a869a v9.2.2 2018-11-20 15:38:57 +02:00
841d1927a9 Merge pull request #1029 from balena-io/fix-os-config
Fix missing import in `os configure`
2018-11-20 15:36:24 +02:00
06c450e9a5 Fix missing import in os configure
Fixes #1028

Change-type: patch
2018-11-20 13:14:49 +02:00
67de638c76 v9.2.1 2018-11-19 16:15:29 +01:00
c90b8eef97 Merge pull request #1026 from balena-io/case-insensitive-push
Add case-insensitive checking for application names in balena push
2018-11-19 16:13:17 +01:00
6ad4598e7e Add case-insensitive checking for application names in balena push
The filter is added with an `as any`, as the typings dont yet support
using $eq and $ne.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-19 12:49:00 +00:00
fd580083d5 v9.2.0 2018-11-16 19:14:15 +01:00
a0003c5f13 Merge pull request #1012 from balena-io/optional-os-version
Make specifying the version during configuration optional
2018-11-16 20:09:35 +02:00
8291c96e69 Make specifying the version during configuration optional
`version` used to be optional but it seems we recently had to make it a required parameter. However it really feels redundant when all it’s used for is to determine whether the command should issue a legacy user API key or a provisioning key.

This makes version optional but tries to figure it out by itself by reading os-release from the image's boot partition. This is not foul-proof however, and while it'll work with most recent images it won't work with all and in that case it'll bail out and only then warn the user to specify it via the --version argument.

Change-type: minor
2018-11-16 19:39:43 +02:00
561325e66d v9.1.4 2018-11-16 18:21:48 +01:00
a840f39a91 Merge pull request #1023 from balena-io/gh-templates
Extend the github repository templates
2018-11-16 18:32:44 +02:00
64f9b50e40 Extend the github repository templates
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-16 17:45:20 +02:00
0273d2e02c v9.1.3 2018-11-16 16:00:43 +01:00
daf3b980ef Merge pull request #1025 from balena-io/add-promote-to-docs
Include `join` and `leave` commands in API documentation
2018-11-16 16:58:35 +02:00
6e36cd139a Include join and leave commands in API documentation
Change-type: patch
2018-11-16 16:02:43 +02:00
9ca76348ff v9.1.2 2018-11-13 19:08:00 +01:00
58a5725ad2 Merge pull request #1022 from balena-io/fix-standalone-deploy
Fix build & deploy commands in standalone build
2018-11-13 19:06:01 +01:00
116c3c787c Fix build & deploy commands in standalone build
Change-type: patch
2018-11-13 18:43:00 +01:00
74a896b3cd v9.1.1 2018-11-12 17:17:16 +01:00
e2ebac27ea Merge pull request #1020 from balena-io/1019-fix-qemu
Fix the architecture string used when downloading qemu versions
2018-11-12 17:15:49 +01:00
b799f3a46d Fix the architecture string used when downloading qemu versions
Closes: #1019
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-12 15:57:04 +00:00
3a3cfbc85e v9.1.0 2018-11-08 11:27:20 +01:00
161b9454c2 Merge pull request #1016 from balena-io/qemu3-aarch-support
Qemu3 multiple architecture support
2018-11-08 11:25:40 +01:00
b83b7145af Remove unnecessary parentheses 2018-11-07 20:58:27 +01:00
26c4e466bd Store separate local qemu binaries for aarch64 and arm architectures.
Copy the correct binary into the local build context when executing a build.
2018-11-07 17:49:20 +01:00
42f752e400 Use existing tar-stream dependency to untar qemu archive rather than adding a new dependency. 2018-11-07 17:49:20 +01:00
0b67a40d57 Update qemu to v3, and automatically use the correct architecture (arm/aarch64)
When building with emulation mode enabled, this downloads the version of qemu
appropriate to the architecture of the project (either arm or aarch64).

Change-type: minor
2018-11-07 17:49:20 +01:00
69ab9788fc v9.0.3 2018-11-07 16:47:02 +01:00
7972187b77 Merge pull request #1006 from balena-io/api-key-graduation
Mark api keys in the CLI as non-experimental
2018-11-07 16:45:02 +01:00
a809847d60 Mark api keys in the CLI as non-experimental
After the recent SDK updates, they should now work everywhere

Change-type: patch
2018-11-07 16:30:56 +01:00
203285bab9 v9.0.2 2018-11-06 13:08:14 +01:00
52c7a098cc Merge pull request #1014 from balena-io/disable-broken-config-validation
Stop validating device config, now that it's API-generated
2018-11-06 13:06:17 +01:00
75bc937995 Stop validating device config, now that it's API-generated
Change-type: patch
2018-11-06 12:31:05 +01:00
dd41145912 v9.0.1 2018-11-01 15:18:58 +01:00
0983bf02e2 Merge pull request #1009 from balena-io/ignored-balena-dir
Dont ignore balena metadata directories when balena pushing
2018-11-01 15:17:26 +01:00
0deb59b6e2 Dont ignore balena metadata directories when balena pushing
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-01 13:58:54 +00:00
fdc9fd67d8 v9.0.0 2018-10-29 22:46:27 +01:00
01eb4b473d Merge pull request #1005 from resin-io/v9-meta-branch
Release Balena-CLI
2018-10-29 22:44:16 +01:00
4ff42c11e6 Remove rename warning 2018-10-29 22:30:21 +01:00
85d82ab9ca Merge pull request #997 from resin-io/984-the-big-rename
Rename everything from 'resin' to 'balena'
2018-10-29 22:29:03 +01:00
dc6cde2cf1 Change env var commands to set app-wide env vars, using the new SDK
Change-type: major
2018-10-29 22:29:03 +01:00
ea1c1bb8d4 Merge pull request #994 from resin-io/978-oss-flow-slug
utils/promote: Use the application slug for filtering & presenting
2018-10-29 22:29:02 +01:00
c6eca9f895 Rewrite the env commands in TypeScript 2018-10-29 22:29:02 +01:00
e71f622453 Merge pull request #979 from resin-io/978-oss-flow
Add support for the Opensource provisioning flow
2018-10-29 22:29:02 +01:00
b6266878d4 utils/promote: Use the application slug for filtering & presenting
Change-type: minor
Depends-on: https://github.com/resin-io/resin-api/pull/1570
Depends-on: https://github.com/resin-io/resin-sdk/pull/596
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-29 22:29:02 +01:00
4907fccf48 Rename everything from 'resin' to 'balena'
Change-type: major
2018-10-29 22:29:02 +01:00
f4b84941cd package.json: Use the pre-release balena SDK
Signed-off-by: Thodoris Greasidis <thodoris@resin.io>
2018-10-29 22:29:02 +01:00
c2df87bcc6 Code formatting
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-29 22:29:02 +01:00
79f33c749b fix deploy 2018-10-29 22:29:02 +01:00
fd316167d8 Sort device types by name
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-29 22:29:02 +01:00
f60d857c93 utils/promote: Do not rely on the user to always be there
Change-type: minor
Depends-on: https://github.com/resin-io/resin-sdk/pull/595
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-29 22:29:02 +01:00
31628cfdcb promote: Use ResinSdk type namespace
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-29 22:29:02 +01:00
4d42f74c0c Add support for the Opensource provisioning flow
Connects-to: #978
Change-type: major
Depends-on: https://github.com/resin-io/resin-sdk/pull/594
HQ: https://github.com/resin-io/balena/pull/1140
Signed-off-by: Thodoris Greasidis <thodoris@resin.io>
2018-10-29 22:29:02 +01:00
13729ec4b6 Merge pull request #985 from pdcastro/resin_rename_notice
Add rename notice to resin-cli
2018-10-29 22:28:08 +01:00
8dc4c0871a v8.1.0 2018-10-24 12:44:15 +02:00
207e080b9e Merge pull request #995 from resin-io/add-dev-bin
chore: Add on the fly transpiled bin
2018-10-24 13:41:21 +03:00
39fe63fb2d README: Add development guidelines section
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-24 13:06:03 +03:00
24c2ffefc9 chore: Add on the fly transpiled bin
Adds an alternative bin file that does not require building the project but
loads the source files directly.

Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-24 13:05:02 +03:00
c293a1742d v8.0.3 2018-10-22 18:39:13 +02:00
cb46756d31 Merge pull request #992 from resin-io/v8-meta-branch-sshsdk
ssh: Move SSH from resin-sdk-preconfigured to resin-sdk
2018-10-22 18:37:20 +02:00
332e731023 ssh: Move from resin-sdk-preconfigured to resin-sdk
Change-type: patch
Signed-off-by: Will Boyce <will@resin.io>
2018-10-22 16:46:56 +01:00
f9263975bc Add rename notice to resin-cli
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2018-10-22 14:09:07 +01:00
67ebf7aa19 v8.0.2 2018-10-20 19:09:46 +02:00
2b52d5edbc Merge pull request #990 from resin-io/drop-sdk-preconfigured-app-patterns
Drop sdk preconfigured app patterns
2018-10-20 19:07:57 +02:00
948e6ea6f8 utils/patterns: Drop resin-sdk-preconfigured
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-20 18:35:34 +02:00
ca9247fb19 actions/app: Drop resin-sdk-preconfigured
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-10-20 18:35:34 +02:00
73455b4264 v8.0.1 2018-10-20 15:26:04 +02:00
28b0793fc9 Merge pull request #993 from resin-io/fix-push
Update dockerignore to fix escSL bug
2018-10-20 15:24:28 +02:00
c904726259 Update dockerignore to fix escSL bug
Change-type: patch
2018-10-20 14:54:33 +02:00
6606b65c9b v8.0.0 2018-10-19 17:31:41 +02:00
61160fd2f5 Merge pull request #991 from resin-io/v8-meta-branch
Release CLI v8
2018-10-19 17:29:40 +02:00
bf71f9ea16 Merge pull request #981 from resin-io/local-mode-v2
Local mode v2
2018-10-19 17:09:28 +02:00
fe751fdb23 Check supervisor version before attempting to do a local push
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:45:23 +02:00
947f91d570 Support multicontainer local mode in resin push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:56 +02:00
c5d4e30e24 logger: Add logs logging function
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:53 +02:00
f560aa7523 export resolveProject function from compose module
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:49 +02:00
6bcfb2dd51 logs: Add log build function to logger
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:44 +02:00
bf062124f7 compose: Add compose typings
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:39 +02:00
221666f59a Stop accepting resin-compose.yml as a build composition definition
These files are not supported by any other part of the resin
infrastructure, and it could cause confusion with it not being
supported everywhere. The idea was originally added because we
thought we might need to make extensions on docker-compose, but
that hasn't happened.

Change-type: major
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:49 +02:00
4369a2d161 tconfig: Add skipLibCheck to tsconfig
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:46 +02:00
cd6ee4ef5e Send push source packages as gzipped data
Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:39 +02:00
872b17cf24 refactor: Allow setting of a remote build error message
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:32 +02:00
88e11347bc tests: Add tests for ignore files
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:28 +02:00
a3dd489c70 Respect ignore files when tarring sources
This commit brings in the ignore and dockerignore libraries, which when
provided with the patterns in the aforementioned files will ignore them.

Change-type: major
Closes: 889
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:22 +02:00
0c1c108b2b Check for correct architecture when preloading, instead of correct device type
Preload will now propose to preload any app that matches the image
architecture.

Change-type: major
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-19 16:43:02 +02:00
f02ed43f33 Default preload boolean parameters to false
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-19 16:42:51 +02:00
63c3d7ceee fix: Apply prettier to merged files
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:42:48 +02:00
dac45a884e dev: Add fast test npm task, to speed development
Currently running the tests is painfully slow, this commit adds a task
which will run the bare minimum build, and then the tests, speeding up
the process by an order of magnitude.

I had to repeat `gulp test`, instead of reusing `npm run test`, so that
the pretest task isn't ran too.

Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:42:42 +02:00
ec589c2639 Correctly error out on failed remote builds
The push command was relying on the output from the builder to indicate
the build status, but this isn't helpful for CI. This commit makes the
remote build module respect the `isError` flag which the builder sends
in any errors. Any errors which come from the builder indicate the
release will not be deployed.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:42:14 +02:00
f65e777d1b Bump tsconfig target to es6
Change-type: major
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:42:06 +02:00
684ac9fa24 v7.10.9 2018-10-18 21:08:35 +02:00
330cbc6a68 Merge pull request #989 from resin-io/sdk-references-update
Update sdk references in wizzard.coffee
2018-10-18 21:06:38 +02:00
14bfca8c3a v7.10.8 2018-10-18 20:14:43 +02:00
20c07d31b2 Merge pull request #987 from resin-io/sdk-references-update
Update sdk references in device.coffee
2018-10-18 20:12:08 +02:00
64b4f67477 Update sdk references in wizzard.coffee
Change-type:patch
2018-10-18 18:53:03 +02:00
a8ceadc300 v7.10.7 2018-10-18 17:25:57 +02:00
973d25f467 Merge pull request #986 from resin-io/sdk-references-update
Update sdk sdk references in auth.coffee
2018-10-18 17:24:02 +02:00
0d06701e2f Update sdk references in notes.coffee
Change-type:patch
2018-10-18 16:22:35 +02:00
379f1cc217 Update sdk references in device.coffee
Change-type:patch
2018-10-18 16:08:29 +02:00
7b7ae4ff89 Update sdk sdk references in auth.coffee
Change-type:patch
2018-10-18 14:51:03 +02:00
8e83a401eb v7.10.6 2018-10-03 06:58:41 -07:00
2d1891a182 Merge pull request #976 from resin-io/975-fix-preload-examples
Fix formatting of preload examples
2018-10-03 15:56:56 +02:00
8df066df12 Fix formatting of preload examples
Based on https://github.com/resin-io/docs/pull/915 from @drjasonharrison-vp-eio

Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-10-03 15:31:24 +02:00
bd59f95e1a v7.10.5 2018-09-25 07:09:26 -07:00
2b982a1c0c Merge pull request #972 from resin-io/readme-typo
README: Fix typo
2018-09-25 15:08:01 +01:00
ab64fbc904 README: Fix typo
Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2018-09-25 13:35:35 +01:00
733b98f072 v7.10.4 2018-09-24 10:08:55 -07:00
7c538a3658 Merge pull request #967 from resin-io/966-register-print-uuid
device: When registering, print the uuid
2018-09-24 19:07:15 +02:00
8298ba5765 device: When registering, print the uuid
This restores the behavior from before #911,
which is useful from some users.

Closes #966

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablocarranza@gmail.com>
2018-09-24 15:18:40 +02:00
33a23773d8 v7.10.3 2018-09-19 09:17:52 -07:00
21a3b82845 Merge pull request #971 from resin-io/add-emulated-to-build-docs
Include --emulated in the example resin build parameters
2018-09-19 18:16:28 +02:00
8688eb5da0 Include --emulated in the example resin build parameters
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-09-19 15:34:29 +02:00
5b0ea9673f v7.10.2 2018-09-18 09:17:50 -07:00
44fd8adeba Merge pull request #970 from resin-io/969-resin-semver
dependencies: Update resin-semver version to support Balena OS
2018-09-18 17:15:09 +01:00
a5e03d55c3 dependencies: Update resin-semver version to support Balena OS
Connects to #969

Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2018-09-18 14:23:10 +01:00
80629322ea v7.10.1 2018-09-11 05:29:41 -07:00
946efbcb7f Merge pull request #965 from resin-io/964-drop-npm-deploy
Stop Travis deploying to npm (now handled by concourse)
2018-09-11 14:28:11 +02:00
be8a314d2b Stop Travis deploying to npm (now handled by concourse)
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-09-11 13:58:06 +02:00
0a7203cafe v7.10.0 2018-09-11 04:21:19 -07:00
786fed0151 Merge pull request #963 from resin-io/update-resin-cli-form
Update resin-cli-form to 2.x
2018-09-11 12:17:22 +01:00
9cd8228a20 Update resin-cli-form to 2.x
Change-type: minor
Signed-off-by: Pagan Gazzard <page@resin.io>
2018-09-10 18:31:51 +01:00
652b5f22dd v7.9.4 2018-09-10 06:34:48 -07:00
eed3c06789 Merge pull request #911 from resin-io/fix_pre_provision
Device api keys are no longer used in the registration process
2018-09-10 15:33:37 +02:00
3b283d4a98 Device api keys are no longer used in the registration process
Change-type: patch
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2018-09-10 12:30:51 +01:00
bc6b5ba7b3 Auto-merge for PR #952 via VersionBot
Fix configuration hangs with some images using a larger threadpool
2018-08-20 15:37:22 +00:00
74789ae88f v7.9.3 2018-08-20 15:29:02 +00:00
295d6dee74 Fix configuration hangs with some images by expanding the threadpool
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-20 17:06:26 +02:00
5010a1e312 Auto-merge for PR #946 via VersionBot
Add warning about re-enabling automatic updates
2018-08-15 21:39:23 +00:00
3c2f7ea622 v7.9.2 2018-08-15 21:31:24 +00:00
94f02f0ad8 Add warning about re-enabling automatic updates
Change-type: patch
Signed-off-by: Pagan Gazzard <page@resin.io>
2018-08-15 14:20:11 -07:00
375f84b24e Auto-merge for PR #942 via VersionBot
Fix errors in `getRequestStream` not being propogated
2018-08-15 18:08:59 +00:00
06c649dfd0 v7.9.1 2018-08-15 17:59:46 +00:00
71eca70a22 Fix errors in getRequestStream not being propogated
Change-type: patch
Signed-off-by: Pagan Gazzard <page@resin.io>
2018-08-14 18:21:10 -07:00
53c7bc622c Auto-merge for PR #903 via VersionBot
Support emulated and nocache options for remote builds
2018-08-09 14:52:03 +00:00
975ae45e49 v7.9.0 2018-08-09 14:42:30 +00:00
e7c68c1a5c Support emulated and nocache options for remote builds
Change-type: minor
Closes: #901
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-09 14:36:34 +01:00
5beeb78220 Auto-merge for PR #939 via VersionBot
Fix bug where the sudo helper failed in os initialize
2018-08-09 10:37:53 +00:00
c90ba7aa0f v7.8.6 2018-08-09 10:29:50 +00:00
802ccc1b9a Fix bug where the sudo helper failed in os initialize
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 12:11:26 +02:00
b6ef251625 Auto-merge for PR #934 via VersionBot
Add an env vars example config to the local push docs
2018-08-09 10:09:37 +00:00
fd707d6a07 v7.8.5 2018-08-09 10:01:55 +00:00
392cd8569f Make build trigger hash examples clearer
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 11:47:21 +02:00
e32eda26d9 Update .resin-sync.yml docs for local push and include example env vars
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 11:21:45 +02:00
d8aaccf80c Update typed-error to fix some TS complaints
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 11:21:45 +02:00
d5fd5f5f2d Auto-merge for PR #936 via VersionBot
Update klaw now that the fork changes has been finished & released
2018-08-02 10:37:40 +00:00
2cb69c12f1 v7.8.4 2018-08-02 10:29:33 +00:00
7c75346a1a Update klaw
The changes from our fork have now been completed and released

Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-01 16:43:26 +02:00
148d15b6d9 Auto-merge for PR #931 via VersionBot
Follow links found during builds
2018-07-25 14:07:19 +00:00
a46a79df59 v7.8.3 2018-07-25 13:58:28 +00:00
e350f9b335 Follow links found during builds
Change-Type: patch
2018-07-25 12:38:17 +02:00
bd00773f1b Auto-merge for PR #929 via VersionBot
Update reconfix to fix volume signature errors in local configure
2018-07-25 10:23:37 +00:00
ef3c7f0fd6 v7.8.2 2018-07-25 10:13:48 +00:00
f4f44f978e Update reconfix to fix volume signature errors in local configure
Change-Type: patch
2018-07-24 20:57:40 +02:00
442416efc3 Auto-merge for PR #930 via VersionBot
Be explicit about how much initial history log tailing includes
2018-07-20 18:07:00 +00:00
ef33ffedcf v7.8.1 2018-07-20 17:38:09 +00:00
430d4aeaa7 Be explicit about how much initial history log tailing includes
Change-Type: patch
2018-07-20 16:32:31 +02:00
171632f83f Auto-merge for PR #895 via VersionBot
Add join/leave commands to promote and move devices between platforms
2018-07-20 12:36:20 +00:00
1fa7141b58 v7.8.0 2018-07-20 10:40:22 +00:00
916cc36430 Lazily import resin-image-fs
If for whatever reason resin-image-fs is not importable — eg. if it’s built for another arch — any command that imports `helpers.ts` will just quit without any error/traceback.
2018-07-20 13:04:26 +03:00
27b877dd33 Forward root CA to device config if one is present 2018-07-19 22:34:31 +03:00
5cbe1c410f Add join/leave commands to promote and move devices between platforms
Both commands work with local devices by remotely invoking the `os-config` executable via SSH. This requires an as of yet unreleased resinOS (that will most likely be v2.14) and the commands ascertain compatibility merely by looking for the `os-config` executable in the device, and bail out if it’s not present.

`join` and `leave` accept a couple of optional arguments and implement a wizard-style interface if these are not given. They allow to interactively select the device and the application to promote to. If the user has no apps, `join` will offer the user to create one. `join` will also offer the user to login or create an account if they’re not logged in already without exiting the wizard.

`resin-sync` (that's used internally to discover local devices) requires admin privileges. If no device has been specified as an argument, the commands will launch the device scanning process in a privileged subprocess via two new internal commands: `internal sudo` and `internal scanDevices`. This avoids having the user to invoke the commands with sudo and only request escalation if truly needed. This commit also removes the dependency to “president”, implementing “sudo” functionality within the CLI.

Change-Type: minor
2018-07-19 22:18:02 +03:00
7846af390e Improve selectFromList function signature to be much more reusable 2018-07-19 21:53:43 +03:00
79d9ebc805 Auto-merge for PR #923 via VersionBot
Update OS & config actions to the MC SDK, and add a --version option
2018-07-17 15:43:30 +00:00
25b853c535 v7.7.4 2018-07-17 15:35:26 +00:00
a93141343f Update TypeScript to 2.8.1
Change-Type: patch
2018-07-17 16:48:14 +02:00
9a467c5ecd Pin all type modules 2018-07-17 15:59:31 +02:00
70be2ae596 Tweaks to config options handling after review 2018-07-17 15:38:38 +02:00
36eb0a108e Post-review tweaks to OS actions 2018-07-13 19:34:59 +02:00
0bf6fb1739 Add --version options to os configure & config generate
This is used to ensure the correct type of API key is used in all
configuration.

Change-Type: patch
2018-07-13 19:34:59 +02:00
892adf4c47 Update OS & config actions to the latest SDK
Fixes #915
Change-Type: patch
2018-07-13 19:34:59 +02:00
5d1d004b72 Auto-merge for PR #927 via VersionBot
Update the CLI deploy key since npm invalidated the old one
2018-07-13 17:21:18 +00:00
dea5a60b2d v7.7.3 2018-07-13 17:05:32 +00:00
652a1b7650 Update the deploy key since npm invalidated the old one
Change-Type: patch
2018-07-13 16:39:56 +02:00
350843af1e Auto-merge for PR #926 via VersionBot
Pin ext2fs to 1.0.7 to avoid temporary deployment issues
2018-07-13 11:40:25 +00:00
e04c4a8ee3 v7.7.2 2018-07-13 11:33:13 +00:00
9d0c3f7535 Pin ext2fs to 1.0.7 to avoid temporary deployment issues
Change-Type: patch
2018-07-13 13:20:53 +02:00
9561d4da2e Auto-merge for PR #925 via VersionBot
Update logs to use new v10 MC SDK
2018-07-12 13:59:28 +00:00
8296dcf946 v7.7.1 2018-07-12 13:52:10 +00:00
e62e8b88c2 Simplify logs promises after review 2018-07-12 15:38:27 +02:00
4388a248b9 Make sure we don't duplicate historical logs when streaming 2018-07-12 15:23:33 +02:00
f9cf0aaf23 Remove a couple of artifacts of the pubnub logs implementation 2018-07-12 15:10:16 +02:00
dc9ee09838 Update CLI to SDK v10 (include new API logs)
Change-Type: patch
2018-07-12 01:03:16 +02:00
7cb27283c5 Update logs action to use the MC SDK 2018-07-12 01:03:16 +02:00
10a9840b34 Auto-merge for PR #921 via VersionBot
Add --generate-device-api-key parameter to config generate
2018-07-11 04:28:25 +00:00
ce3e04bfe8 v7.7.0 2018-07-11 04:21:42 +00:00
52f93f8f12 Add --generate-device-api-key parameter to config generate
Change-Type: minor
2018-07-10 19:57:56 +02:00
af9e1a122d Auto-merge for PR #910 via VersionBot
Make local commands more resilient to unnamed containers
2018-06-28 16:26:11 +00:00
9017b8ec11 v7.6.2 2018-06-28 12:55:34 +00:00
bf4f687a2a Make local commands more resilient to unnamed containers
Change-Type: patch
2018-06-28 12:34:31 +02:00
9d4e6eb825 Auto-merge for PR #907 via VersionBot
Make sure 'resin push' is included in the CLI docs
2018-06-26 17:22:44 +00:00
fba4afb7d2 v7.6.1 2018-06-26 17:15:20 +00:00
8c74f784f7 Make sure 'resin push' is included in the docs
Fixes #906
Change-Type: patch
2018-06-26 19:00:20 +02:00
69ca1ffa59 Auto-merge for PR #896 via VersionBot
Support pinned release preloading
2018-06-20 17:00:12 +00:00
7d1b00877e v7.6.0 2018-06-20 16:50:01 +00:00
1a48fed1f7 Support pinned release preloading
Change-type: minor
Closes: #886
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-13 12:29:30 +01:00
bc86359e63 Auto-merge for PR #893 via VersionBot
Document Python native build dependency
2018-06-12 18:33:47 +00:00
f6822f1502 v7.5.2 2018-06-12 18:26:12 +00:00
398c34d842 Includes new prettier changes, and pin prettier to stop more appearing 2018-06-12 17:43:15 +02:00
72a893be95 Document Pyhton native build dependency
Change-Type: patch
2018-06-12 17:11:45 +02:00
7b23b0e103 Auto-merge for PR #887 via VersionBot
Add a multicontainer caveat to the env var commands
2018-06-01 11:10:33 +00:00
0ce7878042 v7.5.1 2018-06-01 10:49:15 +00:00
da8483e6a6 Add a multicontainer caveat to the env var commands
Change-Type: patch
2018-06-01 12:37:29 +02:00
16f70fd946 Auto-merge for PR #883 via VersionBot
Update resin-compose-parse dependency version
2018-05-31 16:16:47 +00:00
78aa898b37 v7.5.0 2018-05-31 16:07:38 +00:00
b7f94a222d Update resin-compose-parse dependency version to 1.10.2
Change-type: minor
2018-05-30 11:57:04 -03:00
7bea2c26b8 Auto-merge for PR #879 via VersionBot
Update SDK for device commands, so we show new device dashboard URLs
2018-05-24 14:13:01 +00:00
7c178b8095 v7.4.1 2018-05-24 14:03:02 +00:00
865f085094 Make sure we still show the device commit, despite API changes 2018-05-24 14:43:45 +01:00
28fe69fe94 Update to latest SDK in lots of easy device commands 2018-05-18 20:05:24 +02:00
232cf8d426 Update SDK in resin device(s) to ensure the dashboard URL is correct
Fixes #768

Change-Type: patch
2018-05-18 20:00:40 +02:00
22e74983b0 Auto-merge for PR #868 via VersionBot
Add push command which starts a build on remote resin servers
2018-05-10 12:44:43 +00:00
c88dd2257a v7.4.0 2018-05-10 12:28:32 +00:00
439d8d396f Add push command which starts a build on remote resin servers
Change-type: minor
Connects-to: #843
2018-05-10 11:43:45 +01:00
6d8086c09b Auto-merge for PR #874 via VersionBot
Handle failed requires & missing bindings
2018-05-03 17:56:53 +00:00
e85f252f29 v7.3.8 2018-05-03 17:49:06 +00:00
4b818ad51c Style improvements after review 2018-05-03 18:59:28 +02:00
c2518448a3 Catch require errors and provide helpful instructions
Change-Type: patch
2018-05-03 16:01:40 +02:00
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
0ac599d20c Auto-merge for PR #871 via VersionBot
Pin node types to v9.0.0 to avoid build errors with transient dependencies
2018-04-30 15:25:23 +00:00
7d7074e6b7 v7.3.7 2018-04-30 15:18:31 +00:00
35ca34d07d Pin node types to v9.0.0 to avoid build errors with transient dependencies
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-04-30 16:09:12 +01:00
90d7316b4c Auto-merge for PR #870 via VersionBot
Update resin-image-fs to stop non-config commands failing in node 10
2018-04-30 09:54:09 +00:00
904b4e96d9 v7.3.6 2018-04-30 09:34:40 +00:00
2c46c59a79 Update resin-image-fs to stop non-config commands failing in node 10
This doesn't fix actual usage of image fs, just makes it possible to
stop commands that don't use it from failing entirely.

Connects-To: #869
Change-Type: patch
2018-04-30 11:14:39 +02:00
297ff86895 Auto-merge for PR #858 via VersionBot
Don't show Docker container status from devices, as it can be wrong
2018-04-18 19:08:16 +00:00
a154401424 v7.3.5 2018-04-18 19:00:21 +00:00
ad2713fc00 Don't show Docker container status from devices, as it can be wrong
The status includes a description of how long the device has been in
this state (Up 6 weeks), which is frequently wrong as when the device
first starts up its clock isn't up to date. It's confusing and messy,
best to just remove it entirely.

Fixes #828
Change-Type: patch
2018-04-18 20:16:44 +02:00
6388cfaf40 Auto-merge for PR #865 via VersionBot
Include resin compose schemas in the standalone build
2018-04-18 16:41:50 +00:00
167f38e342 v7.3.4 2018-04-18 16:27:52 +00:00
919b3c3435 Include resin compose schemas in the standalone build
Fixes #844
Change-Type: patch
2018-04-18 13:34:35 +02:00
2e1ab22173 Auto-merge for PR #861 via VersionBot
727 sentry improvements
2018-04-17 14:46:13 +00:00
0a23563d7e v7.3.3 2018-04-17 14:01:51 +00:00
37e4ec6364 Rename expectedError to exitWithExpectedError 2018-04-17 15:18:06 +02:00
6a8b947c2e Don't report lots of user input errors
Change-Type: patch
2018-04-17 15:18:06 +02:00
a16ac37625 Include Sentry breadcrumbs for context in error reports
Change-Type: patch
2018-04-17 15:18:06 +02:00
cf4c7826b2 Update to Sentry 2.x
Change-Type: patch
2018-04-17 15:18:06 +02:00
a0a26f0a1e Auto-merge for PR #862 via VersionBot
Update Dockerode to fix local push issue in standalone builds
2018-04-16 16:21:22 +00:00
a921139a12 v7.3.2 2018-04-16 15:21:33 +00:00
36da7b66c8 Update Dockerode to fix local push issue in standalone builds
Connects-To: #824
Change-Type: patch
2018-04-16 16:43:17 +02:00
3aa87544eb Auto-merge for PR #849 via VersionBot
Update resin-compose-parse to v1.8.1 to fix a problem parsing ports
2018-04-13 19:43:58 +00:00
6121fa505e v7.3.1 2018-04-13 19:38:01 +00:00
a5ba5befd1 Update resin-compose-parse to v1.8.1 to fix a problem parsing ports
Connects-to: https://github.com/resin-io/resin-supervisor/issues/618

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-04-13 11:17:18 -07:00
b7214a306c Auto-merge for PR #854 via VersionBot
Add 'api-key generate' command
2018-04-12 10:24:39 +00:00
d7616e941a v7.3.0 2018-04-12 10:06:09 +00:00
834a2f1e4d Warn user that api keys will not be shown again in future 2018-04-11 19:31:03 +02:00
0e5f2fe748 Remove now-unused stream-to-promise dependency 2018-04-11 19:30:29 +02:00
e0bcb5e0b9 Always call done() for api key generation, not just if we're successful 2018-04-11 19:27:58 +02:00
59d4890eae Add 'api-key generate' command
Change-Type: minor
2018-04-10 19:21:37 +02:00
51da5360da Auto-merge for PR #852 via VersionBot
Explicitly depend on tar-stream
2018-04-10 14:14:38 +00:00
2655aef28b v7.2.4 2018-04-10 13:49:09 +00:00
45d3a7a124 Explicitly depend on tar-stream
Change-Type: patch
2018-04-10 13:10:25 +02:00
662e4f8940 Merge pull request #853 from resin-io/document-version-rec
Correct documented node version requirement to 6+
2018-04-10 13:10:02 +02:00
c06993cb8e Correct documented node version requirement to 6+
Change-Type: patch
2018-04-09 16:55:36 +02:00
a650f30ce8 Auto-merge for PR #847 via VersionBot
Add a fast build script to package.json
2018-04-06 17:11:31 +00:00
0a924b2dcb v7.2.3 2018-04-06 16:27:32 +00:00
89f62683ce Add a fast build script to package.json
This doesn't run a linter or any documentation generation, aiding in
quick development time.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-04-06 15:40:08 +01:00
143d88f3df Auto-merge for PR #846 via VersionBot
Throw a clear error when logging in with an invalid token
2018-04-04 19:34:56 +00:00
d166a65422 v7.2.2 2018-04-04 18:56:26 +00:00
dd268993b3 Throw a clear error when logging in with an invalid token
Change-Type: patch
2018-04-04 15:43:34 +02:00
13a35b288f Auto-merge for PR #839 via VersionBot
Update docker-qemu-transpose to avoid the broken 0.4.1 release
2018-03-29 14:47:30 +00:00
81e653d31b v7.2.1 2018-03-29 13:52:06 +00:00
875ec8b8bd Update docker-qemu-transpose to avoid the broken 0.4.1 release
Change-Type: patch
2018-03-29 15:28:56 +02:00
989df9b857 Auto-merge for PR #835 via VersionBot
Initial support for api keys in the CLI
2018-03-29 10:15:31 +00:00
0829d3c176 v7.2.0 2018-03-29 10:09:08 +00:00
ce64889b04 Clarify isTokenValid logic 2018-03-29 11:11:25 +02:00
d3a0bfc5f6 Fix auth utils tests to work with new SDK 2018-03-29 11:11:25 +02:00
e965c603d2 Use spec test reporter, so we can debug with output 2018-03-29 11:11:25 +02:00
0e2fb8c96c Promisify auth utils tests 2018-03-29 11:11:25 +02:00
2db1d84d3c Do not require a login for builds
Fixes: #578
Change-Type: patch
2018-03-29 11:11:25 +02:00
12a1916007 Allow (experimental!) login with API keys
Change-Type: minor
2018-03-29 11:11:25 +02:00
b4526e9895 Auto-merge for PR #838 via VersionBot
Fix build emulation for multi-stage builds
2018-03-29 09:03:40 +00:00
a2d867c860 v7.1.6 2018-03-29 08:56:07 +00:00
05b1c37379 Fix build emulation for multi-stage builds
Fixes #814
Change-Type: patch
2018-03-29 10:18:31 +02:00
906cfe9268 Auto-merge for PR #834 via VersionBot
Fix crash when an app is not specified for build command
2018-03-28 12:01:10 +00:00
3c8054faa7 v7.1.5 2018-03-27 17:51:36 +00:00
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
2bbbbf6fdd Auto-merge for PR #832 via VersionBot
Upgrade resin-sync to pull in the fix for #824
2018-03-26 16:31:46 +00:00
9cce4001af v7.1.4 2018-03-26 16:09:22 +00:00
2e944cf2f4 Upgrade resin-sync to pull in the fix for #824
Change-Type: patch
2018-03-26 17:39:47 +02:00
2b0143775c Auto-merge for PR #831 via VersionBot
Prefix all pine options with '$' in preload to avoid pine warnings.
2018-03-23 15:57:54 +00:00
49fec7d8f2 v7.1.3 2018-03-23 15:49:16 +00:00
ca1ac2bb83 Prefix all pine options with '$' in preload to avoid pine warnings.
Change-Type: patch
2018-03-23 15:20:18 +00:00
50b1a7e6b0 Auto-merge for PR #830 via VersionBot
Update resin-preload to 6.2.0 and resin-sdk to 9.0.0-beta16
2018-03-23 13:56:14 +00:00
69ce2c0473 v7.1.2 2018-03-23 13:49:24 +00:00
a3b446dbe7 Update resin-preload to 6.2.0 and resin-sdk to 9.0.0-beta16
Change-Type: patch
2018-03-23 13:41:16 +00:00
1032d9927f Auto-merge for PR #827 via VersionBot
Remove explicit anchor links in CLI docs
2018-03-22 18:03:07 +00:00
12e8a50abc v7.1.1 2018-03-22 17:06:07 +00:00
a4142097f8 Merge branch 'master' into doc-headings 2018-03-22 09:17:32 -05:00
b388ccb6f3 Auto-merge for PR #818 via VersionBot
Restore legacy deployment method
2018-03-22 11:43:59 +00:00
e011502b7e v7.1.0 2018-03-22 11:36:41 +00:00
4f167cb836 Address review feedback 2018-03-22 13:26:47 +02:00
9455d438e2 Formatting fixes 2018-03-22 13:26:47 +02:00
a356ecf9b6 Remove unused code 2018-03-22 13:26:47 +02:00
066ac591ac Warn early if deploying a multicontainer project to an incompatible app
Change-Type: patch
2018-03-22 13:26:47 +02:00
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
ee75ff2753 Remove explicit anchor links in CLI docs
Our docs markdown renderer doesn't process explicit anchor tags, as it generates its own. The script that generates the markdown has been updated to not include these tags and to properly build the TOC links.

Change-type: patch
2018-03-20 13:10:07 -05:00
e4c9defb70 Auto-merge for PR #821 via VersionBot
Update resin-preload to 6.1.2
2018-03-20 15:54:28 +00:00
bb102c1918 v7.0.7 2018-03-20 15:44:13 +00:00
24ebe2946c Update resin-preload to 6.1.2
Connects-To: #820

Change-Type: patch
2018-03-20 15:22:59 +00:00
ba82b1fa27 Auto-merge for PR #815 via VersionBot
Build/deploy commands improvements
2018-03-20 10:43:31 +00:00
e3b145e7b7 v7.0.6 2018-03-20 10:33:01 +00:00
242c3731ee Remove redundant import 2018-03-19 20:52:51 +02:00
5f7eee8eac Make sure image name is all lowercase
Change-Type: patch
2018-03-19 20:52:51 +02:00
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
e5fb954645 Auto-merge for PR #801 via VersionBot
add bash completions
2018-03-15 20:03:33 +00:00
13f76dc020 v7.0.5 2018-03-15 18:51:46 +00:00
b409bdcc73 add blurb about bash completion
Add brief information about tab completions for bash and instructions to enable it.
2018-03-15 18:06:04 +01:00
8c3cb3f585 Add bash completions
This contains bash completion functionality for the resin CLI, including completion for sub-commands.

Change-type: patch
2018-03-15 18:05:50 +01:00
76a8b4df50 Auto-merge for PR #813 via VersionBot
Properly generate consistent working anchors for both our md output & resin docs
2018-03-15 12:09:16 +00:00
a03680311d v7.0.4 2018-03-15 12:01:05 +00:00
6ee36cb5c7 Generate consistent working anchors for both our md output & resin docs
Change-Type: patch
2018-03-15 11:40:29 +01:00
5625326c65 Auto-merge for PR #812 via VersionBot
Fix getting window size when there’s no TTY attached
2018-03-15 08:54:19 +00:00
b912419839 v7.0.3 2018-03-15 08:47:28 +00:00
fe01ead023 Fix getting window size when there’s no TTY attached
Change-Type: patch
2018-03-15 10:30:54 +02:00
229c105d0c Auto-merge for PR #807 via VersionBot
Update full CLI docs with recent installation improvements too
2018-03-13 12:00:31 +00:00
b6e044345f v7.0.2 2018-03-13 10:47:55 +00:00
d9906121e1 Update full CLI docs with recent installation improvements too
Change-Type: patch
2018-03-12 22:17:20 +01:00
3e019f7f34 Remove leftover capitanodoc.coffee file (it's now TS) 2018-03-12 20:06:44 +01:00
eb34cb6f27 Auto-merge for PR #805 via VersionBot
Recommend unsafe-perm to fix some install issues and cleanup dependencies after MC
2018-03-12 16:36:28 +00:00
3a3178bcb9 v7.0.1 2018-03-12 15:36:10 +00:00
cdf6580ecc Recommend using unsafe-prem to avoid permission issues on install
Change-Type: patch
2018-03-12 13:36:24 +01:00
c42bc74f1f Remove unnecessary resin-cli-auth dependency
Change-Type: patch
2018-03-12 11:41:58 +01:00
35fd79f577 Remove (duplicated) runtime ts-node dependency 2018-03-12 11:41:14 +01:00
4ef0682e5a Auto-merge for PR #792 via VersionBot
Multicontainer
2018-03-09 22:12:00 +00:00
d0b7047189 v7.0.0 2018-03-09 22:04:51 +00:00
ae3f936b66 Update resin-preload to v6.0.0 2018-03-09 21:53:34 +00:00
1ef492809b Update resin-preload to v6.0.0-beta11 2018-03-09 20:40:13 +00:00
5bf9dd3a9d Update resin-preload to v6.0.0-beta10 2018-03-09 17:50:20 +00:00
b18a66f66b Update resin-preload to v6.0.0-beta9 2018-03-09 17:02:44 +00:00
1dadfdc699 Fix some formatting to make prettier+resin-lint happy 2018-03-07 16:16:07 +01:00
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
96116aeaec Fix invoking undefined method
Have no idea how this used to work.
2018-03-07 14:47:16 +00:00
7fd31b6a64 Update YAML parser
New version is 3.10.0
2018-03-07 14:47:16 +00:00
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
4b9ccae442 Update bundle-resolve and docker-build to latest
This brings in maintainance improvements.

New versions are:

- resin-bundle-resolve: 0.5.1
- resin-docker-build: 0.6.2
2018-03-07 14:46:35 +00:00
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
163684e3a9 Update dashboard login to use the multicontainer SDK
Change-Type: patch
2018-03-07 14:46:35 +00:00
f698f561c9 Multicontainer preload: Update resin-preload to 6.0.0-beta4
Change-Type: minor
2018-03-07 14:46:35 +00:00
cb207f18a5 Update the keys action to use the multicontainer SDK
Change-Type: patch
2018-03-07 14:46:34 +00:00
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
a82af1d2d1 Auto-merge for PR #802 via VersionBot
Fix CLI prettier configuration to avoid linting errors
2018-03-07 14:46:08 +00:00
ac7d51ad80 v6.13.5 2018-03-07 14:38:49 +00:00
797a739c92 Fix prettier configuration to avoid linting errors
Change-Type: patch
2018-03-05 16:02:09 +01:00
666b59b463 Auto-merge for PR #796 via VersionBot
Fix issue where emulated builds broke Docker `ENV` commands
2018-02-22 18:30:14 +00:00
a83d9a070c v6.13.4 2018-02-22 18:23:29 +00:00
7637377471 Fix issue where emulated builds broke Docker ENV commands
Connects-to: #795
Change-type: patch
2018-02-22 18:12:17 +00:00
6515f88d92 Auto-merge for PR #793 via VersionBot
Tweak TS & add missing deps that may cause build failures in some envs
2018-02-20 22:07:21 +00:00
92534b9c82 v6.13.3 2018-02-20 21:30:39 +00:00
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
3d28118f3e Auto-merge for PR #794 via VersionBot
Ensure login does not wait for the browser process to close
2018-02-20 19:00:32 +00:00
04adfde064 v6.13.2 2018-02-20 17:12:45 +00:00
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
cf95870d9d Auto-merge for PR #786 via VersionBot
Assorted tiny fixes
2018-02-07 12:07:01 +00:00
55f8876bcc v6.13.1 2018-02-07 11:59:58 +00:00
9fb66186f0 Move to the correct coffeescript (no hyphen) dependency
Change-Type: patch
2018-02-07 11:20:49 +01:00
da8fe99ca4 Add typings for 'ent'
Change-Type: patch
2018-02-07 11:20:08 +01:00
20374fde36 Auto-merge for PR #777 via VersionBot
Add support for Balena in local ssh
2018-02-06 11:40:40 +00:00
5131f722a7 v6.13.0 2018-02-06 11:34:29 +00:00
1ef0a1028f Add support for Balena in local ssh
Change-Type: minor
2018-02-06 12:05:28 +01:00
0fd1f04eda Auto-merge for PR #781 via VersionBot
Switch back to upstream global-tunnel-ng
2018-02-05 19:07:08 +00:00
5c0ba5d06c v6.12.9 2018-02-05 19:00:36 +00:00
d9532b6fa0 Switch back to upstream global-tunnel-ng
Connects-To: #780

Change-Type: patch
2018-02-05 15:55:26 +00:00
b96065514f Auto-merge for PR #774 via VersionBot
Fix uuid params being parsed a numbers
2018-02-03 15:58:03 +00:00
0e9b8e4140 v6.12.8 2018-02-03 15:50:09 +00:00
d1c773360f Fix uuid params being parsed a numbers
Connects-To: #489
Change-Type: patch
2018-02-01 17:48:01 +02:00
74538bba8d Auto-merge for PR #767 via VersionBot
Add 'or mounted resinOS image'
2018-01-30 18:10:12 +00:00
64c95e3811 v6.12.7 2018-01-30 17:29:59 +00:00
33fd70291a Add 'or mounted resinOS image'
Connects-To: #764

Change-Type: patch
2018-01-30 17:30:18 +01:00
0cb4bc951a Auto-merge for PR #759 via VersionBot
Don't use the deprecated 'os configure' format in internal calls
2018-01-29 14:56:00 +00:00
3761ab9610 v6.12.6 2018-01-29 14:44:44 +00:00
8c29bba108 Don't use the deprecated 'os configure' format in internal calls
Change-Type: patch
2018-01-16 17:54:46 +01:00
4e41261237 Auto-merge for PR #754 via VersionBot
Fix breakage in deploy command
2018-01-11 11:32:17 +00:00
77529ef3b1 v6.12.5 2018-01-11 10:16:56 +00:00
0ba96adbbc Fix breakage in deploy command from recent TS conversion
Change-Type: patch
2018-01-11 10:33:08 +01:00
7df277c0bc Auto-merge for PR #753 via VersionBot
Add prettier
2018-01-10 10:18:18 +00:00
c94f7b10bd v6.12.4 2018-01-10 09:48:26 +00:00
83a76f7d6f Start using Prettier
Change-Type: patch
2018-01-10 09:23:00 +01:00
6c988241eb Move capitanodoc into the automation folder 2018-01-10 08:41:19 +01:00
29145dfc2d Auto-merge for PR #743 via VersionBot
Start seriously converting the CLI to TypeScript
2018-01-09 22:37:41 +00:00
4b74e8ec70 v6.12.3 2018-01-09 21:00:55 +00:00
612012aff8 Lots of small TypeScript tweaks & clarifications from review 2018-01-09 17:14:49 +01:00
6ab60d0ccd Avoid awkward multiline strings in doc generation code 2018-01-09 17:14:49 +01:00
6daed83d88 Lint TypeScript and CoffeeScript with resin-lint
Change-Type: patch
2018-01-09 17:14:49 +01:00
f25442c036 Move documentation generation to TypeScript
Change-Type: patch
2018-01-09 17:14:49 +01:00
ffffd447f2 Convert most of utils to TypeScript
Change-Type: patch
2018-01-09 17:14:48 +01:00
4b511c47f0 Start on some easy TS conversion 2018-01-09 17:14:48 +01:00
158d471a98 Auto-merge for PR #751 via VersionBot
Convert windows paths to posix when passing to tar
2018-01-09 15:33:28 +00:00
107a90395c v6.12.2 2018-01-09 14:03:45 +00:00
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
810ca78215 Auto-merge for PR #744 via VersionBot
Fix deprecation warning for os configure, when passing a bare UUID
2018-01-02 10:58:30 +00:00
eb945b3315 v6.12.1 2018-01-02 10:49:06 +00:00
34f24fe331 Fix deprecation warning for os configure, when passing a bare UUID
Change-Type: patch
2017-12-22 16:07:19 +01:00
743392017d Auto-merge for PR #737 via VersionBot
Add ssh option for direct host OS access
2017-12-19 08:45:56 +00:00
15b877f005 v6.12.0 2017-12-19 08:37:19 +00:00
0653769156 fixed example 2017-12-18 17:03:16 +01:00
3ed319872a refactored 2017-12-18 17:03:16 +01:00
ee124671d8 mention Resin OS version requirement 2017-12-18 17:03:16 +01:00
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
fdd253f042 Auto-merge for PR #729 via VersionBot
Standalone binary for Resin-CLI
2017-12-18 15:06:13 +00:00
1a15fdd2f0 v6.11.0 2017-12-18 14:48:09 +00:00
2c66280b3f Build standalone zips into a separate folder 2017-12-18 15:03:17 +01:00
778c39d947 Ensure MDNS service definitions are included in standalone binaries 2017-12-18 14:55:07 +01:00
fa15addfb2 Add standalone install instructions to the readme 2017-12-18 14:55:07 +01:00
afbb9474b7 Use proper strict settings for automation TS 2017-12-18 14:55:07 +01:00
0acb4f8cb1 Fix docs generation when building on windows
Change-Type: patch
2017-12-18 14:55:07 +01:00
08de0938a0 Autodeploy built standalone binaries for all platforms to github
Change-Type: minor
2017-12-18 14:55:07 +01:00
2c9b80c177 Add manual script to deploy built CLI binaries to GitHub 2017-12-18 14:55:07 +01:00
e8c19df8c9 Set up a script to automate builds, and support native extensions 2017-12-18 14:55:07 +01:00
7681003512 Package the CLI into a standalone runnable binary
This has no native modules yet, which means it works on Linux,
but ignoring any ext4 image data. Drivelist will fail for
some windows operations, but most other things should work.

This is only building a folder with a runnable binary, this needs
packaging before it can be distributable.

Change-Type: minor
2017-12-18 14:55:07 +01:00
dba8db19cb Move from open to opn
Change-Type: patch
2017-12-18 14:55:07 +01:00
d199cdf088 Auto-merge for PR #730 via VersionBot
Ensure logout works even with invalid credentials, or if not logged in
2017-12-15 17:52:38 +00:00
f2840c5ca4 v6.10.3 2017-12-15 17:48:25 +00:00
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
41ff793372 Auto-merge for PR #721 via VersionBot
Inline the entire resin-cli-auth module
2017-11-27 17:28:43 +00:00
e4432d1a90 v6.10.2 2017-11-27 17:25:41 +00:00
bd6cb04a2b Replace underscore.string usage with lodash 2017-11-27 12:03:04 +02:00
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
f106b95be2 Auto-merge for PR #720 via VersionBot
Start adding TypeScript to the CLI and stop committing build output
2017-11-27 09:35:42 +00:00
6fbe602b77 v6.10.1 2017-11-27 09:32:58 +00:00
dc549a665b Update to latest latest typescript 2017-11-27 11:25:20 +02:00
46ca62db3e Include lib/ in published package too, to enable sourcemaps 2017-11-23 19:29:07 +02:00
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
93d1e3a4a1 Rename gulp build step to coffee 2017-11-23 19:24:03 +02:00
ff2ee59dae Don't commit raw JS build output
This lets us avoid lots of potential conflicts, issues, and confusion,
and keeps reviews simpler and cleaner.

Change-Type: patch
2017-11-23 19:23:59 +02:00
6217b4a6b5 Auto-merge for PR #718 via VersionBot
Allow configuring images for both device and just applications
2017-11-17 10:46:33 +00:00
67fcc6791c v6.10.0 2017-11-17 10:43:54 +00:00
49d78c56fa Print a deprecation message if you use the old os configure format 2017-11-16 19:51:34 +01:00
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
eef0d9cdbe Print help even for expected errors
Change-Type: patch
2017-11-16 19:51:17 +01:00
08c40195e5 Make sure everything uses the same shared deviceApiKey option 2017-11-16 19:09:20 +01:00
7e306fbce8 Auto-merge for PR #714 via VersionBot
Allow generating device configurating non-interactively
2017-11-16 14:13:08 +00:00
656656bec1 v6.9.0 2017-11-16 14:09:40 +00:00
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
f7075d7db9 Fix issue where network settings were not used by config generate
Change-Type: patch
2017-11-16 15:03:49 +01:00
2a2d621d6a Auto-merge for PR #717 via VersionBot
Remove resin promote command (which has never worked) to wait for larger resinOS provisioning updates
2017-11-16 13:59:18 +00:00
2db6cdd063 v6.8.3 2017-11-16 13:55:44 +00:00
1fafe64579 Remove resin promote command (which has never worked) to wait for larger resinOS provisioning updates
This would be a major change if the command was ever successful, but it
appears it hasn't ever worked for any available published version of
ResinOS, so it's not possible that there are users relying on it.

Change-Type: patch
2017-11-15 14:46:22 +01:00
6562eb544c Auto-merge for PR #713 via VersionBot
Fix 'cannot read property R_OK of undefined' error in Node >=6 <6.3
2017-11-14 10:30:30 +00:00
3763bf0712 v6.8.2 2017-11-14 10:27:31 +00:00
890a02e2c8 Fix 'cannot read property R_OK of undefined' error in Node >=6 <6.3
Change-Type: patch
2017-11-11 12:29:49 +01:00
427664c729 Auto-merge for PR #711 via VersionBot
Avoid AmbiguousApplication errors in device register when an id is used
2017-11-09 15:20:12 +00:00
727a245715 v6.8.1 2017-11-09 15:16:17 +00:00
a2635f47ee Avoid AmbiguousApplication errors in device register when an id is used
Change-Type: patch
Connects-To: #665
2017-11-09 16:03:06 +01:00
d316f67367 Auto-merge for PR #706 via VersionBot
Update resin-preload to 5.0.0 to handle jetson-tx2
2017-10-27 14:39:30 +00:00
ebd1d7e370 v6.8.0 2017-10-27 14:32:34 +00:00
eef192ff68 Allow preloading jetson-tx2 images, improve flasher images detection and remove the --dont-detect-flasher-type-images option.
* update resin-preload to 5.0.0

Connects-To: #705

Change-Type: minor
2017-10-27 12:14:27 +02:00
36d3c92006 Auto-merge for PR #702 via VersionBot
Add preload to the CLI docs
2017-10-25 12:25:50 +00:00
68e31468cc v6.7.4 2017-10-25 11:52:10 +00:00
dfd8b6717d Add preload to the CLI docs
Change-Type: patch
2017-10-25 13:17:07 +02:00
10d688c02d Auto-merge for PR #701 via VersionBot
Allow specifying `--commit=latest` for `resin preload`
2017-10-25 10:21:02 +00:00
737e961979 v6.7.3 2017-10-25 10:17:42 +00:00
3bca36c277 Allow specifying --commit=latest for resin preload
Connects-To: #700

Depends-On: https://github.com/resin-io/resin-preload/pull/137

Change-Type: patch
2017-10-25 12:09:08 +02:00
24b2c83e92 Auto-merge for PR #699 via VersionBot
Make update-notifier more resilient and ensure it obeys NO_UPDATE_NOTIFIER
2017-10-24 18:01:07 +00:00
266870018a v6.7.2 2017-10-24 17:57:39 +00:00
80bc044415 Make update-notifier more resilient and ensure it obeys NO_UPDATE_NOTIFIER, by updating it
Connects-To: #698
Change-Type: patch
2017-10-24 19:31:16 +02:00
563628a5a9 Auto-merge for PR #697 via VersionBot
Respect the --dont-check-device-type option, fix error message
2017-10-24 14:59:21 +00:00
385e2c7f7a v6.7.1 2017-10-24 14:56:48 +00:00
19ce4c4cdb Respect the -dont-check-device-type option, fix error message
Connects-To: #696

Change-Type: patch
2017-10-24 16:45:36 +02:00
0b26fda89c Auto-merge for PR #487 via VersionBot
Device api keys
2017-10-18 18:20:15 +00:00
3f692ecbb0 v6.7.0 2017-10-18 18:18:01 +00:00
2d43e47610 Add device api keys warning on device register and os configure 2017-10-18 13:43:16 +02:00
a8f1d16b26 Make resin os configure safe with device keys for all ResinOS versions 2017-10-18 13:43:16 +02:00
8e95757f47 Make resin config generate safe for all ResinOS versions 2017-10-18 13:43:16 +02:00
3fd4f328ab Added a device api key parameter to the os configure command.
Change-Type: minor
2017-10-18 13:43:16 +02:00
97eaf174ec Added a --device-api-key option to the config generate command.
Change-Type: minor
2017-10-18 13:43:16 +02:00
2ef56a9a3f Added a --device-api-key option to the device register command.
Change-Type: minor
2017-10-18 13:43:16 +02:00
93818b1a98 Auto-merge for PR #689 via VersionBot
Fix issue where `os download` would always download prod images
2017-10-18 10:46:19 +00:00
ce70102378 v6.6.13 2017-10-18 10:41:28 +00:00
0e4c6c459c Fix issue where os download would always download prod images
This also adds support for submodules using resin-sdk shared options
rather than resin-sdk-preconfigured.

Change-Type: patch
Connects-To: #688
2017-10-17 21:20:35 +02:00
6b96fe37ba Auto-merge for PR #687 via VersionBot
Update resin-preload to 4.0.2 to support preloading Edison images
2017-10-16 18:55:22 +00:00
e9c7e0e924 v6.6.12 2017-10-16 18:51:54 +00:00
119fa78927 Update resin-preload to 4.0.2 to support preloading Edison images
Change-Type: patch
2017-10-16 19:27:12 +02:00
dad655c9ec Auto-merge for PR #685 via VersionBot
Document how to `resin deploy` to an app as a collaborator
2017-10-13 14:29:14 +00:00
8af392029f v6.6.11 2017-10-13 14:26:20 +00:00
82888de036 Document how to resin deploy to an app as a collaborator
Change-Type: patch
2017-10-13 16:13:46 +02:00
b4a56e1541 Auto-merge for PR #676 via VersionBot
Ensure hostname truly is optional when configuring device images
2017-10-09 10:14:35 +00:00
19b0ec7f8b v6.6.10 2017-10-09 10:12:22 +00:00
3df7bfe700 Ensure hostname truly is optional when configuring device images
Change-Type: patch
2017-10-09 12:03:31 +02:00
d1fd5a6bff Auto-merge for PR #678 via VersionBot
Fix resin preload --splash-image argument handling
2017-10-06 09:22:01 +00:00
43a7e3ddf4 v6.6.9 2017-10-06 09:19:54 +00:00
10976bed43 Fix resin preload --splash-image argument handling
Connects-To: #677

Change-Type: patch
2017-10-06 11:16:06 +02:00
c187c113d9 Auto-merge for PR #675 via VersionBot
Ensure whoami failures (i.e. present but broken tokens) at startup don't break commands
2017-10-06 07:45:00 +00:00
f7c0258145 v6.6.8 2017-10-06 07:42:39 +00:00
eb729d149e Ensure analytics failures (e.g. from broken tokens) at startup don't break commands
Change-Type: patch
2017-10-05 19:03:01 +02:00
39ac28d4ef Auto-merge for PR #666 via VersionBot
Add windows instructions to fix node-gyp installs
2017-09-22 17:17:51 +00:00
989877d541 v6.6.7 2017-09-22 17:14:37 +00:00
3f3af216fd Add instructions for an admin console 2017-09-22 20:10:50 +03:00
9aef632afd Update to resin-sync, which fixes local push on windows
Change-Type: patch
2017-09-22 19:17:28 +03:00
ef6e00bcea Add windows instructions to fix node-gyp installs
Change-Type: patch
2017-09-22 16:27:24 +03:00
55a7dccc74 Merge pull request #659 from resin-io/catch-uncommitted
Move to using the catch-uncommitted npm package
2017-09-15 19:45:45 +02:00
62035fac83 Move to using the catch-uncommitted npm package 2017-09-15 14:36:33 +02:00
950201973b Auto-merge for PR #655 via VersionBot
Create ISSUE_TEMPLATE.md
2017-09-11 14:53:51 +00:00
e431083e84 v6.6.6 2017-09-11 14:45:51 +00:00
1ff9cf02d7 Create ISSUE_TEMPLATE.md
Fixes #529
Change-Type: patch
2017-09-04 20:18:23 +03:00
bd3b9e32a9 Auto-merge for PR #643 via VersionBot
Fix lodash bugs in device move & quickstart
2017-08-31 12:30:48 +00:00
5a620d6c9e v6.6.5 2017-08-31 12:28:28 +00:00
492e35e5c2 Fix lodash bugs in device move & quickstart
Change-Type: patch
2017-08-31 20:22:36 +08:00
8980bc704a Auto-merge for PR #644 via VersionBot
Check for uncommitted output
2017-08-31 12:21:32 +00:00
8b9e78d645 v6.6.4 2017-08-31 12:18:41 +00:00
8f0131cf50 Tweak catch-uncommitted-output script for clarity, after review 2017-08-31 20:12:06 +08:00
47407a84fb Use only npm 4, for now 2017-08-31 20:12:06 +08:00
d858f3fd90 Make sure the catch-uncommitted-output script fails if the build fails 2017-08-31 20:12:06 +08:00
a36f765f1b Catch uncommitted build output automatically in Travis
Connects-To: #573
Change-Type: patch
2017-08-31 20:12:06 +08:00
fd308a5131 Auto-merge for PR #641 via VersionBot
Update README to link to the full CLI command documentation
2017-08-31 11:47:53 +00:00
3052100973 v6.6.3 2017-08-31 11:44:39 +00:00
cfdd4d3d69 Update README to link to the full CLI command documentation
Also update description to match package.json & repo, and remove
quickstart (since it's unstable at the moment).

Change-Type: patch
2017-08-31 19:37:19 +08:00
0a3123a9cf Auto-merge for PR #642 via VersionBot
Use DOCKER_HOST from env if possible, and no connection options are available
2017-08-31 07:24:30 +00:00
5474666f9e v6.6.2 2017-08-31 07:22:43 +00:00
2bbd45e867 Use DOCKER_HOST from env if possible, and no connection options are available
Connects-to: #625
Change-Type: patch
2017-08-31 15:18:32 +08:00
e8c4a9abfd Auto-merge for PR #650 via VersionBot
Update resin-preload to 3.1.4
2017-08-28 09:38:08 +00:00
710a938b3f v6.6.1 2017-08-28 09:34:59 +00:00
be7c1d278e Update resin-preload to 3.1.4
Connects-To: #649

Change-Type: patch
2017-08-28 10:49:08 +02:00
dfcac4a532 Auto-merge for PR #647 via VersionBot
Add a --dont-check-device-type option for `resin preload`
2017-08-28 08:45:41 +00:00
a5128cd49e v6.6.0 2017-08-28 08:42:44 +00:00
223432406d Add a --dont-check-device-type option for resin preload
Connects-To: #646

Change-Type: minor
2017-08-25 12:27:38 +02:00
cafde01886 Auto-merge for PR #645 via VersionBot
Remove resin-preload build filtering workaround.
2017-08-24 12:28:34 +00:00
0158d1da48 v6.5.3 2017-08-24 12:25:11 +00:00
e0d661a1da Remove resin-preload build filtering workaround.
Connects to #640

Change-Type: patch
2017-08-24 12:39:17 +02:00
b152482133 Reformat changelog for versionbot 2017-08-22 19:30:34 +02:00
4cdf3acf42 v6.5.2 2017-08-22 19:22:05 +02:00
314fcd3919 Merge pull request #639 from resin-io/628-add-progress-bars-for-resin-preload
Add progress bars and spinners for resin preload.
2017-08-22 18:44:56 +02:00
b07a394592 Add progress bars and spinners for resin preload.
Connects-To: #628

Change-Type: minor
2017-08-22 18:42:20 +02:00
14c5d938a6 Merge pull request #627 from resin-io/626-dont-preload-the-same-image-twice
Don't try preloading the same build twice in an image.
2017-08-21 19:26:53 +02:00
c6c2f0bedc Don't try preloading the same build twice in an image.
Connects to #626

Change-Type: patch
2017-08-21 19:24:30 +02:00
6882f4bbe8 Fix missed changelog link 2017-08-21 11:37:23 +02:00
74d6cfb8d2 v6.5.1 2017-08-21 11:33:12 +02:00
3b30a7c4b0 Merge pull request #638 from resin-io/636-replace-lodash-object-with-fromPairs
Use _.fromPairs instead of _.object which was removed in lodash 4.0.0
2017-08-21 10:13:05 +02:00
115e46573b Use _.fromPairs instead of _.object which was removed in lodash 4.0.0
Connects-To: #636

Change-Type: patch
2017-08-21 10:01:25 +02:00
2ad789457f Merge pull request #635 from resin-io/prepublishOnly
Move to prepublishOnly to speed up npm install a little
2017-08-18 17:37:46 +02:00
9beb6de7d8 Move to prepublishOnly to speed up npm install a little 2017-08-18 15:56:35 +02:00
74743745c4 v6.5.0 2017-08-18 15:45:45 +02:00
6fae5a2dd9 Merge pull request #631 from resin-io/autodeploy
Set up Travis npm autopublish
2017-08-18 15:40:18 +02:00
4320f33d8e Set up Travis npm autodeploy 2017-08-18 12:41:30 +02:00
435fedfa07 Merge pull request #630 from resin-io/629-fix-resin-preload-when-a-commit-is-provided
Fix resin preload when a commit is provided.
2017-08-18 09:38:40 +02:00
999f269e36 Fix resin preload when a commit is provided.
Connects-To #629

Change-Type: patch
2017-08-18 09:37:37 +02:00
224dfce4a8 Merge pull request #624 from resin-io/remove-babel
Remove unused babel dependency
2017-08-17 11:40:15 +02:00
60634a5ebd Merge pull request #623 from resin-io/upgrade-lodash
Upgrade to lodash v4
2017-08-17 11:38:56 +02:00
f8f1f52662 Remove unused babel dependency 2017-08-16 19:41:56 +02:00
e204707ee0 Upgrade to lodash v4 2017-08-16 18:58:46 +02:00
b28a4a5f99 Merge pull request #621 from resin-io/update-package-description
Update npm package description
2017-08-16 12:45:09 +02:00
340b2d5572 Update npm package description 2017-08-16 11:47:43 +02:00
4dec846256 Merge pull request #617 from resin-io/594-shared-app-lookup
Allow the looking up of applications with the owner username
2017-08-14 22:43:56 +01:00
dc1b3c3239 Allow the looking up of applications with the owner
change-type: minor
Connects-to: #594
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-08-14 17:00:33 +01:00
2fecb8d3e9 Merge pull request #619 from resin-io/618-use-patched-global-tunnel-ng
Use forked global-scoket-ng that doesn't proxy connection to socket files.
2017-08-11 17:18:52 +02:00
4665a72baf Use forked global-scoket-ng that doesn't proxy connection to socket files.
Connects to #618

Change-Type: patch
2017-08-11 17:02:17 +02:00
b208d601c9 Merge pull request #610 from resin-io/609-integrate-docker-preload
Integrate resin-preload
2017-08-11 15:45:05 +02:00
22b3c39b2b Integrate resin-preload
* split docker connection options from lib.utils.docker.appendOptions

Connects to #609
Connects to https://github.com/resin-io/resin-preload/pull/81

Change-Type: minor
2017-08-11 15:43:07 +02:00
30cca93283 v6.4.0 2017-08-11 13:31:53 +02:00
f0d9b615a7 Merge pull request #615 from resin-io/612-remove-inconsistent-tagging-message
Remove inconsistent (and now unneccesary) 'Tagging image as' message
2017-08-11 13:31:16 +02:00
b7e2c2571f Remove inconsistent (and now unneccesary) 'Tagging image as' message
Change-Type: patch
2017-08-11 13:30:44 +02:00
25538a9afb Merge pull request #616 from resin-io/no-docker-warning
Provide a helpful warning when Docker is not installed
2017-08-11 11:34:04 +02:00
5daa682183 Provide a helpful warning when Docker is not installed
Change-Type: patch
2017-08-10 21:40:05 +02:00
bad4493867 Merge pull request #614 from resin-io/603-node-upgrade-help
Help users using old node versions to upgrade
2017-08-10 14:43:29 +02:00
9e6dd57a5c Help users using old node versions to upgrade 2017-08-09 15:20:50 +02:00
1b86741fa2 v6.3.1 2017-08-08 11:37:22 +03:00
6cca43a09e v6.3.0 2017-08-03 18:05:27 +03:00
b622995a5a Merge pull request #606 from resin-io/534-update-resin-sync
update resin-sync
2017-08-03 18:04:13 +03:00
4329857a16 update resin-sync 2017-08-03 18:01:45 +03:00
d803cfab3a v6.2.0 2017-07-27 14:07:05 +03:00
e7d7ca807f Merge pull request #601 from resin-io/597-resin-wifi-config
Support the new OS with resin-sample.ignore connection file
2017-07-27 14:02:29 +03:00
22e0b4b9dc Support the new OS with resin-sample.ignore connection file 2017-07-27 14:01:49 +03:00
759baf3eda v6.1.1 2017-07-18 18:09:32 +02:00
e6dc7f8075 Merge pull request #595 from resin-io/simplify-login-message
Hide the intro quickstart message, for now (until it gets renovated)
2017-07-18 17:02:18 +02:00
1f0bec39d9 Hide the intro quickstart message for now (until it gets renovated) 2017-07-18 16:57:16 +02:00
64b6549fde v6.1.0 2017-06-30 20:49:08 +02:00
fc7e08c886 Merge pull request #586 from resin-io/543-fix-cwd-string
Upgrade resin-sync to fix node 8 bug
2017-06-30 20:45:59 +02:00
4aadfe9326 Upgrade resin-sync to fix node 8 bug
Connects-To: #543
Change-Type: patch
2017-06-30 19:49:35 +02:00
a65868cbbf Tiny patch to move a CHANGELOG line to the right place 2017-06-29 12:44:14 +02:00
8ab528aae4 Merge pull request #570 from resin-io/bump-resin-sync
Bump resin-sync@8.0.0
2017-06-29 11:56:57 +03:00
d93b82a269 Bump resin-sync@8.0.0
- resin sync: do not explicitly disable ControlMaster SSH option
- resin sync: whitelist collaborators

fixes #422
change-type: minor
2017-06-29 11:56:01 +03:00
3095938b0e Merge pull request #569 from resin-io/permit-ssh-controlmaster
Do not explicitly disable ControlMaster option for device SSH connections
2017-06-29 11:54:19 +03:00
91b3442fc9 Do not explicitly disable ControlMaster option for device SSH connections
The backend server that handles `resin ssh` now supports it.

Also removed the option from local ssh connections to devices, where it
basically has no effect (dropbear on devices supports it)

change-type: minor
fixes #568
2017-06-29 11:53:31 +03:00
e660c6ae90 Merge pull request #557 from resin-io/539-fix-clearLine
Fix issue when using resin deploy with non-standard stdin
2017-06-28 20:30:48 +02:00
e2a165ce80 Show a correct [Info] tag with the deploying progress bar 2017-06-28 18:57:49 +02:00
ce5685551d Remove unused function 2017-06-28 18:52:44 +02:00
15e677e9f1 Refactor stream logger to keep streams as state 2017-06-28 18:52:40 +02:00
5ccde3db8e Fix issue when using resin deploy with non-standard stdin
This fixes issues when piping `resin deploy` to a non-TTY, and should
solve issues on Windows too.

Connects-To: #539
2017-06-28 18:40:00 +02:00
cb550f65bb Merge pull request #582 from resin-io/580-fix-emulated-build-arg
Fix issue where emulated builds broke Docker ARG commands
2017-06-27 16:07:05 +02:00
8d3987fc70 Fix issue where emulated builds broke Docker ARG commands 2017-06-27 15:06:06 +02:00
4fa8d86f02 v6.0.0 2017-06-26 13:38:22 +02:00
6b22166887 Merge pull request #577 from jacintoArias/master
Allow --squash option on resin build command
2017-06-26 13:35:35 +02:00
9e555b3dba Updated CHANGELOG.md 2017-06-26 13:34:22 +02:00
bea7b2035a Added --squash option to resin build command 2017-06-26 13:33:50 +02:00
abebf6b4f4 Merge pull request #576 from resin-io/567-require-node-6
Remove Buffer polyfill, require Node v6+, and print warnings in older versions
2017-06-26 13:28:20 +02:00
6182e7c98a Make Node warning a multi-line string 2017-06-26 13:24:54 +02:00
410390a9ae Remove Buffer polyfill, require Node v6+, and print warnings in older versions 2017-06-22 18:59:50 +02:00
11079caf26 v5.11.1 2017-06-22 18:19:53 +02:00
0c6545218a Merge pull request #574 from resin-io/565-log-node-version
Include node version in sentry logs
2017-06-22 18:17:33 +02:00
7fc806c75f Merge pull request #571 from resin-io/566-fix-v4-compat
Add a polyfill to fix local configure in older (<6) Node versions
2017-06-22 18:12:39 +02:00
18533de3da Include node version in sentry logs 2017-06-22 14:48:46 +02:00
c5afe5f2c2 Update build output, after missed recompile 2017-06-22 14:10:16 +02:00
2875bd672e Add a polyfill to fix local configure in older (<6) Node versions 2017-06-22 13:38:38 +02:00
26d123b33d Merge pull request #563 from resin-io/562-fix-tls-connect
Read ca files and convert to string before passing to the docker daemon
2017-06-22 08:41:10 +01:00
5000febf72 Read ca files and convert to string before passing to the docker daemon
Before this commit, the docker daemon would recieve the filename of the
.pem files, which would be interpreted as the body and would fail. This
commit ensures that the actual body of the pem files are sent to the
daemon.

Change-type: patch
Connects-to: #562
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-06-21 11:11:24 +01:00
378f894da3 v5.11.0 2017-06-19 01:16:04 +03:00
c891d690ec update lockfile 2017-06-19 01:14:08 +03:00
8efaec63ff Merge pull request #559 from resin-io/558-absolute-qemu
Make emulated builds reliable in the presence for WORKDIR comands
2017-06-15 19:41:52 +02:00
b756f2a597 Make emulated builds reliable in the presence for WORKDIR comands
Connects-To: #558
Change-Type: patch
2017-06-15 16:36:44 +02:00
c986e142e2 Merge pull request #548 from resin-io/462-noninteractive-device-init
non-interactive device init
2017-06-15 17:06:41 +03:00
8bdacbb11e dedupe the shared options 2017-06-15 16:43:12 +03:00
d2a9aee685 improve available drives listing
make the config a path to the file and not the stringified JSON
2017-06-15 16:43:02 +03:00
77a4c6fdc2 move available-drives command to util 2017-06-15 16:43:02 +03:00
4d935d62fc improve wording 2017-06-15 16:42:46 +03:00
e8b44d7250 Forced update to the newest resin-sdk 2017-06-15 16:40:46 +03:00
5c5cfde49f automated init doc 2017-06-15 16:39:55 +03:00
97480d3aa4 Improve the supported device types listing 2017-06-15 16:39:55 +03:00
4ac8cb1003 rebuild docs 2017-06-15 16:39:55 +03:00
2e7e033bb9 allow prebuilding the device config and reusing it 2017-06-15 16:39:55 +03:00
9fb5b52069 update dependencies 2017-06-15 16:39:55 +03:00
ad940824a6 list detected drives with resin os available-drives 2017-06-15 16:39:55 +03:00
ed83514a2f allow passing --drive to resin device init 2017-06-15 16:39:55 +03:00
8d91a5732a tolerate the --yes param to device init 2017-06-15 16:39:55 +03:00
1cfe64e4a7 choose version during device init, and list versions with resin os versions 2017-06-15 16:39:55 +03:00
24388811ad remove the user requirement for the supported devices list 2017-06-15 16:38:55 +03:00
f465e74a87 Merge pull request #556 from resin-io/deploy-ux-improvements
Resin deploy ux improvements
2017-06-15 14:31:27 +02:00
c8d51d92e7 Show a clear message immediately as the deploy starts, if we're deploying an image.
Change-Type: patch
2017-06-15 12:36:40 +02:00
5a28d4c92f Make cleanup reliable if a local build fails 2017-06-15 12:36:40 +02:00
66a4faeea5 Small improvement to resin deploy docs
Change-Type: patch
2017-06-15 12:36:40 +02:00
2fce0e964b Merge pull request #554 from resin-io/549-gzip-image-deploy
Gzip images when deploying
2017-06-15 12:35:54 +02:00
a29b40eefa Move promise.spread to promise.join for clarity (from review) 2017-06-15 12:34:26 +02:00
cf7bf2cb7d Fix the gzip level for image uploads to a good perf/size balance 2017-06-15 12:01:22 +02:00
df3c5ca07f Gzip while streaming, rather than gzipping the buffer up front
Connects-To: #549
2017-06-15 12:01:22 +02:00
e584dc43f7 Gzip images when uploading in resin deploy
Change-Type: minor
Connects-To: #549
2017-06-15 12:01:22 +02:00
90a5b15dbc Refactor docker stream buffering before start gzipping 2017-06-15 12:01:22 +02:00
390332cd6c Merge pull request #555 from resin-io/553-fix-qemu-path
Ensure emulated builds use the correct relative path to qemu
2017-06-15 12:00:58 +02:00
37ec11bf25 Ensure emulated builds use the correct relative path to qemu
Change-Type: patch
Connects-To: #553
2017-06-14 20:50:24 +02:00
08ce1abd20 Merge pull request #511 from resin-io/emulated-builds
Add emulated build option to resin build
2017-06-14 11:06:34 +01:00
f2862f7fe2 Add emulated build option to resin build
This commit adds the ability to run a Docker build for an architecture
which is not the host architecture, using qemu-linux-user. Currently
this is only supported for linux.

Added:
* Installation of qemu which supports propagated execve flags
* Copying of qemu binary into the build context
* Transposing the given Dockerfile to use the qemu binary
* Intercepting of the build stream, so the output looks *almost* exactly
  the same.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-06-14 12:06:03 +01:00
e0673c98fc Remove leftover action/util build output 2017-06-09 03:24:34 +02:00
4ab67ed71d changelog 2017-06-08 13:53:41 +03:00
5ea263ef2e Add package-lock.json 2017-06-08 13:52:47 +03:00
31419b399e v5.10.2 2017-05-31 13:08:04 +01:00
9e8b09010f Merge pull request #540 from resin-io/args
resin build: fix mismatch in command line argument signature
2017-05-31 13:05:48 +01:00
974be5cc13 resin build: fix mismatch in command line argument signature
The command line arg was taking `devicetype`, but the rest of the code
uses `deviceType`. Thus it was impossible to specify a device type
in practice to build a `Dockerfile.template`.

Change-type: patch
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
2017-05-30 10:34:32 +01:00
ec386b807f Merge pull request #518 from resin-io/485-update-interval
Change update check interval to once a day
2017-05-24 11:12:54 -07:00
abc183a729 Change update check interval to once a day
This gives the user enough notice to stay well updated, but won't spam
them if they're using resin-cli frequently.

Connects-to: #485
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-23 17:29:23 -07:00
e5ed6fab85 v5.10.1 2017-05-22 21:59:12 +02:00
eb9152255e Merge pull request #536 from resin-io/535-fix-local-ssh
Fix breaking bug in resin local ssh
2017-05-22 21:55:59 +02:00
78ab47b584 Fix breaking bug in resin local ssh 2017-05-22 20:49:34 +02:00
5b651c7821 v5.10.0 2017-05-22 15:44:28 +02:00
95fc5d7785 Merge pull request #517 from resin-io/ssh-proxy
resin ssh proxy support
2017-05-22 13:04:49 +02:00
4d18e92686 changelog 2017-05-20 00:20:22 +03:00
2d729a82a0 fix valid-email path 2017-05-20 00:19:31 +03:00
4b5240d8cd check for proxytunnel presence 2017-05-19 02:10:14 +03:00
6ae59654a0 fix 2017-05-19 01:44:30 +03:00
b88f7a993c escape params 2017-05-19 01:25:01 +03:00
880fb43fd9 some fixes 2017-05-18 15:12:52 +03:00
fa71df7c70 use upstream dependency 2017-05-12 18:09:43 +03:00
bc79832e1d resin ssh proxy support 2017-05-12 18:09:43 +03:00
1d06bc1b4f Merge pull request #524 from resin-io/520-include-command-line
Include full command line arguments in Sentry errors
2017-05-12 13:27:53 +02:00
88d5ec0c94 Merge pull request #525 from resin-io/508-fix-docs
Get docs and the code generating them back in sync
2017-05-12 13:27:35 +02:00
ebd9e92b10 Merge pull request #523 from resin-io/522-username-in-errors
Include the username used in Sentry errors
2017-05-12 12:04:51 +02:00
a5b535753f Include the username used in Sentry errors, to help us debug them 2017-05-12 12:02:26 +02:00
6e5e4bd8a6 Get docs and the code generating them back in sync (from #515, #508) 2017-05-12 12:01:37 +02:00
6e034acf23 Include full command line arguments in Sentry errors, to help us debug them 2017-05-12 11:48:43 +02:00
3a44782c38 Merge pull request #515 from resin-io/build-time-vars
Add ability to specify built-time variables for local build
2017-05-11 14:31:45 +03:00
654ec75598 Renamed build arg option to —buildArg/-B 2017-05-11 14:20:24 +03:00
66876a2c85 Add ability to specify built-time variables for local build
Change-Type: patch
2017-05-11 14:14:43 +03:00
8cb862359b Merge pull request #514 from resin-io/upload-progress-bar
Add progress bar for upload progress
2017-05-11 14:12:21 +03:00
172fa37bd4 Added CHANGELOG entry 2017-05-10 23:06:35 +03:00
fc5640c79d Draw a progress bar for upload progress
Change-Type: patch
2017-05-10 22:28:51 +03:00
db9225f00a Merge pull request #398 from resin-io/395-show-device-dashboard-link
Show device dashboard url in 'resin device' output
2017-05-08 14:05:40 +03:00
c12b59b978 Show device dashboard url in 'resin device' output
change-type: minor
2017-05-08 13:51:06 +03:00
7eeafa935a Merge pull request #510 from resin-io/highlight-cache-usage
Highlight cache usage in resin build
2017-05-04 14:12:40 +01:00
404348f92e Highlight cache usage in resin build
This commit will highlight the usage of the cache when doing a docker
build via `resin build`, which not only helps the user understand what
the build is doing, but also achieves more parity with the cloud
builder.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-04 14:09:23 +01:00
4d2af251b2 Merge pull request #502 from resin-io/not-enough-unicorns
Fix the not-enough-unicorns bug
2017-05-04 13:22:42 +01:00
d249ac168a Fix the not-enough-unicorns bug
Add successful build indicator in the form of a unicorn.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-04 13:18:25 +01:00
65eaad2ed5 Merge pull request #493 from resin-io/local-upload-logs
Upload logs when doing both build + deploy
2017-05-04 13:16:01 +01:00
3ff5880ae3 Allow resin-cli deploy to also upload build logs if present
If build is ran through `resin deploy`, then logs will be stored and
uploaded to the database, where the dashboard can display them

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-04 13:11:50 +01:00
511d2abe1d Merge pull request #508 from resin-io/507-add-device-types-note
Add note on how to get resin device types
2017-05-02 10:37:30 +01:00
029b7c7164 Add note on how to get resin device types
Connects to #507

Change-Type: patch
2017-05-01 17:14:58 +01:00
afafa22694 v5.9.1 2017-05-01 14:19:21 +03:00
2df4422748 v5.9.0 2017-05-01 14:14:37 +03:00
e099f0b8b3 Merge pull request #505 from resin-io/proxy
proxy support
2017-05-01 14:12:49 +03:00
8866f47805 proxy support 2017-05-01 14:00:50 +03:00
1d8382e91d v5.8.1 2017-04-27 16:24:57 +03:00
110e18bc88 Merge pull request #500 from resin-io/fix-ssh
fix ssh proxy URL retrieval
2017-04-27 16:24:08 +03:00
3df30c8b5a fix ssh proxy URL retrieval 2017-04-27 16:20:32 +03:00
ebfd842ae5 Merge pull request #499 from resin-io/add-local-build-docs
Add documentation for new resin build and resin deploy commands
2017-04-26 14:15:34 +01:00
39b171fd2a Add documentation for new resin build and resin deploy commands
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-26 13:38:35 +01:00
04c2333a54 v5.8.0 2017-04-26 12:20:30 +01:00
65884c81a4 Merge pull request #498 from resin-io/prettify-build
Add cloud-builder builder output parity to build and deploy
2017-04-25 13:37:26 +01:00
f50ae65560 Add cloud-builder builder output parity to build and deploy
Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-25 13:13:11 +01:00
be0d6d5a99 Merge pull request #497 from resin-io/share-build-opts
Share nocache and tag build options between build and deploy
2017-04-24 20:56:41 +01:00
4fa1a9c1c6 Share nocache and tag build options between build and deploy
`resin build` had access to the `--nocache` and `--tag` options for
building with docker, but `resin deploy` did not. This commit adds the
options to the shared dockerUtils.appendOptions function.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-24 20:05:18 +01:00
284030d83d Merge pull request #495 from resin-io/fix-build-source
Respect source parameter in resin build
2017-04-24 20:04:22 +01:00
9050cb1975 Respect source parameter in resin build
Upon changing the name of the source parameter from `context`, some
places weren't changed, this commit fixes that.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-24 16:41:15 +01:00
d55ce853a7 Merge pull request #466 from resin-io/local-build
Add ability to build and deploy image locally using resin-cli
2017-04-24 10:39:46 +01:00
d3772386bf Add ability to build and deploy image locally using resin-cli
Using `resin build` a user can now build an image on their own docker
daemon. The daemon can be accessed via a local socket, a remote host and
a remote host over a TLS socket. Project type resolution is supported.
Nocache and tagging of images is also supported.

Using `resin deploy` a user can now deploy an image to their fleet. The
image can either be built by `resin-cli`, plain Docker, or from a remote
source.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-23 14:31:45 +01:00
2e042499af Merge pull request #490 from resin-io/486-capture-init-errors
log unhandled exceptions
2017-04-21 23:11:56 +03:00
225d3acf9e log unhandled exceptions 2017-04-21 13:10:30 +03:00
75d10286ad v5.7.2 2017-04-18 12:15:11 +03:00
d6e0616c58 Merge pull request #482 from resin-io/node-v4-support
update to modules that have native node v4 support
2017-04-18 12:12:52 +03:00
380a94f0f8 update to modules that have native node v4 support 2017-04-14 14:48:19 +03:00
9da8c5f09a ignore .DS_Store 2017-04-14 11:41:19 +03:00
89b88315e4 Merge pull request #480 from resin-io/479-resin-local-docs
Add resin local docs
2017-04-11 16:15:30 +01:00
11e8ca178c Add resin local docs
Connects to #479

Change-Type: patch
2017-04-11 14:25:54 +01:00
e583e6f04c Merge pull request #476 from resin-io/fix-peer-dep-error
Move to a consistent resin-token by upgrading to new v6 SDK and resin-cli-auth
2017-04-10 12:42:06 +02:00
0cce2a7ab7 Move to a consistent resin-token by upgrading to new v6 SDK and resin-cli-auth 2017-04-07 21:26:56 +02:00
965aa7e4d4 v5.7.1 2017-04-03 16:07:32 +02:00
0ca64b18a2 Merge pull request #471 from resin-io/470-non-semver-os
Handle non-semver OS versions
2017-04-03 16:06:07 +02:00
63e1313f44 Handle non-semver OS versions 2017-04-03 15:36:04 +02:00
96a7a24738 v5.7.0 2017-03-28 14:43:31 +03:00
dede4bb329 Merge pull request #461 from resin-io/452-fix-permissions
isolate the sudo-runnable command
2017-03-28 14:40:51 +03:00
77b30409bb update resin-device-init to pull in etcher-image-write 2017-03-28 14:37:13 +03:00
137473353c remove username request from the signup process 2017-03-28 14:37:11 +03:00
08b3db717e use individual methods promisification instead of promisifyAll 2017-03-27 12:14:55 +03:00
6cf32e445a isolate the sudo-runnable command 2017-03-27 11:43:35 +03:00
857c5204b9 v5.6.1 2017-03-23 15:52:06 +03:00
169609620a Merge pull request #459 from resin-io/fix-unneeded-warning
Fix unneeded warning
2017-03-23 15:51:13 +03:00
8149172eb0 changelog 2017-03-23 15:32:06 +03:00
cba105a41b suppress warning during the device init OS download 2017-03-23 15:27:54 +03:00
69dff0c603 Merge pull request #450 from resin-io/420-add-sentry
Add sentry error tracking
2017-03-23 13:11:15 +01:00
6ffa4070ff Merge pull request #457 from resin-io/replace-gitter-with-forums
Point to forums instead of gitter
2017-03-23 14:10:18 +02:00
f05b04a6a1 Move sentry DSN to config 2017-03-23 13:10:15 +01:00
88d8112402 Add sentry error tracking 2017-03-23 12:59:42 +01:00
f940d7428c Point to forums instead of gitter
change-type: patch
2017-03-23 12:19:59 +02:00
697779868e Merge pull request #437 from alisondavis17/patch-1
Update README.md
2017-03-23 12:19:24 +02:00
d90874dbef v5.6.0 2017-03-23 01:36:08 +03:00
65b2347b57 Merge pull request #453 from resin-io/41-select-os-version
Closes #451
2017-03-23 01:32:15 +03:00
b25034978b use the published depdendencies 2017-03-23 01:24:25 +03:00
a817bb2135 update gitignore 2017-03-22 22:47:26 +03:00
b629c3601e implement the version menu 2017-03-22 15:45:05 +03:00
3619b2f117 allow specifying the version 2017-03-22 13:28:46 +03:00
4231f50c4c download the non-preview version by default 2017-03-22 12:55:55 +03:00
95fff4b7c4 build bare modules 2017-03-22 12:46:06 +03:00
b3aa3d35f7 fix resin local push help message and lint errors 2017-03-21 12:06:05 +03:00
9f3108c5e7 5.5.0 2017-03-10 18:19:45 +00:00
c95a01e34e Merge pull request #444 from resin-io/scan-sudo-and-fixed-latency
Scan sudo and fixed latency
2017-03-10 18:04:56 +00:00
19c51929a9 Generate JS 2017-03-10 17:59:54 +00:00
73dd625ede Require superuser for scan commands, also introduce docker timeout 2017-03-10 17:59:54 +00:00
08db3ace03 Bump resin-sync@7.0.0: use experimental rds which requires superuser permissions 2017-03-10 17:59:54 +00:00
2125cf9649 5.4.0 2017-03-09 23:56:10 +00:00
e5a7fa5617 Merge pull request #439 from resin-io/resin-local-stop
Resin local stop
2017-03-09 23:50:58 +00:00
3324ff4dee Generate JS 2017-03-09 23:49:59 +00:00
7ad468dc54 Implement 'resin local stop' 2017-03-09 23:49:56 +00:00
8474ee726c Update README.md
Change Support section to point to Forums instead of Gitter
2017-03-09 14:46:20 -08:00
29b2f4afa8 Merge pull request #433 from resin-io/filter-missing-dockerinfo-devices
Filter our devices that do not expose docker socket
2017-03-09 21:19:23 +00:00
7aee4d6d7f Filter our devices that do not expose docker socket 2017-03-09 20:54:11 +00:00
7af004501a Merge pull request #430 from resin-io/rdt-merge
Rdt merge
2017-03-09 11:21:25 +00:00
2d09c18d6b Build JS 2017-03-08 23:41:55 +00:00
53bf314820 Remove app create from primary commands 2017-03-08 23:41:35 +00:00
1ae1a15259 Implement 'resin local' 2017-03-08 23:41:35 +00:00
20ed8c9169 Implement 'resin local push' 2017-03-08 23:41:32 +00:00
977e3fb0ff Implement 'resin local ssh' 2017-03-08 23:41:29 +00:00
c5df32f952 Implement 'resin local scan' 2017-03-08 22:43:23 +00:00
f5cd3375f2 Implement 'resin local promote' 2017-03-08 22:43:23 +00:00
3b4c8f2a01 Implement 'resin local logs' 2017-03-08 22:43:23 +00:00
356042557e Implement 'resin local flash' 2017-03-08 22:43:21 +00:00
00753a5776 Implement 'resin local configure' 2017-03-08 18:43:34 +00:00
eea9a2f723 5.3.0 2017-03-03 18:14:48 +02:00
5ebdf4a8ac Merge pull request #424 from resin-io/ssh-handle-undefined-uuid
resin ssh: handle undefined uuid parameter
2017-03-03 17:29:21 +02:00
fb06249b08 resin ssh: handle undefined uuid parameter
change-type: patch
2017-03-03 17:25:51 +02:00
9214cb0d90 Merge pull request #416 from resin-io/support-aufs-resin-sync
Support aufs resin sync
2017-02-21 15:03:59 +02:00
a04c3b9c7b Generate JS and add gulpfile option to suppress diff 2017-02-21 14:45:47 +02:00
2fde6241c2 Support resin sync for remote resin.io AUFS devices
change-type: minor
2017-02-01 15:52:17 +02:00
ffa645f85c Merge pull request #413 from resin-io/sdk-browser
Use the updated SDK
2017-01-27 13:41:17 +01:00
b629ee6164 Move to preconfigured resin sdk 2017-01-25 19:33:43 +01:00
7a4de5357e Fix some issues with Resin-SDK usage after initial testing 2017-01-25 19:25:12 +01:00
5bbb055cd9 Formally depend on the new resin-sdk release 2017-01-25 19:25:12 +01:00
553b96e48f add the CS preamble to the generated files 2017-01-25 19:25:12 +01:00
7a0e8beb07 update for the new resin.models.device.generateUniqueKey 2017-01-25 19:25:12 +01:00
f17cbb1205 use the new SDK factory 2017-01-25 19:25:12 +01:00
b690060bc4 update deps and remove unused 2017-01-25 19:25:12 +01:00
72b2058d27 Merge pull request #418 from resin-io/lekkas-patch-1
docs: rename 'Git Bash' to 'Git for Windows'
2017-01-18 19:46:40 +02:00
bbd617ea76 docs: rename 'Git Bash' to 'Git for Windows' 2017-01-18 19:33:49 +02:00
f9a4f8c375 v5.2.4 2017-01-18 19:14:52 +02:00
5c289a6e00 Merge pull request #417 from resin-io/fix-cmd-exe-doc-error
Fix requirement docs for resin sync and resin ssh
2017-01-18 19:07:36 +02:00
3b439282ae Regenerate JS and add header to suppress diff 2017-01-18 18:04:42 +02:00
d473509675 Docs: fix requirements for resin ssh and resin sync
change-type: patch
2017-01-18 18:04:37 +02:00
49664b815d v5.2.3 2017-01-04 13:54:09 -04:00
06cc863f02 Merge pull request #412 from resin-io/411-fix-add-js-yaml
add missing dependency - fix #411
2016-12-16 17:38:57 +03:00
099cf997cb add missing dependency - fix #411 2016-12-16 17:21:05 +03:00
e8183d4031 v5.2.2 2016-11-01 14:38:55 -04:00
6954da4a24 Merge pull request #407 from resin-io/add-shutdown-command
Actually add the shutdown command
2016-11-01 12:42:21 -04:00
c18e8f1dbd Actually add the shutdown command 2016-11-01 12:42:29 -03:00
741b53ad7e Merge pull request #406 from resin-io/rebuild-coffeescript
Rebuild CoffeeScript
2016-10-28 16:45:56 -04:00
8282785b2a Rebuild CoffeeScript
See https://github.com/resin-io/resin-cli/pull/405#issuecomment-256998739
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-28 16:45:18 -04:00
e013986dba v5.2.1 2016-10-28 12:17:25 -04:00
3083ff0640 Merge pull request #405 from resin-io/fix-capitano-error
Fix `Boolean options can't have parameters` error
2016-10-28 12:16:09 -04:00
01cad3c048 Fix Boolean options can't have parameters error
This error was introduced as part of
`9cf42462c029e038e09efc961736946be8bfcb9b`, since the `forceUpdateLock`
option being used in the `reboot` command contains a `parameter`
property despite being declared a boolean.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-28 12:11:57 -04:00
c9919a90a8 v5.2.0 2016-10-27 17:47:43 -04:00
0bf6bcc430 Merge pull request #404 from resin-io/reboot-shutdown-force
Add a device shutdown command, and allow forcing reboot and shutdown
2016-10-27 18:42:30 -03:00
9cf42462c0 Add a device shutdown command, and allow forcing reboot and shutdown 2016-10-27 18:39:31 -03:00
0f4eca2ff0 Update resin-sdk to 5.4.0 2016-10-27 12:02:37 -03:00
d414d1c5e3 Merge pull request #403 from resin-io/coffee-script-1.11.1
Update coffee-script to 1.11.1
2016-10-26 12:04:18 -04:00
afe98ff37d Update coffee-script to 1.11.1 2016-10-26 11:55:39 -03:00
ce026ea387 v5.1.0 2016-09-25 19:55:55 -04:00
25f8f3d740 Merge pull request #397 from resin-io/regenerate-docs
Regenerate markdown documentation
2016-09-25 19:52:41 -04:00
f719f5c948 Regenerate markdown documentation
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 19:51:32 -04:00
e2cb79edb1 Merge pull request #396 from resin-io/devices-supported
Bring back `devices supported` command
2016-09-25 19:51:02 -04:00
c6e669fa6b Bring back devices supported command
Fixes: https://github.com/resin-io/resin-cli/issues/394
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 19:49:06 -04:00
7953f6f690 5.0.0 2016-09-15 19:45:23 +03:00
baf367b276 Merge pull request #367 from resin-io/features/resin-sync-ssh-improvements
resin sync/ssh improvements
2016-09-15 09:21:24 -07:00
7fecb53cdf resin sync/ssh: update docs 2016-09-15 13:09:25 +03:00
b4edb7ed7f resin sync/ssh: generate JS 2016-09-15 13:09:25 +03:00
16a1741374 resin sync: always display device selection dialog when uuid is not passed as an argument
Closes #375
2016-09-15 13:09:25 +03:00
e0a2217b94 resin sync/ssh: always display selection dialog, even for a single online device
Closes #373
2016-09-15 13:09:25 +03:00
7bd8a683b2 resin sync: remove quotes from --source/--destination help as it implies they're required
Closes #372
2016-09-15 13:09:25 +03:00
6b00bbc73a resin sync: add --after option 2016-09-15 13:09:25 +03:00
42d0b52df7 resin ssh: disable ControlMaster ssh option
This change was necessary because our ssh gateway does not
support ControlMaster mode.

Closes #366
2016-09-15 13:09:25 +03:00
97c768edcd resin sync: add --skip-gitignore option. Improve help section wording 2016-09-15 13:09:25 +03:00
10a0924cd7 resin sync: load uuid from .resin-sync.yml if possible 2016-09-15 13:09:25 +03:00
fdb8bf6967 resin sync: add --destination option and require --source if .resin-sync.yml is missing
Closes #359
2016-09-15 13:09:25 +03:00
81d8974213 resin-sync: update to resin-sync@3.0.0 2016-09-15 13:09:25 +03:00
af8d20ea3f resin sync/ssh: only accept uuid as destination
Also change --port option alias to '-p' from '-t'
2016-09-15 13:09:25 +03:00
7d606568f6 v4.5.0 2016-09-14 11:09:43 -07:00
de13337655 Merge pull request #392 from resin-io/manifest-first-partition
Attempt to get device type from the image first partition
2016-09-14 11:08:19 -07:00
8b485b5ad5 Attempt to get device type from the image first partition
New images will ship a `device-type.json` file in the first partition,
which we can use instead of querying the API for certain configuration
and initialisation commands.

If the file is not found, or is malformed, we still fallback to the API.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 11:06:17 -07:00
fbccf8a465 Merge pull request #393 from resin-io/upgrade-resin-device-init
Upgrade `resin-device-init` to v2.1.0
2016-09-14 11:05:28 -07:00
ce50d8b73d Upgrade resin-device-init to v2.1.0
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 11:03:51 -07:00
2088cbe896 v4.4.0 2016-08-11 10:35:19 -04:00
870ce974e0 Merge pull request #387 from resin-io/Add_OS_VERSION
Add OS version to devices,device commands and Supervisor Version to devices command
2016-08-11 10:24:00 -04:00
5f8c261288 v4.3.0 2016-08-11 10:21:41 -04:00
cb386d15aa Add OS version to devices,device commands and Supervisor Version to devices command 2016-08-10 18:42:34 +05:30
5ed26250d2 Merge pull request #384 from resin-io/features/deviceUrl
Implement `device enableDeviceUrl/disableDeviceUrl/hasDeviceUrl/getDeviceUrl`
2016-08-09 16:45:46 -04:00
7b0415a270 Switch to more human-like command name and follow convention from dashboard 2016-08-09 22:44:40 +05:30
3adb8f19bd Implement device enableDeviceUrl/disableDeviceUrl/hasDeviceUrl/getDeviceUrl 2016-08-09 18:45:24 +05:30
d81fbad6f3 Merge pull request #376 from resin-io/feature/global-help-option
Add global --help option
2016-07-31 20:41:28 -04:00
a70e38ef12 Add global --help option 2016-07-29 15:32:12 +03:00
aeba64b1ee v4.2.1 2016-07-26 13:04:21 -04:00
e6e44474a4 Merge pull request #371 from resin-io/upgrade-sdk
Upgrade `resin-sdk` to v5.3.5
2016-07-26 13:03:18 -04:00
ea44c0571b Upgrade resin-sdk to v5.3.5
This version contains a fix for `undefined` logs. See:

- https://github.com/resin-io/resin-sdk/pull/217
- https://github.com/resin-io/resin-device-logs/pull/14

Fixes: https://github.com/resin-io/resin-cli/issues/370
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 13:01:25 -04:00
f68364b695 Merge pull request #365 from resin-io/feature/sync-ssh-device-autochoose
Feature/sync ssh device autochoose
2016-07-07 22:21:37 +03:00
81a6843c93 resin ssh: Implement device inference and autoselect if there is a single one 2016-07-07 21:51:53 +03:00
b672ff1fa1 resin sync: change argument/help to a more meaningful 'resin sync [destination]' 2016-07-07 20:37:11 +03:00
b4c89e812c Merge pull request #364 from resin-io/feature/sync-filter-offline-devices
resin sync: filter out offline devices in interactive choosing dialog
2016-07-07 13:14:57 -04:00
68808e760e resin sync: filter out offline devices in interactive choosing dialog 2016-07-07 19:12:39 +03:00
69c98f4afb v4.2.0 2016-06-22 16:19:31 -04:00
509fef754e Merge pull request #356 from resin-io/feature/resin-sync-verbose
Support verbose flag for resin sync
2016-06-22 16:18:34 -04:00
6d1d4dc173 Support verbose flag for resin sync 2016-06-22 17:59:14 +03:00
0d7d6de7cd v4.1.0 2016-06-22 09:46:18 -04:00
c5452f9304 Merge pull request #354 from resin-io/feature/resin-ssh-verbose
Support --verbose/-v flag in resin ssh
2016-06-22 09:37:03 -04:00
12854db923 Support --verbose/-v flag in resin ssh
Closes https://github.com/resin-io/resin-cli/issues/353
2016-06-22 14:57:43 +03:00
51f9e18f6a Merge pull request #352 from resin-io/feature/reword-config-help
Reword config help instructions
2016-06-14 12:10:05 -04:00
29c20e32f6 Reword config help instructions
Closes #351
2016-06-14 19:08:25 +03:00
995194fe2c Merge pull request #346 from resin-io/misc/ssh-sync-cmd-exe-warning
Clarify that sync and ssh only support cmd.exe on Windows
2016-05-19 10:17:28 -04:00
7c784909fd Merge pull request #345 from resin-io/change-resin-ssh-loglevel
Change resin ssh loglevel from QUIET to ERROR
2016-05-19 10:17:20 -04:00
a90d568d5c Clarify that sync and ssh only support cmd.exe on Windows
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-19 10:10:45 -04:00
a265063fa1 Change resin ssh loglevel from QUIET to ERROR 2016-05-19 16:52:23 +03:00
1c5945d3ae v4.0.3 2016-05-17 10:00:04 -04:00
6062c7a306 Merge pull request #344 from resin-io/feat/ssh-windows-support
Make resin ssh work in Windows cmd.exe
2016-05-09 12:06:31 -04:00
b061644b19 Make resin ssh work in Windows cmd.exe
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-06 13:12:55 -04:00
38b97baf02 Add v4.0.2 entry to CHANGELOG
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 11:19:35 -04:00
8315bcb7db Improve CHANGELOG v4.0.0 entry prose
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 11:19:21 -04:00
e8fa76266f 4.0.2 2016-04-27 01:33:09 +03:00
3db3baeb7c Merge pull request #343 from resin-io/update-resin-sync-version
Update resin sync version to 2.0.2
2016-04-27 01:31:41 +03:00
17550f9bc9 Update resin sync version to 2.0.2 2016-04-27 01:29:45 +03:00
44f80f7a39 v4.0.1 2016-04-26 12:40:20 -04:00
372fa01cf3 Merge pull request #342 from resin-io/fix/unhandled-ssh-exceptions
Return control to capitano at the end of the ssh command
2016-04-26 12:39:01 -04:00
9a515ef4e3 Return control to capitano at the end of the ssh command
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 12:37:39 -04:00
6beb6ff44e 4.0.0 2016-04-26 16:17:01 +03:00
c2cd10f6a7 Update changelog 2016-04-26 16:16:02 +03:00
4d3769def8 Merge pull request #337 from resin-io/enter-container-command
Implement resin enter <uuid> command
2016-04-26 16:13:00 +03:00
42bfb3b0cc Implement resin ssh <uuid> command 2016-04-26 16:00:54 +03:00
d9c2717fe4 Merge pull request #340 from resin-io/upgrade-sync-packages
Use resin-sync v2.0.1 and resin-sdk v5.3.0
2016-04-26 15:57:23 +03:00
8e93577f90 Use resin-sync v2.0.1 and resin-sdk v5.3.0 2016-04-26 15:55:21 +03:00
5b7e1b656e Merge pull request #339 from resin-io/feat/infer-or-select-device
Implement a function to attempt to infer a device selection
2016-04-25 14:30:36 -04:00
4a05ce3f53 Attempt to infer the device uuid in resin sync
This PR adds functionality to `resin sync` to try to infer what the
device uuid is as follows:

- If the argument to `resin sync` is an app, get all the devices from
that application. If there is only one, auto-select it, otherwise show
an interactive drive selection widget.

- If the argument to `resin sync` is a uuid, use it directly, without
trying to infer anything.

- If no argument is passed to `resin sync`, display an interactive
selection widget showing all your devices from all your applications.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 08:57:19 -04:00
61574a8522 Merge pull request #338 from resin-io/change-sync-description
Change sync description
2016-04-25 08:37:33 -04:00
9400d4027a Update resin-settings-client version 2016-04-25 14:47:15 +03:00
b5ec49dda1 Remove resin sync 'exec after rsync' feature as it's not supported by
ssh gateway
2016-04-25 14:47:05 +03:00
1c66efb4fa v3.0.2 2016-04-08 13:30:40 -04:00
68fca3d030 Merge pull request #336 from resin-io/fix/os-configure-shorter-uuids
Fix shorter uuids not working with the `os configure` command
2016-04-08 13:29:35 -04:00
325304aebe Fix shorter uuids not working with the os configure command
`resin-device-init`, which is used by the `os configure` command was
still running an older SDK version, that didn't support shorter uuids.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 13:28:21 -04:00
a50cf5b198 Merge pull request #335 from resin-io/doc/plugin-development
Link to resin-plugin-hello from README
2016-03-31 10:19:48 -04:00
1b7aeeafc1 Link to resin-plugin-hello from README 2016-03-31 10:11:05 -04:00
6e3c2ef168 v3.0.1 2016-03-29 11:30:11 -04:00
d9b4753690 Merge pull request #334 from resin-io/fix/event-explosion
Log CLI events based on original command signature
2016-03-29 11:29:17 -04:00
ca40d7ca65 Log CLI events based on original command signature
Currently we log a CLI event with the passed command, however this might
include usr params, like a uuid, and therefore cause thousands of
different event names in Mixpanel.
2016-03-29 11:27:53 -04:00
4aa8362be9 v3.0.0 2016-03-28 09:29:31 -04:00
d68b61a913 Merge pull request #333 from resin-io/misc/regenerate-docs
Regenerate docs and include sync
2016-03-28 09:26:08 -04:00
20969ef249 Regenerate docs and include sync 2016-03-28 09:25:40 -04:00
469d35fcc1 Merge pull request #332 from resin-io/feat/sync
Integrate sync plugin in the Resin CLI
2016-03-28 09:22:36 -04:00
e9b8c38eeb Integrate sync plugin in the Resin CLI 2016-03-28 09:21:25 -04:00
d4c44bf350 Merge pull request #331 from resin-io/feat/config-generate-application
Allow generating a config.json from an application with config generate
2016-03-21 15:46:52 -04:00
2d8cf7c479 Allow generating a config.json from an application with config generate
Currently, `config generate` requires a device uuid. The command now
accepts either a uuid or an application name, and generates a
config.json accordingly.
2016-03-21 15:42:54 -04:00
ca6e715bfa Merge pull request #330 from resin-io/upgrade/device-config
Upgrade resin-device-config to v3.0.0
2016-03-21 15:05:28 -04:00
3a839c947e Upgrade resin-device-config to v3.0.0 2016-03-21 15:01:59 -04:00
9896de3c34 Merge pull request #329 from resin-io/feat/config-inject
Implement config inject command
2016-03-18 09:13:19 -04:00
03d7520de2 Implement config inject command
This command allows to user to inject a whole `config.json` file to a
provisioned device.
2016-03-17 16:07:19 -04:00
4fc8b130f8 Merge pull request #328 from resin-io/fix/innacurate-invalid-2fa-code
Only throw "Invalid 2FA code" if we're sure that's the cause
2016-03-17 15:38:15 -04:00
c5692f8b13 Only throw "Invalid 2FA code" if we're sure that's the cause
Currently, such error will be thrown when
`resin.auth.twoFactor.challenge()` rejects, but an invalid code is not
the only thing this function can reject for.
2016-03-17 15:37:02 -04:00
85561b5d50 Merge pull request #326 from resin-io/doc/eaccess-login
Document the case where EACCES is thrown during login
2016-03-09 11:04:17 -04:00
88c0833ae2 Document the case where EACCES is thrown during login 2016-03-09 11:03:45 -04:00
7df78a0c9e Merge pull request #325 from resin-io/misc/update
Force update alert to be always shown
2016-03-08 09:26:22 -04:00
30663b0301 Force update alert to be always shown
If `updateCheckInterval` has any meanginful value, the alert will be
shown one out of ten times, or something like that, making the user
likely to miss updates.

The underlying issue is that `update-notifier`, if it detects a cached
update notification, it deletes it, and only attempts to show it back if
`updateCheckInterval` is greater than `Date.now() - lastUpdateCheck`.
2016-03-08 09:23:03 -04:00
4ffba0ed56 Merge pull request #324 from resin-io/upgrade/dependencies
Upgrade most outdated dependencies
2016-03-07 11:42:10 -04:00
a522c70f92 Upgrade most outdated dependencies 2016-03-07 08:44:10 -04:00
f295837840 v2.7.0 2016-03-07 08:34:32 -04:00
091ae8eb03 Merge pull request #322 from resin-io/feat/device-reboot
Implement device reboot command
2016-03-07 08:33:14 -04:00
6405c6bb6f Implement device reboot command
Fixes: https://github.com/resin-io/resin-cli/issues/319
2016-03-04 09:38:11 -04:00
797122ce37 Merge pull request #320 from resin-io/feat/config-generate
Implement config generate command
2016-02-29 08:40:15 -04:00
f81db5a775 Merge pull request #321 from resin-io/misc/regenerate-docs
Regenerate docs
2016-02-26 22:40:53 -04:00
0f84aea47d Regenerate docs 2016-02-26 22:38:16 -04:00
84ed20d3ec Implement config generate command
This command allows the user to generate a config.json file and either
print it to stdout or save it to a file.
2016-02-26 22:37:15 -04:00
9870727e36 v2.6.2 2016-02-19 08:36:25 -04:00
db3de2137b Remove hardcoded readdir path
This was probably used for debugging at some point and got commited
accidentally.
2016-02-19 08:35:10 -04:00
92c6af91ca Merge pull request #317 from imrehg/badge
badge fixes
2016-02-13 22:18:18 -04:00
d578f62dca escape gitter image link
This is to fix bage link on npmjs.org, hopefully, as currently
it seems it cannot handle real spaces in image URLs.
2016-02-13 09:27:42 +08:00
d4527220c3 fix dependencies badge link 2016-02-13 09:21:08 +08:00
d5797124f5 Merge pull request #316 from resin-io/misc/mbr-error-troubleshotting
Move Invalid MBR error explanation to TROUBLESHOOTING
2016-02-12 19:26:14 -04:00
654c3c627d Move Invalid MBR error explanation to TROUBLESHOOTING 2016-02-12 14:45:00 -04:00
3953b00e77 v2.6.1 2016-02-12 14:41:37 -04:00
13f33da280 Merge pull request #315 from resin-io/feat/capitano-analytics
Inject analytics in Capitano
2016-02-12 14:38:31 -04:00
356d2ef6b2 Inject analytics in Capitano 2016-02-12 14:34:16 -04:00
36a8179e0c Merge pull request #314 from resin-io/upgrade/form
Upgrade resin-cli-form to v1.4.0
2016-02-11 12:54:33 -04:00
aedb9c732f Upgrade resin-cli-form to v1.4.0 2016-02-11 12:49:56 -04:00
c3bd433532 Merge pull request #313 from resin-io/feat/devices-is-online
Show if a device is online in devices command
2016-02-11 09:50:43 -04:00
d72750de65 Show if a device is online in devices command
Fixes: https://github.com/resin-io/resin-cli/issues/312
2016-02-10 08:51:00 -04:00
ccd8e73c4e Merge pull request #310 from resin-io/fix/309/device-name-help
Refer to device uuids in command help
2016-01-28 09:11:25 -04:00
6c677fe8cd Refer to device uuids in command help
Currently the CLI asks for a device "name" on device options while it
actually needs a "uuid".

Fixes: https://github.com/resin-io/resin-cli/issues/309
2016-01-28 09:10:11 -04:00
eaa1a798c5 Merge pull request #308 from resin-io/upgrade/image-manager
Upgrade Resin Image Manager to v4.0.0
2016-01-26 16:07:30 -04:00
da1b446b3b Upgrade Resin Image Manager to v4.0.0 2016-01-26 15:38:58 -04:00
18b4509fef Merge pull request #307 from resin-io/feature/device-status
Show parsed device status in device command
2016-01-26 15:09:03 -04:00
35bba04b16 Show parsed device status in device command 2016-01-26 12:16:55 -04:00
dd382158dd Merge pull request #306 from resin-io/misc/messages
Improve messages
2016-01-25 09:50:56 -04:00
40f015de93 Fix grammar issue: Administration -> Administrative 2016-01-25 09:00:04 -04:00
bee523828a Improve awaitDevice success message 2016-01-25 08:59:09 -04:00
474635401a Merge pull request #305 from resin-io/doc/mbr-error
Document corruped image MBR error
2016-01-24 18:16:35 -04:00
a8c30bb395 Document corruped image MBR error 2016-01-22 10:14:55 -04:00
9e00fdaf31 Merge pull request #304 from resin-io/doc/readme-header
Improve README header style
2016-01-21 23:18:36 -04:00
5f83c870ed Improve README header style
- Use SVG badges.
- Set description as a blockquote before the title.
2016-01-21 23:17:02 -04:00
5d89533afc Merge pull request #303 from resin-io/doc/login-error
Add information on how to login on user permission error
2016-01-21 23:12:20 -04:00
a346c3f043 Add information on how to login on user permission error 2016-01-21 23:07:08 -04:00
de0649c980 v2.6.0 2016-01-21 15:59:52 -04:00
b7300deab7 Merge pull request #302 from resin-io/upgrade/manager
Upgrade Resin Image Manager to v3.2.6
2016-01-21 15:50:45 -04:00
70b2ba3ab9 Upgrade Resin Image Manager to v3.2.6 2016-01-21 15:49:44 -04:00
8cbf792786 Merge pull request #301 from resin-io/doc/remove-ci-badges
Remove build status CI badges from README
2016-01-21 10:43:46 -04:00
bca9a7f51f Remove build status CI badges from README
CI integration was removed in
96f0b5fbd6,
but it looks like we forgot to remove the badges.
2016-01-21 10:42:45 -04:00
4bf079377b Merge pull request #300 from resin-io/feat/shorter-uuids
Support shorter uuids
2016-01-21 10:41:55 -04:00
ebefd816b6 Show shorter uuids when listing devices 2016-01-21 10:26:13 -04:00
fb1ef0df63 Promote shorter uuids in all examples 2016-01-21 10:23:40 -04:00
4489b1daa0 Merge pull request #299 from resin-io/misc/remove-tests
Remove tests tasks and CI configuration
2016-01-21 10:18:53 -04:00
96f0b5fbd6 Remove tests tasks and CI configuration
We don't have any tests in this repository
2016-01-21 10:16:54 -04:00
f6897ad41f Merge pull request #298 from resin-io/upgrade/sdk
Upgrade Resin SDK to v5.0.1
2016-01-21 10:14:56 -04:00
69e031da28 Upgrade Resin SDK to v5.0.1
This breaking change doesn't affect the CLI in any way, so we can
upgrade directly.
2016-01-21 10:13:15 -04:00
c61a7ef94a Merge pull request #296 from resin-io/ci/notifications
Improve Travis and Appveyor notifications
2016-01-18 11:32:48 -04:00
65bc22c02c Merge pull request #295 from resin-io/fix/delete-device-resource-on-errors
Remove registered device resource in case of errors in quickstart
2016-01-14 10:58:18 -04:00
1d55ea4dcf Improve Travis and Appveyor notifications 2016-01-14 10:49:11 -04:00
add30b33a1 Remove registered device resource in case of errors in quickstart
A device resource needs to be registered with the API before being able
to create the `config.json` file that goes in a device.

This means thats the device image is configured and written to an
external drive (e.g: SDCard) *after* the device resource registered.

If any of the above operations fail, there will be an unitialized orphan
device living in the selected application that the user will have to
remove himself.
2016-01-14 09:14:45 -04:00
999120e711 Merge pull request #293 from resin-io/doc/faq
Improve FAQ
2016-01-13 09:34:22 -04:00
67ce0f7f2d Merge pull request #294 from resin-io/feat/login-register
Redirect users to signup from login if they don't have an account
2016-01-13 09:34:16 -04:00
4645ad06bc Redirect users to signup from login if they don't have an account 2016-01-13 00:25:31 -04:00
612437ae58 Improvee FAQ with more frequent questions 2016-01-13 00:20:18 -04:00
35a821b904 Improve FAQ staging resin url title 2016-01-13 00:13:07 -04:00
e4359834d6 Rename README documentation section to FAQ 2016-01-13 00:12:04 -04:00
ef7e39450c Merge pull request #292 from resin-io/feat/ux-improvements
UX CLI improvements
2016-01-12 14:28:47 -04:00
c3a5998d5c Reuse messages 2016-01-12 10:45:32 -04:00
78ab2af8ba Print verbose help in resin help command 2016-01-12 10:39:29 -04:00
11354de596 Print an informative message after successful login 2016-01-12 10:30:56 -04:00
86cac606e4 Add Resin.io ASCII art in login 2016-01-12 10:23:46 -04:00
9b052c9aa5 Handle authentication in quickstart
If the user is not logged in, make quickstart prompt for authentication
automatically.
2016-01-12 10:12:44 -04:00
8d709aea7d Implement purely interactive login command
The new login command interactively asks the user if he wants to login
using web/credentials/token.
2016-01-12 09:08:03 -04:00
70ea8dd1a3 Redirect users to GitHub and Gitter in case of errors
Users will ge a better experience by knowing exactly where to go for
help if things go wrong.
2016-01-12 08:31:40 -04:00
11c0d2a847 Merge pull request #289 from resin-io/help/device-init-primary
Don't make `device init` a primary command
2016-01-12 08:08:38 -04:00
301b8a6ba3 Merge pull request #290 from resin-io/doc/quickstart-sudo
Stop instructing users to run quickstart as root
2016-01-12 08:08:34 -04:00
acb0aa445c Merge pull request #291 from resin-io/doc/support-gitter
Point users to Gitter in Support README section
2016-01-12 08:08:29 -04:00
a90d578c85 Point users to Gitter in Support README section 2016-01-11 16:04:22 -04:00
d859228aa9 Stop instructing users to run quickstart as root
Elevation is asked in specific steps automatically.
2016-01-11 16:01:40 -04:00
2be105d329 Don't make device init a primary command
Unlikely that a user will run this directly having the more high level
`quickstart`.
2016-01-11 16:00:07 -04:00
6d48fcfd6f Merge pull request #288 from resin-io/misc/build
Build CoffeeScript files with LICENSE additions
2016-01-11 15:59:06 -04:00
551a315432 Build CoffeeScript files with LICENSE additions 2016-01-11 15:58:35 -04:00
351dfdb892 Merge pull request #287 from resin-io/feat/gitter-badge
Add Gitter badge
2016-01-11 12:19:06 -04:00
dc6727fbf1 Add Gitter badge 2016-01-11 11:28:33 -04:00
af88e48c39 Merge pull request #285 from resin-io/doc/license
Change license to Apache 2.0
2016-01-04 10:25:33 -04:00
9cfce68489 Change license to Apache 2.0 2016-01-03 23:58:51 -04:00
8393ff647c Merge pull request #283 from resin-io/doc/cli-staging
Document how to point the CLI to staging
2016-01-01 02:19:43 -04:00
63122a5f51 Merge pull request #282 from resin-io/feat/credential-auth
Add optional credential-based authentication
2015-12-31 22:02:31 -04:00
0ad4598575 Document how to point the CLI to staging 2015-12-31 22:00:39 -04:00
b71c28cec0 Add optional credential-based authentication 2015-12-12 00:11:04 -04:00
b0ab23dad4 v2.5.0 2015-12-11 21:30:02 -04:00
de9297c351 Merge pull request #281 from resin-io/feat/logs-timestamp
Add timestamp to logs lines
2015-12-11 21:26:21 -04:00
26e3cb7957 Add timestamp to logs lines 2015-12-11 20:28:29 -04:00
bb78a3ca09 Merge pull request #280 from resin-io/feat/lazy-loading
Lazy load command actions dependencies
2015-12-07 16:21:32 -03:00
210680c9c9 Lazy load command actions dependencies
In my system (MBPr 13), printing the current version takes over 2
seconds:

```sh
$ time ./bin/resin version
2.4.0
./bin/resin version  1.37s user 0.19s system 73% cpu 2.130 total
```

The CLI takes almost all of these time to parse the dependency tree
before returning control over the actually called command.

To mitigate this problem, we only require the NPM dependencies a command
requires when executing such command, and thus prevent dependencies from
being required and parsed unnecessary.

After this improvement, printing the original example (`resin version`)
returns in less than a second (2x improvement):

```sh
$ time ./bin/resin version
2.4.0
./bin/resin version  0.88s user 0.09s system 102% cpu 0.938 total
```
2015-12-07 11:48:54 -03:00
6810eb31fd Merge pull request #279 from resin-io/jviotti/feat/npmignore
Add npmignore
2015-12-04 11:02:01 -04:00
f5b6df483d Merge pull request #278 from resin-io/jviotti/doc/readme-inst
Add --production to installation instructions
2015-12-04 10:55:56 -04:00
7d0da7adc0 Merge pull request #277 from resin-io/jviotti/feat/token-login
Support for login in with token
2015-12-04 10:55:39 -04:00
785f2b4ef5 Add npmignore 2015-12-04 08:51:28 -04:00
b668a8c7d0 Add --production to installation instructions 2015-12-04 08:31:39 -04:00
2e247faae4 Merge pull request #276 from resin-io/jviotti/feat/quickstart-after-instructions
Add helpful instructions after quickstart
2015-12-03 10:24:13 -04:00
3997a61b78 Support for login in with token
This is useful in the scenario when the user is using the CLI in an
environment in which he/she doesn't have access to a web browser, like a
headless server or a Vagrant development environment.
2015-12-03 10:22:22 -04:00
8ef27f0525 Add helpful instructions after quickstart 2015-12-02 16:28:32 -04:00
20855be968 Merge pull request #275 from resin-io/jviotti/feat/sudo-explain
Explain why we need the computer password on device init
2015-12-02 15:59:27 -04:00
800d13e3cd Merge pull request #274 from resin-io/jviotti/feat/id-devices
Show id in devices command
2015-12-02 15:59:21 -04:00
abc8399260 Explain why we need the computer password on device init 2015-12-02 11:15:20 -04:00
9ad2ba1131 Show id in devices command 2015-12-02 09:06:41 -04:00
0f8d6a98e3 v2.4.0 2015-12-01 14:43:53 -04:00
81af8c74b4 Merge pull request #273 from resin-io/jviotti/update/doc
Update generated documentation
2015-12-01 14:41:29 -04:00
16ab74294f Update generated documentation 2015-12-01 12:56:53 -04:00
f8bcc9d1ea Merge pull request #272 from resin-io/jviotti/feature/automatic-login-exchange
Perform automatic token exchange with the dashboard
2015-12-01 12:56:07 -04:00
9a89e3c3ca Perform automatic token exchange with the dashboard 2015-11-25 09:25:08 -04:00
359c37f259 Merge pull request #270 from resin-io/jviotti/fix/remove-debug-download-msg
Simplify download output message
2015-11-24 11:07:40 -04:00
1ba5697986 Merge pull request #271 from resin-io/jviotti/dependencies/remove-unused
Remove unused dependencies
2015-11-24 11:07:21 -04:00
647ed1e7aa Remove unused dependencies 2015-11-24 00:06:44 -04:00
b881e23c1c Merge pull request #269 from resin-io/jviotti/feature/device-type-in-app-list
Show device types when selecting applications
2015-11-23 23:39:34 -04:00
ae8621dc81 Simplify download output message
The message displayed the output of the download, which was mainly used
for debugging purposes when developing `device init` and `quickstart`.
2015-11-23 23:38:28 -04:00
e08c3752f9 Show device types when selecting applications
Some CLI commans prompt to select an existing application, presending a
dropdown with all the application names, however it's hard to remember
which application belon to which device type, which makes it easier to
select the wrong application.
2015-11-23 09:23:08 -04:00
65646d1206 v2.3.0 2015-11-20 13:01:58 -04:00
e42d3e8c4c Merge pull request #266 from resin-io/jviotti/feature/resin-url-info
Clarify resin url on auth and whoami
2015-11-18 16:15:46 -04:00
a4642f6184 Clarify resin url on auth and whoami
When you change the `resinUrl` config from time to time it can be
confusing to remember where you're logging in, or in which host you're
in.

Currently I have to check the configuration files/environment variables
manually or run `resin settings`.

This PR prints the detected resin url on `resin login` and `resin
whoami` so it's always clear where you are.
2015-11-16 10:11:08 -04:00
038c871911 Merge pull request #265 from resin-io/jviotti/feature/settings
Implement settings command
2015-11-16 09:03:20 -04:00
f52dd2976f Implement settings command
This command allows the user to list all detected settings.
2015-11-15 22:08:02 -04:00
d079a57da4 Merge pull request #264 from resin-io/jviotti/fix/devices-uuid
Show uuid in devices command
2015-11-13 15:33:17 -04:00
43697a3476 Show uuid in devices command
The command to get information about a device, `resin device` requires a
`uuid` as a parameter. Given that we don't show uuids in `resin
devices`, the user has no way to know what uuid to pass to get extra
information.

We also remove some non very used information columns from `resin
devices` to make space for the uuid.
2015-11-13 14:06:55 -04:00
b893bd1e39 Merge pull request #262 from resin-io/jviotti/feature/windows-elevation
Handle Windows permissions elevation automatically
2015-11-12 14:05:44 -04:00
c3b5a768e1 Handle Windows permissions elevation automatically 2015-11-12 13:30:48 -04:00
111ea44b40 Resin CLI v2.2.0 2015-11-12 08:33:51 -04:00
d1b25c17b6 Merge pull request #261 from resin-io/jviotti/feature/move-device
Implement device move command
2015-11-12 08:32:55 -04:00
ba318f2939 Implement device move command
This command allows to user to move a device to another application he
owns.
2015-11-12 07:47:16 -04:00
7ac0291c53 Merge pull request #260 from resin-io/jviotti/102/feature/device-reconfigure
Implement config reconfigure command
2015-11-11 10:59:31 -04:00
f64676ab98 Implement config reconfigure command
This command allows the user to reconfigure an already provisioned
device.

Fixes: https://github.com/resin-io/resin-cli/issues/102
2015-11-11 10:38:45 -04:00
d522cbe1ca Merge pull request #259 from resin-io/jviotti/refactor/resin-config-json
Make use of resin-config-json for config commands
2015-11-11 10:27:24 -04:00
4fc7a4e436 Make use of resin-config-json for config commands
This module encapsulates the low level details of `config.json` I/O and
tests them extensively.

See: https://github.com/resin-io/resin-config-json
2015-11-11 10:04:46 -04:00
79f2b4f0d5 Merge pull request #258 from resin-io/jviotti/doc/regenerate
Regenerate documentation
2015-11-11 09:17:52 -04:00
880a7b1e25 Regenerate documentation 2015-11-11 08:45:38 -04:00
89c5bb3080 Resin CLI v2.1.0 2015-11-11 08:31:32 -04:00
a71fb8ca4d Merge pull request #257 from resin-io/jviotti/feature/config-json-write
Implement config write command
2015-11-11 08:29:10 -04:00
3b35aed3bf Implement config write command
This command allows the user to overwrite properties of the config.json
file.
2015-11-10 14:28:18 -04:00
0bc3b9460f Merge pull request #256 from resin-io/jviotti/feature/read-config
Implement config read command
2015-11-10 13:08:54 -04:00
5509a3e9fd Implement config read command
This command is used to read a config.json from a provisioned device
2015-11-10 12:53:34 -04:00
f84d0d0980 Merge pull request #253 from resin-io/jviotti/refactor/sudo-president
Use president to provide sudo functionality
2015-10-27 07:58:17 -04:00
c866f6e46c Use president to provide sudo functionality 2015-10-26 09:47:49 -04:00
3192f9d2ef Merge pull request #252 from resin-io/jviotti/fix/239/sudo-explain
Clarify the need of computer password during sudo
2015-10-26 09:42:26 -04:00
de83a06db8 Clarify the need of computer password during sudo
Since we only prompt "Password:", it might be confusing for some users
that think they have to enter their Resin.io password instead.

Fixes: https://github.com/resin-io/resin-cli/issues/239
2015-10-26 08:49:41 -04:00
9260c8dce2 Resin CLI v2.0.1 2015-10-26 08:46:16 -04:00
bea5f22732 Merge pull request #251 from resin-io/jviotti/fix/stream-wait-sudo
Refer to the correct waiting stream function
2015-10-26 08:45:14 -04:00
363f12f81b Refer to the correct waiting stream function
We recently changed to using `rindle`, however looks like we forgot
to replace this particular instance.
2015-10-26 08:34:07 -04:00
1cbd33679f Resin CLI v2.0.0 2015-10-26 08:08:20 -04:00
e962371b59 Merge pull request #248 from resin-io/jviotti/remove/associate
Remove app associate command
2015-10-21 14:13:28 -04:00
77a3d4d6f6 Merge pull request #249 from resin-io/jviotti/fix/validation-module
Fix validation module require typo
2015-10-21 14:13:21 -04:00
fc5fe6cf68 Fix validation module require typo 2015-10-21 13:28:51 -04:00
f921488e8c Remove app associate command 2015-10-21 13:25:22 -04:00
8fe08642f5 Merge pull request #245 from resin-io/jviotti/feature/simplify-quickstart
Remove project directory creation in quickstart
2015-10-21 13:20:35 -04:00
822632718f Merge pull request #247 from resin-io/jvioti/refactor/os
Remove unused getOperatingSystem function
2015-10-21 11:43:19 -04:00
f66cd00646 Remove project directory creation in quickstart
The last part of `quickstart` feels weird. By consensus, we remove the
part that attempts to create a project directory and leave that step to
the user.
2015-10-21 11:18:29 -04:00
5498e45a35 Merge pull request #246 from resin-io/jviotti/refactor/rindle
Use rindle instead of custom waitStream
2015-10-21 11:15:12 -04:00
38479b3191 Merge pull request #244 from resin-io/jviotti/refactor/unused-npm
Remove unused npm dependency
2015-10-21 10:22:09 -04:00
965fd8fc19 Remove unused getOperatingSystem function 2015-10-21 10:20:38 -04:00
7a4f551a47 Use rindle instead of custom waitStream 2015-10-21 10:17:10 -04:00
303fd74012 Merge pull request #243 from resin-io/jviotti/feature/validation
Refactor validation to a single place
2015-10-21 10:11:46 -04:00
6a7d1b0c70 Remove unused npm dependency 2015-10-21 10:02:08 -04:00
c1e6a28640 Refactor validation to a single place 2015-10-21 09:37:25 -04:00
ec72f93480 Merge pull request #242 from resin-io/jviotti/feature/us-pw-login
Implement user/password login with 2FA support
2015-10-21 09:32:17 -04:00
8913fb515b Implement user/password login with 2FA support 2015-10-21 08:28:20 -04:00
6f91ff898f Merge pull request #241 from resin-io/jviotti/doc/drive
Regenerate os initialize documentation
2015-10-20 10:22:40 -04:00
aa949103f6 Merge pull request #240 from resin-io/jviotti/feature/device-init-advanced
Allow advanced option in device init
2015-10-20 09:47:04 -04:00
14bd4ad74e Regenerate os initialize documentation 2015-10-20 09:17:48 -04:00
f2507daa09 Allow advanced option in device init
This option is inherited to `os configure`.
2015-10-20 09:16:56 -04:00
ff81c1e514 Merge pull request #234 from resin-io/jviotti/feature/advanced-options
Ignore advanced configuration questions by default
2015-10-20 09:12:38 -04:00
7ce92b47a0 Merge pull request #238 from resin-io/jviotti/cleanup/dependencies
Remove unused resin-device-config
2015-10-19 16:04:50 -04:00
bde5cc65da Merge pull request #235 from resin-io/jviotti/fix/device-register-help
Load device info after all other device commands
2015-10-19 15:51:15 -04:00
ec9347c3a4 Merge pull request #237 from resin-io/jviotti/fix/hound
Change java_script to javascript in hound config
2015-10-19 15:51:07 -04:00
ceb8dada1d Remove unused resin-device-config 2015-10-19 15:26:09 -04:00
f4186acf80 Merge pull request #236 from resin-io/jviotti/feature/device-register-uuid
Allow passing a custom uuid to device register
2015-10-19 15:17:25 -04:00
05ce54eac1 Change java_script to javascript in hound config
They seemed to change this recently.
2015-10-19 14:21:10 -04:00
d28ecf3230 Allow passing a custom uuid to device register 2015-10-19 14:16:47 -04:00
8562f723c5 Load device info after all other device commands
This command obscures help pages for all device commands registered
afterwards since it's a common prefix for all of them.
2015-10-19 14:14:04 -04:00
f6d2043747 Merge pull request #232 from resin-io/jviotti/fix/app-create-validation
Require application name to have at least 4 characters
2015-10-19 14:06:43 -04:00
485818f3b5 Merge pull request #233 from resin-io/jviotti/fix/app-create-type
Fix --type option taking no effect in app create
2015-10-19 14:03:59 -04:00
ec28bd9c9e Ignore advanced configuration questions by default
The advanced questions can be enabled by passing `--advanced` in `os
configure`.
2015-10-19 14:02:57 -04:00
ad68dcf692 Fix --type option taking no effect in app create 2015-10-19 13:07:23 -04:00
0b7e2a2c8c Require application name to have at least 4 characters
We get a weird error message from pine otherwise:

	ResinRequestError: Request error: It is necessary that each app name
	that is of a user (Auth), has a Length (Type) that is greater than or
	equal to 4.
2015-10-19 10:56:02 -04:00
b6ebd0631a Merge pull request #229 from resin-io/jviotti/feature/os-initialize-type-option
Take device type as an option in os initialize
2015-10-15 09:59:44 -04:00
7ace4bdfa6 Merge pull request #230 from resin-io/jviotti/fix/update
Improve the way the update notifier is shown
2015-10-15 09:43:20 -04:00
1cfbd4197d Improve the way the update notifier is shown
Current has the following problems:

- Our custom message gets printed even if the notifier doesn't contain
an update.

- The notifier box is deferred, therefore it's printed at the end of the
command. Since our custom message is printed at the beginning, it makes
no sense at all.
2015-10-15 09:18:45 -04:00
b2425d2c0e Take device type as an option in os initialize 2015-10-15 09:11:38 -04:00
0ba914236a Merge pull request #228 from resin-io/jviotti/feature/os-initialize-drive
Support drive option in os initialize
2015-10-15 08:49:26 -04:00
71ee0a6cf7 Support drive option in os initialize
This allows the user to bypass the drive selection dialog.

This option can be used along with `--yes` to make the command
completely non-interactive. For example:

	$ resin os initialize rpi.img 'raspberry-pi' --drive /dev/disk2 --yes
2015-10-15 08:14:35 -04:00
4326ad4d9c Merge pull request #227 from resin-io/jviotti/fix/os-initialise-yes
Add missing `yes` option to `os initialize`
2015-10-15 07:44:33 -04:00
055bac6ff4 Merge pull request #226 from resin-io/jviotti/feature/223/update-sudo
Clarify the need for admin privileges on update
2015-10-15 07:40:15 -04:00
58713dc291 Add missing yes option to os initialize
This option is tried to be used within the command, but is not defined
as a formal Capitano option.
2015-10-14 17:49:27 -04:00
adf4aef517 Clarify the need for admin privileges on update
Fixes: https://github.com/resin-io/resin-cli/issues/223
2015-10-14 13:45:08 -04:00
a17bb2cc09 Merge pull request #220 from resin-io/jviotti/changelog/spacing
Remove spaces between lists in CHANGELOG
2015-10-13 13:04:08 -04:00
48d620f7cd Remove spaces between lists in CHANGELOG
GitHub displays the lists in a weird way otherwise.
2015-10-13 12:39:43 -04:00
fa7b104762 Resin CLI v1.1.0 2015-10-13 12:37:50 -04:00
faf2fa167f Merge pull request #219 from resin-io/jviotti/doc/troubleshoot
Remove outdated troubleshooting information
2015-10-13 12:17:46 -04:00
ad1e68427c Remove outdated troubleshooting information 2015-10-13 11:46:21 -04:00
e9147f0f6f Merge pull request #218 from resin-io/jviotti/fix/windows-edison
Avoid _.ary in temporal path disposer
2015-10-12 18:28:30 -04:00
cddf630907 Avoid _.ary in temporal path disposer
For some reason fails with a weird Bluebird error on Windows
2015-10-12 18:12:58 -04:00
494a286cae Merge pull request #217 from resin-io/jviotti/upgrade/sdk
Upgrade SDK to v3.0.0
2015-10-12 09:03:59 -04:00
e5e871ddcd Upgrade SDK to v3.0.0
Breaking changes in this version:

- `resin.models.device.generateUUID()` is now async.
2015-10-12 08:34:22 -04:00
5a3166e3de Merge pull request #215 from resin-io/jviotti/fix/await-wrap
Shorten the length of await device message
2015-10-07 12:41:57 -04:00
3149464c7a Shorten the length of await device message
If the spinner message doesn't fit in your terminal, each spinner
position will be printed in different lines.

We mitigate this by dramatically shortenning the message.
2015-10-07 11:38:59 -04:00
97d9b7816f Merge pull request #214 from resin-io/jviotti/feature/plugin-warn-red
Print plugin warnings in red as other errors
2015-10-06 19:18:33 -04:00
ec77437080 Print plugin warnings in red as other errors
For the sake of consistency.
2015-10-06 18:51:17 -04:00
d65882639a Merge pull request #211 from resin-io/jviotti/feature/101/help-topics
Separate general help per topic relevance
2015-10-02 09:12:58 -04:00
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
3cc41ed62a Merge pull request #212 from resin-io/jviotti/fix/109/root-owner
Call os initialize as an elevated process
2015-10-01 14:08:19 -04:00
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
ed6427c541 Merge pull request #210 from resin-io/jviotti/feature/os-init-type
Make os initialize take a device type instead of a uuid
2015-09-30 15:59:58 -04:00
90be01b05d Make os initialize take a device type instead of a uuid 2015-09-30 14:31:23 -04:00
1124293b9a Merge pull request #209 from resin-io/jviotti/doc/update
Regenerate documentation
2015-09-30 14:30:43 -04:00
0e804fdfd8 Regenerate documentation 2015-09-30 12:07:44 -04:00
0443a35f2b Merge pull request #207 from resin-io/jviotti/fix/promise-using
Fix incorrect Promise.using syntax
2015-09-30 12:06:51 -04:00
3a148217e0 Merge pull request #208 from resin-io/jviotti/fix/manifest-device-type
Send device type correctly to getManifestBySlug
2015-09-30 12:06:45 -04:00
79d1892b66 Send device type correctly to getManifestBySlug
Currently, we we're sending the wholea device object to
`getManifestBySlug`, which ended up in an unsupported device error.
2015-09-30 11:38:34 -04:00
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
5ae83d8337 Merge pull request #206 from resin-io/jviotti/fix/uncompress-os-download
Uncompress zip packages in os download
2015-09-30 10:48:36 -04:00
8694ee2c59 Merge pull request #205 from resin-io/jviotti/feature/rimraf-file-disposer
Use rimraf for deleting os temporary files
2015-09-30 10:31:46 -04:00
8234f7675a Uncompress zip packages in os download
When downloading an operating system image, if the image is a zip
package, uncompress it automatically.
2015-09-30 10:16:24 -04:00
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
a3ebd9827f Merge pull request #204 from resin-io/jviotti/fix/console.info
Use console.info in os download
2015-09-30 10:05:19 -04:00
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
686414b03d Merge pull request #198 from resin-io/jviotti/feature/temp-disposer
Use Promise.disposer() to make sure temp files are deleted
2015-09-29 15:25:09 -04:00
6377618c12 Use console.info in os download
`console.info` calls can be quieted by the `--quiet` option.
2015-09-29 15:15:39 -04:00
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
21fcdfaff6 Use Promise.disposer() to make sure temp files are deleted 2015-09-29 15:08:24 -04:00
4072edcced Merge pull request #203 from resin-io/jviotti/feature/os-initialize
Implement os initialize command
2015-09-29 14:59:59 -04:00
d704c10197 Implement os initialize command
This command initialized an operating system image with a disk device.
2015-09-29 14:52:34 -04:00
dea2a7f055 Merge pull request #202 from resin-io/jviotti/feature/device-register
Implement device register command
2015-09-29 14:41:03 -04:00
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
61474fba5c Merge pull request #201 from resin-io/jviotti/feature/os-configure
Implement os configure
2015-09-29 14:26:03 -04:00
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
e25f232fe5 Merge pull request #200 from resin-io/jviotti/feature/os-download
Implement os download command
2015-09-29 13:11:24 -04:00
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
d2b9e6fd8c Merge branch 'jviotti/doc/anti-virus-ebusy' 2015-09-21 09:28:13 -04:00
cf7effacc0 Document anti virus and EBUSY errors on Windows 2015-09-21 09:27:18 -04:00
1eb7aba293 Merge branch 'master' of https://github.com/resin-io/resin-cli 2015-09-21 09:25:57 -04:00
21e916679c Update author email to @resin.io 2015-09-21 09:15:27 -04:00
d574743c21 Merge pull request #195 from resin-io/jviotti/docs/cygwin-to-troubleshooting
Move Cygwin caveat from README to TROUBLESHOOTING
2015-09-21 08:57:39 -04:00
d8a2b82662 Move Cygwin caveat from README to TROUBLESHOOTING 2015-09-21 08:51:54 -04:00
f4ebd890df Merge pull request #194 from resin-io/jviotti/doc/troubleshooting
Add Troubleshooting guide
2015-09-21 08:47:14 -04:00
b0be5de83a Add Troubleshooting guide
This guide described common Resin CLI issues and how to fix them.
2015-09-21 08:32:11 -04:00
ba21ddd010 Merge pull request #192 from resin-io/jviotti/doc/readme
Improve README.md
2015-09-21 08:01:44 -04:00
eecd7a0fd8 Improve README.md
- Make user oriented instead of developer oriented.
- Remove deprecated information.
- Add Requisites section.
- Add Getting Started section.
- Add Support section.
- Add License section.
2015-09-21 07:56:24 -04:00
eb4c2f62a7 Resin CLI v1.0.0 2015-09-11 21:21:44 +03:00
dc1e5e6512 Merge pull request #190 from resin-io/jviotti/message/await
Improve device awaiting message
2015-09-11 19:19:14 +03:00
adc0b183cd Improve device awaiting message
Current message sounds too robotic.
2015-09-11 19:13:30 +03:00
828b4f73d1 Fix selecting existing application in quickstart 2015-09-11 18:30:30 +03:00
82a0761f49 Merge pull request #189 from resin-io/jviotti/feature/error-highlight
Highlight errors in red
2015-09-11 14:59:14 +03:00
904b9f07fb Highlight errors in red
- Move error translation logic to resin-io/resin-cli-errors.
- Force `process.exit()`.
2015-09-11 14:47:38 +03:00
3c0acaa7da Merge pull request #188 from resin-io/jviotti/feature/device-specs
Implement device specs. Fix #99
2015-09-11 13:10:44 +03:00
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
26e3dc1aa7 Merge pull request #187 from resin-io/jviotti/feature/ignore-resinrc
Add resinrc.yml to gitignore
2015-09-08 09:31:40 +03:00
3bc22a7b7c Merge pull request #186 from resin-io/jviotti/refactor/settings
Use settings from the SDK during login
2015-09-08 09:16:05 +03:00
7e5b2695fe Add resinrc.yml to gitignore
Some modules have an use case for shipping the configuration file with
the project, however this is not the case for the CLI.
2015-09-08 09:07:48 +03:00
79afa79fd9 Use settings from the SDK during login
This enforces all clients to use the Resin Settings Client version that
the SDK provides, reducing incompatibilities caused by different modules
requiring different Resin Settings Client versions.
2015-09-08 09:06:03 +03:00
cdaaddb826 Merge pull request #185 from resin-io/jviotti/upgrade/sdk
Upgrade Resin SDK to v2.7.2
2015-09-07 11:45:25 +03:00
ec5f6a7cd8 Upgrade Resin SDK to v2.7.2 2015-09-07 11:25:01 +03:00
72f34031a9 Merge pull request #184 from resin-io/jviotti/fix/token-auth
Check token validity against the API when login
2015-09-05 20:48:22 +03:00
dc257b5cab Check token validity against the API when login
Consider the following case:

The SDK is configured to point to staging, but the user passes a token
from production, or viceversa. Since the token is valid in a sense that
is valid JWT and contains real data, the CLI will report as a success.

The user will then get Unauthorized errors when using the API.
2015-09-05 20:17:34 +03:00
4bdcd3d2ee Merge pull request #180 from resin-io/issue_#103
Resin CLI Events integration. Fix #103
2015-09-05 20:11:52 +03:00
b0650530cc Resin CLI Events integration. Fix #103 2015-09-05 19:15:31 +03:00
454669ada2 Merge pull request #183 from resin-io/jviotti/182/docs/update
Update documentation
2015-09-01 13:09:42 -04:00
a65975596e Merge pull request #181 from resin-io/reword-example
Replace device name with uuid in env-variables command example
2015-09-01 13:03:27 -04:00
91f878cfc0 Update documentation
- There were changes to commands.
- Regenerates `login` documentation with production url.

Fixes: https://github.com/resin-io/resin-cli/issues/182
2015-09-01 13:01:47 -04:00
8c3e832cdc Replace device name with uuid in env-variables command example 2015-09-01 00:56:01 +03:00
a5c670902d Merge pull request #179 from resin-io/jviotti/appveyor/cache
Add Appveyor cache support
2015-08-28 08:42:57 -04:00
14be1d5f9f Add Appveyor cache support 2015-08-28 08:22:26 -04:00
41d6d5c670 Merge pull request #178 from resin-io/jviotti/refactor/quickstart
Refactor quickstart
2015-08-27 10:13:56 -04:00
a090e6c21d Refactor quickstart
- Use promises.
- Move some logic to `helpers`.
- Inline `device await` command.
2015-08-27 10:01:33 -04:00
d78c1ffa47 Merge pull request #176 from resin-io/jviotti/cleanup/compiled-files
Remove orphaned files from build/
2015-08-27 09:03:38 -04:00
5808d20d88 Merge pull request #177 from resin-io/modify-capitanodoc
Update capitanodoc.json
2015-08-27 15:45:05 +03:00
7f4065e3da Update capitanodoc.json 2015-08-27 15:30:38 +03:00
07daa51051 Remove orphaned files from build/
Some files were deleted from `lib/` but still live in `build/`. More
specifically:

- `build/actions/update.js`.
- `build/data/`.
2015-08-27 08:29:22 -04:00
d10d4ce185 Merge pull request #174 from resin-io/jviotti/feature/confirm-abortion
Add `Aborted` error message when not accepting a confirmation
2015-08-24 08:47:29 -04:00
7f763e7881 Merge pull request #175 from resin-io/jviotti/fix/update-root
Don't check for available updates when running as root
2015-08-24 07:41:56 -04:00
5de0f66d7a Don't check for available updates when running as root
`update-notifier` persist its update check results in a file, which is
then read when running again the application.

If this file gets written when the application is being run as root, we
get ugly EPERM issues.
2015-08-20 16:54:22 -04:00
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
fb28cc7d2f Merge pull request #173 from resin-io/jviotti/upgrade/form
Upgrade Resin CLI Form to v1.2.1
2015-08-20 16:11:17 -04:00
7cf89a9bf6 Merge pull request #172 from resin-io/jviotti/cleanup/readme
Remove Man pages section from README.md
2015-08-20 16:11:09 -04:00
a3cbc549d8 Upgrade Resin CLI Form to v1.2.1
This version contains a fix for a bug that prevented `when` properties
from working as expected.
2015-08-20 15:55:57 -04:00
1c48328347 Remove Man pages section from README.md
Man pages are not longer being produced.
2015-08-20 12:04:11 -04:00
9b69fe3c3c Merge pull request #171 from resin-io/jviotti/upgrade/cli-form
Update Resin CLI Form to v1.2.0
2015-08-20 12:02:26 -04:00
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
fcc44949a7 Merge pull request #169 from resin-io/jviotti/refactor/plugins
Upgrade Nplugm to v3.0.0
2015-08-19 12:49:32 -04:00
006764af66 Merge pull request #170 from resin-io/jviotti/cleanup-resin-write
Remove unused resin-write bin script
2015-08-19 12:49:25 -04:00
b879d3f9ea Remove unused resin-write bin script
This script was used along with windosu as a workaround to call `device
init` with elevated permissions.

Since Windows elevation is not used anymore for now, this script can be
removed.
2015-08-19 11:30:48 -04:00
7f4863da86 Upgrade Nplugm to v3.0.0
This new version supports promises and contains speed improvements.
2015-08-19 11:27:28 -04:00
ba6f50d171 Merge pull request #168 from resin-io/jviotti/cleanup/plugins
Remove plugins manipulation commands
2015-08-19 11:14:35 -04:00
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
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
6f9535ca34 Merge pull request #167 from resin-io/issue-166
Display msg when app/device does not have env variables. Fix #166.
2015-08-18 18:17:21 +03:00
019e2ac357 Display msg when app/device does not have env variables. Fix #166 2015-08-18 18:12:08 +03:00
433916e18a Merge pull request #164 from resin-io/issue-90
Add message informing the user about potential delay in system img initialization. Fix #90.
2015-08-18 16:04:44 +03:00
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
0595452c3d Add message informing the user about potential delay in system img initialization. Fix #90. 2015-08-18 15:43:52 +03:00
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
f7084580b2 Merge pull request #162 from resin-io/issue-106
Reword output during download in device init. Fix #106.
2015-08-18 14:59:08 +03:00
3dd5f5858a Reword ending message in quickstart. Fix #108 2015-08-18 14:34:15 +03:00
02a06e1e7c Reword output during download in device init. Fix #106. 2015-08-18 13:55:04 +03:00
50daf8ef73 Merge pull request #161 from resin-io/jviotti/refactor/env
Refactor env action module to use promises
2015-08-17 10:42:40 -04:00
fd5a34a1c4 Refactor env action module to use promises 2015-08-17 10:32:22 -04:00
51fda13684 Merge pull request #160 from resin-io/jviotti/remove/devices-supported
Remove `devices supported` command
2015-08-17 10:22:10 -04:00
a698b25fda Remove devices supported command
The command is not necessary and unused.
2015-08-17 10:05:36 -04:00
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
e5b7aae4ae Refactor device actions to use promises 2015-08-17 09:49:59 -04:00
031168ceed Merge pull request #158 from resin-io/jviotti/refactor/keys
Refactor keys action to use promises
2015-08-17 09:46:53 -04:00
09a5788902 Refactor keys action to use promises 2015-08-17 09:32:05 -04:00
713664d103 Merge pull request #157 from resin-io/jviotti/feature/settings-projects-dir
Make use of `projectsDirectory` SDK setting in Quickstart
2015-08-17 09:20:30 -04:00
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
79ee4302ec Merge pull request #156 from resin-io/jviotti/upgrade/sdk
Upgrade Resin SDK to v2.4.1
2015-08-17 08:59:17 -04:00
9adda22921 Upgrade Resin SDK to v2.4.1
This new version contains fixes for the following issues:

- https://github.com/resin-io/resin-cli/issues/87
- https://github.com/resin-io/resin-cli/issues/120
2015-08-17 08:42:17 -04:00
25311f2a18 Merge pull request #146 from resin-io/jviotti/refactor/auth
Refactor auth actions to use promises
2015-08-17 08:41:19 -04:00
70c060b124 Refactor auth actions to use promises 2015-08-17 08:22:48 -04:00
7a8a3c851b Merge pull request #138 from resin-io/refactor/help
Refactor help module
2015-08-17 08:02:15 -04:00
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
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
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
64be9f936d Merge pull request #155 from resin-io/jviotti/feature/107/await-spinner
Implement a spinner when awaiting for a device. Fix #107
2015-08-17 08:01:22 -04:00
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
30f6a78282 Merge pull request #154 from resin-io/jviotti/fix/device-await
Fix broken device await command
2015-08-14 14:31:00 -04:00
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
8268bbf700 Merge pull request #150 from resin-io/jviotti/upgrade/sdk
Upgrade Resin SDK to v2.4.0
2015-08-14 12:42:31 -04:00
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
0807b6a2d9 Upgrade Resin SDK to v2.4.0
This release fixes:

- Check if device exists before removing it "resin device rm <uuid>"
	- https://github.com/resin-io/resin-cli/issues/123

- Check if app exists before removing it "resin app rm <appName>"
	- https://github.com/resin-io/resin-cli/issues/114

- Command does not display correct output "resin key <id>"
	- https://github.com/resin-io/resin-cli/issues/112

Since it includes the following PRs:

- https://github.com/resin-io/resin-sdk/pull/103
- https://github.com/resin-io/resin-sdk/pull/107
2015-08-14 12:17:59 -04:00
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
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
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
606777508d Merge pull request #147 from resin-io/jviotti/cleanup/preferences
Remove preferences command
2015-08-14 07:57:14 -04:00
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
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
6e4b299c7d Remove preferences command 2015-08-13 15:00:51 -04:00
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
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
d5204a09f7 Refactor note set command to use promises 2015-08-13 14:17:02 -04:00
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
2e8ec3ac64 Merge pull request #142 from resin-io/jviotti/cleanup/dependencies
Remove unused dependencies imports from various files
2015-08-13 13:51:22 -04:00
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
5408938007 Merge pull request #141 from resin-io/jviotti/cleanup/shell-completion
Remove command shell completion script
2015-08-13 13:08:08 -04:00
50cb04b6f7 Remove unused dependencies imports from various files 2015-08-13 13:04:22 -04:00
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
4157f21e06 Merge pull request #140 from resin-io/jviotti/cleanup/elevate
Remove outdated Windows elevation mechanism
2015-08-13 12:23:26 -04:00
4900230881 Remove command shell completion script
This feature is unused and doesn't provide much value.

In the future, we may include autocompletion support built in the CLI.
2015-08-13 12:21:55 -04:00
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
085781fa18 Upgrade Resin CLI Visuals to v1.1.0
This version contains the `drive` widget.
2015-08-13 11:55:31 -04:00
08ad8bd5d7 Merge pull request #137 from resin-io/cleanup/slim
Slim down unused functionality
2015-08-13 11:52:57 -04:00
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
57319f26a6 Slim down unused functionality 2015-08-12 08:17:46 -04:00
11033683fd Stop supporting iojs 2015-08-06 12:12:44 -04:00
e5166c6c8e Use Install-Product instead of Update-NodeJsInstallation 2015-08-06 11:46:57 -04:00
5c96663d1e Merge pull request #134 from resin-io/remove/drive-command
Remove drive command
2015-08-05 12:24:25 -04:00
ffb48c8669 Merge pull request #135 from resin-io/remove/examples-commands
Remove examples commands
2015-08-05 07:04:03 -04:00
12145a2393 Merge pull request #132 from resin-io/upgrade_travis
Test node v0.12 and io.js
2015-08-05 07:03:51 -04:00
f379866c1c Merge pull request #67 from resin-io/feature/wizard
Implement Quickstart command
2015-08-04 13:19:37 -04:00
dc030f4cd1 Implement Quickstart command 2015-08-04 20:16:55 +03:00
b726a2d778 Remove examples commands 2015-08-04 10:00:09 -04:00
a715ec9dc1 Remove drive command 2015-08-04 09:57:59 -04:00
d24b871964 Merge pull request #131 from resin-io/remove/selfupdate
Remove selfupdate functionality
2015-08-04 09:53:48 -04:00
bd0c4e6034 Merge pull request #133 from resin-io/upgrade_appveyor
Add io.js testing in Appveyor
2015-08-04 09:27:36 -04:00
95637e5608 Test node v0.12 and io.js 2015-08-04 14:15:30 +03:00
93b394ed76 Add io.js testing in Appveyor 2015-08-04 13:26:13 +03:00
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
26b1acf5ef Merge pull request #130 from resin-io/remove/man
Remove man pages
2015-08-03 16:14:23 -04:00
f31eb7c2b5 Add email address to the returned information, when using whoami(). Fix #73. 2015-08-03 21:24:22 +03:00
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
4211333e4e Remove man pages 2015-08-03 12:08:49 -04:00
f220e380a7 Merge pull request #125 from resin-io/issue_#117
Display correctly the newly-created application id. Fix #117
2015-07-29 21:43:31 +03:00
9564b4e478 Display correctly the newly-created application id. Fix #117 2015-07-29 21:17:21 +03:00
e2125b8ce9 Fix #73 2015-07-29 21:15:29 +03:00
0bb0e6ea4b Merge pull request #124 from resin-io/integrate-new-resin-visuals-functionality
Integrate new resin-cli-visuals functionality
2015-07-29 09:43:24 -04:00
cf512cc01b Integrate new resin-cli-visuals functionality 2015-07-29 16:34:31 +03:00
fe3e68c3af Merge pull request #121 from resin-io/modify-function-description
Replace device name with uuid, found in resin envs examples in enviroment-variables
2015-07-28 08:49:19 -04:00
0bbfbe36c7 Replace device name with uuid, found in resin envs examples in enviroment-variables 2015-07-27 22:49:11 +03:00
d6ae689593 Merge pull request #118 from resin-io/resin-cli-form
Integrate resin-cli-form
2015-07-27 13:30:48 -04:00
5b5d1be52f Integrate resin-cli-form 2015-07-27 19:50:47 +03:00
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
64d83dccfb Add promise support for Resin-SDK dependency 2015-07-24 00:24:17 +03:00
122253bb25 Merge pull request #95 from resin-io/fix/device-registered-at
Add registered_at UNIX epoch
2015-07-23 13:00:29 -04:00
1d53db2854 Add registered_at UNIX epoch 2015-07-23 12:47:49 -04:00
30dc5ea1ea Merge pull request #97 from resin-io/upgrade/dependencies
Upgrade dependencies
2015-07-15 09:08:35 -04:00
58c7ff1f1b Upgrade dependencies 2015-07-15 09:01:50 -04:00
57b9d634be Merge pull request #96 from resin-io/upgrade-visuals
Upgrade resin-cli-visuals dependency
2015-07-14 15:12:54 -04:00
6fb25dea88 Upgrade resin-cli-visuals dependencies 2015-07-14 18:18:19 +03:00
10478e389a Merge pull request #94 from resin-io/upgrade_vcs_dependencies
Upgrade Resin VCS dependencies
2015-07-13 07:37:02 -04:00
46fa4ee2a2 Upgrade Resin VCS dependencies 2015-07-11 00:03:20 +03:00
a7cefe44bf Merge pull request #86 from resin-io/feature/remove-selfupdate
Remove selfupdate functionality. Notify in all cases.
2015-07-09 13:45:09 -04:00
3d03585318 Merge pull request #93 from resin-io/feature/last_seen-undefined
Default device.last_seen to 'Not seen'. Closes #84.
2015-07-09 13:44:59 -04:00
076c3428ee Upgrade Resin CLI Visuals to v0.3.2 2015-07-09 13:43:20 -04:00
9d4ac46985 Default device.last_seen to 'Not seen'. Closes #84. 2015-07-09 09:56:39 -04:00
24edb867fa Upgrade Resin CLI Visuals to v0.3.1 2015-07-09 09:46:08 -04:00
e926ac46c9 Remove selfupdate functionality. Notify in all cases. 2015-07-09 08:18:06 -04:00
9ffd657dbb Merge pull request #85 from resin-io/feature/regenerate-docs
Regenerate docs
2015-07-07 18:40:40 -04:00
aa3cb39551 Regenerate docs 2015-07-07 18:01:25 -04:00
0acbdac66f Use NPM 2.12.1 in Appveyor due to a bug in 2.12.0 2015-07-02 14:28:19 -04:00
5619bdbb67 Resin CLI v0.11.1 2015-06-15 10:09:10 -04:00
381e63bfc9 Merge pull request #70 from resin-io/refactor/new-visuals
Upgrade Resin CLI Visuals and use it's new capabilities
2015-06-12 09:47:30 -04:00
e779347ff2 Merge pull request #69 from resin-io/feature/no-chop-key
Don't chop SSH key
2015-06-11 12:48:16 -04:00
8fa906dd48 Upgrade Resin CLI Visuals and use it's new capabilities 2015-06-11 12:46:56 -04:00
7e5ecd634d HOTFIX: isLoggedIn now returns a possible error 2015-06-11 12:40:49 -04:00
29cf4c1e89 Don't chop SSH key 2015-06-11 08:08:45 -04:00
73736abdea Merge pull request #68 from resin-io/feature/config
Implement config command
2015-06-11 07:57:31 -04:00
9ab411bade Resin CLI v0.11.0 2015-06-10 12:52:28 -04:00
ef33156de7 Implement config command 2015-06-10 12:34:42 -04:00
6d8fd6e547 Merge pull request #66 from resin-io/feature/device-init-has-app
Check that the passed application exists before asking to choose device
2015-06-09 08:28:10 -04:00
bab90a8bf2 Merge pull request #65 from resin-io/fix/app-rm-help
Fix app commands order of definition. Closes #62.
2015-06-08 12:44:57 -04:00
43f0288c6c Check that the passed application exists before asking to choose device 2015-06-08 12:31:17 -04:00
47e6371e2e Merge pull request #64 from resin-io/feature/config-inject
Implement config injection
2015-06-05 12:06:54 -04:00
5e400ed335 Fix app commands order of definition. Closes #62.
This caused `resin help app rm` erroneusly show the help page for `resin app`.
2015-06-04 11:54:15 -04:00
56a78b57af Merge branch 'master' of https://github.com/resin-io/resin-cli 2015-06-04 10:38:53 -04:00
2bfeb7f42c Associate a device before first boot 2015-06-04 10:10:15 -04:00
37e0f12f89 Merge pull request #57 from resin-io/feature/associate-confirmation
Ask for confirmation on app associate command
2015-06-04 08:22:01 -04:00
fdd0e4a966 Implement config injection 2015-06-04 08:06:37 -04:00
38df7e0038 Use min mocha reporter 2015-06-04 08:06:08 -04:00
e9efb78280 Merge pull request #56 from resin-io/feature/login-feedback
Display feedback message after login
2015-06-03 08:46:18 -04:00
0424d7b640 Merge pull request #60 from resin-io/fix/login-browser-session
Open dashboardUrl instead of remoteUrl in auth login
2015-06-03 08:45:00 -04:00
2b80c7c91f Merge pull request #59 from resin-io/feature/app-create-feedback
Print feedback message after app create
2015-06-02 17:08:44 -04:00
142e2c0a65 Merge pull request #58 from resin-io/feature/tty-feedback
Quiet console.info if stdout is being redirected
2015-06-02 17:08:31 -04:00
1ed9ae7d60 Open dashboardUrl instead of remoteUrl in auth login 2015-06-02 13:21:59 -04:00
329bf25dbd Print feedback message after app create 2015-06-02 13:04:08 -04:00
e18ffba183 Quiet console.info if stdout is being redirected
We use `console.info()` for feedback messages.
2015-06-02 12:36:17 -04:00
ae3f0b429d Ask for confirmacion on app associate command 2015-06-02 12:32:35 -04:00
34736c4e9b Display feedback message after login 2015-06-02 11:57:52 -04:00
806678ee5f Merge pull request #55 from resin-io/feature/device-env-vars
Add per device environment variable support
2015-06-02 08:13:10 -04:00
1e70401bdd Make use of NPM@2 in Appveyor to prevent lock permission issues 2015-06-01 08:46:19 -04:00
3c7615f20d Upgrade drivelist to v1.2.2
Contains isSystem() fix for Linux
2015-06-01 08:35:48 -04:00
054d5e4879 Add per device environment variable support 2015-05-28 12:32:08 -04:00
b04ed43bed Merge pull request #54 from resin-io/fix/device-await-help
Fix device await help not showing up
2015-05-28 08:46:42 -04:00
c2bbb952c5 Fix device await help not showing up 2015-05-27 15:14:36 -04:00
63a9e1859b Merge pull request #53 from resin-io/feature/example-name
Accept names instead of ids in example commands
2015-05-25 08:53:06 -04:00
68ef069e6a Accept names instead of ids in example commands 2015-05-21 11:58:15 -04:00
72d4b21cb4 Configure appveyor CI 2015-05-21 10:52:37 -04:00
e8b931680d Merge pull request #52 from resin-io/fix/remove-test-notifier
Remove Mocha notification integration
2015-05-20 13:50:47 -04:00
218b407f30 Remove Mocha notification integration
It doesn't work in tmux and causes the process to hang.
2015-05-20 13:15:39 -04:00
773cc27145 Resin CLI v0.10.8 2015-05-19 15:04:52 -04:00
1c76e2e15b Upgrade Resin Image to v1.1.3 2015-05-19 15:02:12 -04:00
e466cfd6ff Resin CLI v0.10.7 2015-05-18 10:39:07 -04:00
992b04d521 Merge pull request #51 from resin-io/feature/nicer-logs
Expose logs as cli.actions.logs instead of cli.actions.logs.logs
2015-05-18 10:38:41 -04:00
5c16c86871 Merge pull request #50 from resin-io/fix/js-main
Point to a JavaScript file in package.json main property
2015-05-18 10:38:28 -04:00
78af9bbb10 Expose logs as cli.actions.logs instead of cli.actions.logs.logs 2015-05-18 09:37:27 -04:00
b78c48d89f Point to a JavaScript file in package.json main property 2015-05-18 09:35:10 -04:00
1f8c610bb0 Resin CLI v0.10.6 2015-05-14 11:50:43 -03:00
d220728380 Merge pull request #49 from resin-io/feature/device-list-devices
Return devices array to the done callback in device list command
2015-05-14 11:47:25 -03:00
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
2a5e66eca6 Merge pull request #48 from resin-io/feature/use-selfupdate
Make use of selfupdate
2015-05-14 11:40:23 -03:00
e7e8ec296c Make use of selfupdate 2015-05-14 11:32:18 -03:00
80e69c56d0 Resin CLI v0.10.5 2015-05-11 14:42:00 -03:00
ce3c6aecff Upgrade Resin SDK to v1.4.3 2015-05-11 14:39:55 -03:00
300f76ba83 Upgrade Resin SDK to v1.4.2 2015-05-11 14:27:09 -03:00
a4e8a38bf4 Merge pull request #44 from resin-io/fix/download-exit
Fix callback not being called on success in os download command
2015-05-11 14:26:07 -03:00
9bb04f43a8 Fix callback not being called on success in os download command 2015-05-11 14:23:34 -03:00
9b0c08bd46 Don't umount in os install as it's already handled in Resin Image 2015-05-11 13:10:06 -03:00
679d48e86e Merge branch 'master' of github.com:resin-io/resin-cli 2015-05-11 13:08:44 -03:00
4b6bf60531 Upgrade Resin Image to v1.1.2 2015-05-11 12:38:19 -03:00
d8ce6648e2 Handle device unmounting in os install command 2015-05-11 10:04:05 -03:00
402bc2d3a8 Merge pull request #43 from resin-io/fix/non-interactive-login
Make login command behave non interactively if a token is passed as an argument
2015-05-11 09:46:07 -03:00
f3e193be0f Make login command behave non interactively if a token is passed as an argument 2015-05-11 09:42:25 -03:00
f5b461612b Upgrade Capitano to v1.6.0 2015-05-11 09:30:07 -03:00
d2514a3fc3 Resin CLI v0.10.4 2015-05-08 14:29:02 -03:00
2019f9fdeb Merge pull request #42 from resin-io/feature/use-resin-image
Make use of resin-image to remove image writing logic from the CLI
2015-05-08 14:28:33 -03:00
656f3e5cd9 Make use of resin-image to remove image writing logic from the CLI 2015-05-08 14:26:04 -03:00
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
4b7eca02a0 Resin CLI v0.10.3 2015-05-07 12:03:40 -03:00
c7788a80e1 Upgrade Resin SDK to v1.4.1
That version includes the os download piping issue fix
2015-05-07 12:03:12 -03:00
08648894e3 Merge pull request #40 from resin-io/feature/device-await
Implement device await command
2015-05-06 11:18:42 -03:00
4c5d5697bc Implement device await command 2015-05-06 11:14:08 -03:00
c758a5b9ea Make use of capitano.run() to run subcommands 2015-05-05 17:34:24 -03:00
2af54e2e28 Merge pull request #39 from resin-io/feature/coffee-compile
Compile CoffeeScript by default when initializing watch task
2015-05-05 06:49:45 -03:00
cf9b23b987 Compile CoffeeScript by default when initializing watch task 2015-05-05 00:21:30 -04:00
f8380ec8e6 Merge pull request #38 from resin-io/feature/os-install-umount
Handle device unmounting in os install command
2015-05-05 00:06:25 -04:00
cd3245a631 Handle device unmounting in os install command 2015-05-02 10:34:11 -04:00
144a155208 Merge pull request #36 from resin-io/feature/standard-version
Implement --version/-v global options. Closes #35
2015-04-30 13:12:51 -04:00
7f7ca13001 Implement --version/-v global options. Closes #35 2015-04-30 11:56:15 -04:00
361e149063 Merge pull request #34 from resin-io/fix/note-validation
Fix note command validation issues
2015-04-29 14:43:47 -04:00
fab85b381a Throw a nice error if note contents are missing 2015-04-29 14:39:46 -04:00
faecf103bf Upgrade Resin SDK to v1.3.4
This version addresses the device validation issue
2015-04-29 14:39:28 -04:00
a0f8c1aa8c Merge pull request #33 from resin-io/fix/devices-app-name
Fix devices command not showing application names. Closes #32
2015-04-29 14:13:09 -04:00
24726b575d Fix devices command not showing application names. Closes #32 2015-04-29 14:07:59 -04:00
688b89a099 Resin CLI v0.10.2 2015-04-28 09:34:41 -04:00
2e39110cc0 Merge pull request #31 from resin-io/feature/app-uniqueness
Check that an application exists before asking it's type. Closes #30
2015-04-28 09:33:59 -04:00
193cedae26 Check that an application exists before asking it's type. Closes #30 2015-04-28 09:18:21 -04:00
3d1f023ef5 Merge pull request #29 from resin-io/feature/list-all-devices
Make devices command list all devices if no application option
2015-04-27 11:26:00 -04:00
9bb51d7146 Make devices command list all devices if no application option. Closes #17 2015-04-27 11:21:30 -04:00
84900aa588 Remove outdated uuid checking help message 2015-04-27 10:51:26 -04:00
b2bce3c4ac Upgrade Resin SDK 2015-04-27 10:49:28 -04:00
8c11620a42 Upgrade Resin SDK 2015-04-27 10:33:34 -04:00
7c1e0ac2e9 Merge pull request #28 from resin-io/fix/logs-messages
Fix logs printing, as messages got added a message property
2015-04-27 10:05:16 -04:00
9a3c844336 Print logs correctly, as they recently got a message field added 2015-04-27 09:30:57 -04:00
69039d21c2 Resin CLI v0.10.1 2015-04-21 11:28:24 -04:00
34c9cdd8bb Upgrade Resin SDK to v1.2.1 2015-04-21 11:26:40 -04:00
0a8b30e824 Resin CLI v0.10.0 2015-04-21 09:06:45 -04:00
ea5b521262 Merge pull request #26 from resin-io/fix/device-init-temp-output
Fix temporary os download output option in device init
2015-04-21 09:06:11 -04:00
3bc71577b5 Fix temporary os download output option in device init 2015-04-21 08:37:40 -04:00
0fb24162fc Merge pull request #24 from resin-io/fix/update
Fix logical issue in update command
2015-04-20 14:14:33 -04:00
d0d63f5bbb Merge pull request #25 from resin-io/deduplicate/whoami
Remove duplicated whoami command
2015-04-20 14:14:25 -04:00
8041905144 Remove duplicated whoami command 2015-04-20 12:46:43 -04:00
37d96e238d Fix logical issue in update command 2015-04-20 12:42:31 -04:00
ae8c941bfe Resin CLI v0.9.0 2015-04-20 12:15:57 -04:00
4c16835ca4 Merge pull request #23 from resin-io/feature/device-init-app-name
Make device init and os download take app names instead of ids
2015-04-20 12:14:53 -04:00
7bd8922a4e Upgrade Resin VCS to v1.2.0 and make use of vcs.getApplicationName() 2015-04-20 11:41:26 -04:00
42b2e2fcf0 Regenerate documentation 2015-04-20 09:14:47 -04:00
f7256e9927 Make device init command take an application name instead of id 2015-04-20 09:13:15 -04:00
85444a5a6a Make os download command accept an application name instead of id 2015-04-20 09:06:40 -04:00
ac115c7ea3 Merge pull request #22 from resin-io/feature/clone-dir
Make "example clone" clone to a new directory
2015-04-20 08:59:28 -04:00
3c2a440553 Make "example clone" clone to a new directory 2015-04-20 08:56:10 -04:00
b29ce3ee04 Resin CLI v0.8.1 2015-04-17 15:09:40 -04:00
2b4394f3ce Merge pull request #21 from resin-io/fix/progress-context
Bind progress update function to avoid context issues
2015-04-17 14:45:17 -04:00
60f704eaa9 Merge pull request #20 from resin-io/fix/elevate-lodash
Add lodash dependency to lib/elevate.coffee
2015-04-17 14:44:50 -04:00
caa4fcf754 Bind progress update function to avoid context issues 2015-04-17 10:11:02 -04:00
c4d1e4244e Upgrade Nplugm to v2.2.0 2015-04-17 10:10:35 -04:00
a6dc155028 Add lodash dependency to lib/elevate.coffee
Depedency was missing and thus elevating functions threw errors.
2015-04-17 09:22:21 -04:00
9c65d11e66 Add documentation anchor support 2015-04-16 11:11:51 -04:00
26f50e7a74 Merge pull request #16 from resin-io/documentation/single-page
Implement Single Page documentation
2015-04-16 09:51:00 -04:00
e4773da1d7 Implement Single Page documentation 2015-04-16 09:49:54 -04:00
dfd8086f63 Resin CLI v0.8.0 2015-04-08 08:37:07 -04:00
ec513c61ad Merge pull request #10 from resin-io/fix/login
Fix bug with login with token
2015-04-08 08:35:57 -04:00
a96ab487ba Fix bug with login with token
The commit was merged from an older branch, in which settings was
still part of the SDK.
2015-04-08 08:25:27 -04:00
cd28c985ce Merge pull request #9 from resin-io/feature/version
Remove bundled node version from version command
2015-04-07 10:56:18 -04:00
727af42ad4 Merge pull request #8 from resin-io/feature/login-with-token
Login with token
2015-04-07 08:12:12 -04:00
e96d411f3e Merge pull request #7 from resin-io/feature/rpi-bundle
Mock local Raspberry Pi bundle
2015-04-07 08:11:43 -04:00
4a7d3d5945 Mock local Raspberry Pi bundle 2015-04-07 08:10:26 -04:00
03f05305cf Fix tiny text issue 2015-04-07 08:07:06 -04:00
af6e9ef85d Merge pull request #6 from resin-io/feature/elevate
Move windosu elevate logic to another module
2015-04-07 08:05:23 -04:00
8533a4a303 Remove bundled node version from version command 2015-04-06 17:18:00 -04:00
85f9234c74 Add .resinconf to gitignore 2015-04-06 17:05:13 -04:00
064afd6705 Fetch TOKEN_URL from the resin sdk 2015-04-06 17:05:13 -04:00
978ff91f87 Remove tab query from preferences token url constant
Tab queries were removed from the web frontend.
2015-04-06 17:04:43 -04:00
5cebbce7bb Update login command documentation 2015-04-06 17:04:03 -04:00
1cd0f02db5 Attempt to open a browser to the token location automatically 2015-04-06 17:04:03 -04:00
77695bb505 Allow login with token 2015-04-06 17:02:53 -04:00
4e4428fdbb Move windosu elevate logic to another module 2015-04-06 16:49:53 -04:00
6e978d74dd Merge pull request #5 from resin-io/feature/hound-config
Add .hound.yml
2015-04-06 10:19:13 -04:00
58974af77b Add .hound.yml 2015-04-06 10:08:49 -04:00
11a0eae7a0 Merge pull request #4 from resin-io/feature/sudo-update
Elevate update command permissions if necessary
2015-04-02 12:53:45 -04:00
2a4ba895e5 Elevate privileges of update command if necessary 2015-04-01 12:51:04 -04:00
19c019076e "resin-cli" "0.7.0" 2015-03-31 13:17:32 -04:00
dfa18d3cb3 Merge pull request #3 from resin-io/fix/selfupdate
Use child_process to trigger self update
2015-03-31 13:15:58 -04:00
782c92885d Use child_process to trigger self update
Using the NPM API led to weird issues.

See https://github.com/npm/npm/issues/7723.
2015-03-24 08:44:02 -04:00
a14dfa6cf1 Fix long line lint warning 2015-03-23 18:32:28 -04:00
f3b6f9d117 Add missing example to device init 2015-03-23 08:25:45 -04:00
63b2b3feb6 Upgrade resin-vcs to 1.1.0 2015-03-23 08:24:29 -04:00
9237dd25ac "resin-cli" "0.6.0" 2015-03-23 08:18:13 -04:00
df9c4ce2fd Reference applications and devices by name 2015-03-23 08:17:55 -04:00
fa5a7abbbf Merge pull request #2 from resin-io/feature/whoami
Reimplement whoami command
2015-03-20 08:55:26 -04:00
cd8bb7882e Reimplement whoami command 2015-03-19 15:57:43 -04:00
3c0378142a Resin CLI v0.5.0 2015-03-19 11:45:38 -04:00
a524bffaa2 Integrate with SDK v1.0.0 2015-03-19 11:45:07 -04:00
4b3decbe03 Resin CLI v0.4.1 2015-03-17 08:54:27 -04:00
fa258a84cc Show a spinner if no progress state in os download command 2015-03-16 11:45:17 -04:00
5efa7309be Fix bug in device init 2015-03-16 11:06:44 -04:00
6e6a01c33c HTML Encode documentation require parameters 2015-03-16 08:51:26 -04:00
94ce15bc2c Make CapitanoDoc output *.markdown files 2015-03-16 08:45:44 -04:00
448 changed files with 134020 additions and 5336 deletions

37
.dockerignore Normal file
View File

@ -0,0 +1,37 @@
# Reminders:
# * Matching rules are different to `.gitignore`
# * A pattern without '**' matches in the project's root directory only
# * Leading and trailing '/' are discarded (it is not possible to
# distinguish between files and directories)
# * More details: https://github.com/balena-io-modules/dockerignore
# development and testing tools or IDEs
**/*.log
**/*.pid
**/*.seed
.idea
.lock-wscript
.nvmrc
.nyc_output
.vscode
coverage
lib-cov
logs
pids
# OS cache files
**/.DS_Store
# balena CLI config and build files
**/.balenaconf
**/.fast-boot.json
**/.resinconf
balenarc.yml
build
build-bin
dist
node_modules
oclif.manifest.json
package-lock.json
resinrc.yml
tmp

View File

@ -9,4 +9,8 @@ trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
[package.json]
indent_style = space
indent_size = 2

2
.eslintignore Normal file
View File

@ -0,0 +1,2 @@
/completion/*
/bin/*

21
.eslintrc.js Normal file
View File

@ -0,0 +1,21 @@
module.exports = {
extends: ['./node_modules/@balena/lint/config/.eslintrc.js'],
parserOptions: {
project: 'tsconfig.dev.json',
},
root: true,
rules: {
ignoreDefinitionFiles: 0,
// to avoid the `warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion`
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-restricted-imports': [
'error',
{
paths: ['resin-cli-visuals', 'chalk', 'common-tags', 'resin-cli-form'],
},
],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
};

16
.gitattributes vendored Normal file
View File

@ -0,0 +1,16 @@
# Set all files to use line feed endings (since we can't match only ones without an extension)
* eol=lf
# And then reset all the files with extensions back to default
*.* -eol
*.sh text eol=lf
.dockerignore eol=lf
Dockerfile eol=lf
Dockerfile.* eol=lf
* text=auto eol=lf
# lf for the docs as it's auto-generated and will otherwise trigger an uncommited error on windows
docs/balena-cli.md text eol=lf
# crlf for the eol conversion test files
tests/test-data/projects/docker-compose/basic/service2/file2-crlf.sh eol=crlf
tests/test-data/projects/no-docker-compose/basic/src/windows-crlf.sh eol=crlf

76
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,76 @@
# About this issue tracker
*The balena CLI (Command Line Interface) is a tool used to interact with the balena platform.
This GitHub issue tracker is used for bug reports and feature requests regarding the CLI
tool. General and troubleshooting questions (such as setting up your project to work with a
balenalib base image) are encouraged to be posted to the [balena
forums](https://forums.balena.io), which are monitored by balena's support team and where the
community can both contribute and benefit from the answers.*
*Please also check that this issue is not a duplicate. If there is another issue describing
the same problem or feature please add comments to the existing issue.*
*Thank you for your time and effort creating the issue report, and helping us improve
the balena CLI!*
---
# Expected Behavior
Please describe what you were expecting to happen. If applicable, please add links to
documentation you were following, or to projects that you were trying to push/build.
# Actual Behavior
Please describe what actually happened instead:
* Quoting logs and error message is useful. If possible, quote the **full** output of the
CLI, not just the error message.
* Please quote the **full command line** too. Sometimes users report that they were
"pushing" or "building" a project, but there are several ways to do so and several
possible "targets" such as balenaCloud, openBalena, local balenaOS device, etc.
Examples:
```
balena push myFleet
balena push 192.168.0.12
balena deploy myFleet
balena deploy myFleet --build
balena build . -f myFleet
balena build . -A armv7hf -d raspberrypi3
```
Each of the above command lines executes different code behind the scenes, so quoting the
full command line is very helpful.
Running the CLI in debug mode (`--debug` flag or `DEBUG=1` environment variable) may reveal
additional information. The `--logs` option reveals additional information for the commands:
```
balena build . --logs
balena deploy myFleet --build --logs
```
# Steps to Reproduce the Problem
This is the most important and helpful part of a bug report. If we cannot reproduce the
problem, it is difficult to tell what the fix should be, or whether code changes have
fixed it.
1.
1.
1.
# Specifications
- **balena CLI version:** e.g. 1.2.3 (output of the `"balena version -a"` command)
- **Cloud backend: openBalena or balenaCloud?** If unsure, it will be balenaCloud
- **Operating system version:** e.g. Windows 10, Ubuntu 18.04, macOS 10.14.5
- **32/64 bit OS and processor:** e.g. 32-bit Windows on 64-bit Intel processor
- **Install method:** npm or zip package or executable installer
- **If npm install, Node.js and npm version:** e.g. Node v8.16.0 and npm v6.4.1
# Additional References
If applicable, please add additional links to GitHub projects, forums.balena.io threads,
gist.github.com, Google Drive attachments, etc.

26
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,26 @@
<!-- You can remove tags that do not apply. -->
Resolves: # <!-- Refer an issue of this repository that this PR fixes -->
Change-type: major|minor|patch <!-- See https://semver.org/ -->
Depends-on: <url> <!-- This change depends on a PR to get merged/deployed first -->
See: <url> <!-- Refer to any external resource, like a PR, document or discussion -->
---
Please check the CONTRIBUTING.md file for relevant information and some
guidance. Keep in mind that the CLI is a cross-platform application that runs
on Windows, macOS and Linux. Tests will be automatically run by balena CI on
all three operating systems, but this will only help if you have added test
code that exercises the modified or added feature code.
Note that each commit message (currently only the first line) will be
automatically copied to the CHANGELOG.md file, so try writing it in a way
that describes the feature or fix for CLI users.
If there isn't a linked issue or if the linked issue doesn't quite match the
PR, please add a PR description to explain its purpose or the features that it
implements. Adding PR comments to blocks of code that aren't self explanatory
usually helps with the review process.
If the PR introduces security considerations or affects the development, build
or release process, please be sure to highlight this in the PR description.
Thank you very much for your contribution!

134
.github/actions/publish/action.yml vendored Normal file
View File

@ -0,0 +1,134 @@
---
name: package and draft GitHub release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: 'JSON stringified object containing all the inputs from the calling workflow'
required: true
secrets:
description: 'JSON stringified object containing all the secrets from the calling workflow'
required: true
variables:
description: 'JSON stringified object containing all the variables from the calling workflow'
required: true
# --- custom environment
XCODE_APP_LOADER_EMAIL:
type: string
default: 'accounts+apple@balena.io'
NODE_VERSION:
type: string
default: '18.x'
VERBOSE:
type: string
default: 'true'
runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: 'composite'
steps:
- name: Download custom source artifact
uses: actions/download-artifact@v3
with:
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ runner.temp }}
- name: Extract custom source artifact
shell: pwsh
working-directory: .
run: tar -xf ${{ runner.temp }}/custom.tgz
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: npm
- name: Install additional tools
if: runner.os == 'Windows'
shell: bash
run: |
choco install yq
- name: Install additional tools
if: runner.os == 'macOS'
shell: bash
run: |
brew install coreutils
# https://www.electron.build/code-signing.html
# https://github.com/Apple-Actions/import-codesign-certs
- name: Import Apple code signing certificate
if: runner.os == 'macOS'
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ fromJSON(inputs.secrets).APPLE_SIGNING }}
p12-password: ${{ fromJSON(inputs.secrets).APPLE_SIGNING_PASSWORD }}
- name: Import Windows code signing certificate
if: runner.os == 'Windows'
shell: powershell
run: |
Set-Content -Path ${{ runner.temp }}/certificate.base64 -Value $env:WINDOWS_CERTIFICATE
certutil -decode ${{ runner.temp }}/certificate.base64 ${{ runner.temp }}/certificate.pfx
Remove-Item -path ${{ runner.temp }} -include certificate.base64
Import-PfxCertificate `
-FilePath ${{ runner.temp }}/certificate.pfx `
-CertStoreLocation Cert:\CurrentUser\My `
-Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
env:
WINDOWS_CERTIFICATE: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING_PASSWORD }}
# https://github.com/product-os/scripts/tree/master/shared
# https://github.com/product-os/balena-concourse/blob/master/pipelines/github-events/template.yml
- name: Package release
shell: bash
run: |
set -ea
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
runner_os="$(echo "${RUNNER_OS}" | tr '[:upper:]' '[:lower:]')"
runner_arch="$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')"
if [[ $runner_os =~ darwin|macos|osx ]]; then
CSC_KEY_PASSWORD=${{ fromJSON(inputs.secrets).APPLE_SIGNING_PASSWORD }}
CSC_KEYCHAIN=signing_temp
CSC_LINK=${{ fromJSON(inputs.secrets).APPLE_SIGNING }}
elif [[ $runner_os =~ windows|win ]]; then
CSC_KEY_PASSWORD=${{ fromJSON(inputs.secrets).WINDOWS_SIGNING_PASSWORD }}
CSC_LINK='${{ runner.temp }}\certificate.pfx'
# patches/all/oclif.patch
MSYSSHELLPATH="$(which bash)"
MSYSTEM=MSYS
# (signtool.exe) https://github.com/actions/runner-images/blob/main/images/win/Windows2019-Readme.md#installed-windows-sdks
PATH="/c/Program Files (x86)/Windows Kits/10/bin/${runner_arch}:${PATH}"
fi
npm run package
find dist -type f -maxdepth 1
env:
# https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/#improvements-for-public-repository-forks
# https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks
CSC_FOR_PULL_REQUEST: true
# https://sectigo.com/resource-library/time-stamping-server
TIMESTAMP_SERVER: http://timestamp.sectigo.com
# Apple notarization (automation/build-bin.ts)
XCODE_APP_LOADER_EMAIL: ${{ inputs.XCODE_APP_LOADER_EMAIL }}
XCODE_APP_LOADER_PASSWORD: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_PASSWORD }}
XCODE_APP_LOADER_TEAM_ID: ${{ inputs.XCODE_APP_LOADER_TEAM_ID }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
path: dist
retention-days: 1

65
.github/actions/test/action.yml vendored Normal file
View File

@ -0,0 +1,65 @@
---
name: test release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
required: true
# --- custom environment
NODE_VERSION:
type: string
default: '18.x'
VERBOSE:
type: string
default: "true"
runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: "composite"
steps:
# https://github.com/actions/setup-node#caching-global-packages-data
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: npm
- name: Set up Python 3.11
if: runner.os == 'macOS'
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: "3.11"
- name: Test release
shell: bash
run: |
set -ea
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
if [[ -e package-lock.json ]] || [[ -e npm-shrinkwrap.json ]]; then
npm ci
else
npm i
fi
npm run build
npm run test:core
- name: Compress custom source
shell: pwsh
run: tar --exclude-vcs -acf ${{ runner.temp }}/custom.tgz .
- name: Upload custom artifact
uses: actions/upload-artifact@v3
with:
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ runner.temp }}/custom.tgz
retention-days: 1

30
.github/workflows/flowzone.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Flowzone
on:
pull_request:
types: [opened, synchronize, closed]
branches: [main, master]
pull_request_target:
types: [opened, synchronize, closed]
branches: [main, master]
jobs:
flowzone:
name: Flowzone
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
# prevent duplicate workflow executions for pull_request and pull_request_target
if: |
(
github.event.pull_request.head.repo.full_name == github.repository &&
github.event_name == 'pull_request'
) || (
github.event.pull_request.head.repo.full_name != github.repository &&
github.event_name == 'pull_request_target'
)
secrets: inherit
with:
custom_runs_on: '[["self-hosted","Linux","distro:focal","X64"],["self-hosted","Linux","distro:focal","ARM64"],["macos-12"],["windows-2019"]]'
repo_config: true
repo_description: "The official balena CLI tool."
github_prerelease: false
restrict_custom_actions: false

60
.gitignore vendored
View File

@ -1,34 +1,36 @@
# Logs
logs
*.log
# Reminders:
# * A pattern without '/' matches in subdirectories as well (files and directories)
# * A leading '/' anchors matching to the directory where `.gitignore` is defined
# * A trailing '/' makes the pattern match against directories only
# More details: https://git-scm.com/docs/gitignore
# Runtime data
pids
# development and testing tools or IDEs
*.log
*.pid
*.seed
/.idea/
/.lock-wscript
/.nvmrc
/.nyc_output/
/.vscode/
/coverage/
/lib-cov/
/logs
/pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# OS cache files
.DS_Store
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
bin/node
release/build
npm-shrinkwrap.json
# balena CLI config and build files
.balenaconf
.fast-boot.json
.resinconf
/balenarc.yml
/build/
/build-bin/
/dist/
/node_modules
/oclif.manifest.json
/package-lock.json
/resinrc.yml
/tmp/

2
.hound.yml Normal file
View File

@ -0,0 +1,2 @@
javascript:
enabled: false

6
.mocharc-standalone.js Normal file
View File

@ -0,0 +1,6 @@
const commonConfig = require('./.mocharc.js');
module.exports = {
...commonConfig,
spec: ['tests/auth/*.spec.ts', 'tests/commands/**/*.spec.ts'],
};

10
.mocharc.js Normal file
View File

@ -0,0 +1,10 @@
module.exports = {
reporter: 'spec',
require: 'ts-node/register/transpile-only',
file: './tests/config-tests',
timeout: 12000,
// To test only, say, 'push.spec.ts', do it as follows so that
// requests are authenticated:
// spec: ['tests/auth/*.spec.ts', 'tests/**/deploy.spec.ts'],
spec: 'tests/**/*.spec.ts',
};

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"useTabs": true
}

View File

@ -1,4 +0,0 @@
language: node_js
node_js:
- "0.11"
- "0.10"

29875
.versionbot/CHANGELOG.yml Normal file

File diff suppressed because it is too large Load Diff

8508
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

316
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,316 @@
# Contributing
The balena CLI is an open source project and your contribution is welcome!
* Install the dependencies listed in the [NPM Installation
section](./INSTALL-ADVANCED.md#npm-installation) section of the installation instructions. Check
the section [Additional Dependencies](./INSTALL-ADVANCED.md#additional-dependencies) too.
* Clone the `balena-cli` repository (or a [forked
repo](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo),
if you are not in the balena team), `cd` to it and run `npm install`.
* Build the CLI with `npm run build` or `npm test`, and execute it with `./bin/balena`
(on a Windows command prompt, you may need to run `node .\bin\balena`).
In order to ease development:
* `npm run build:fast` skips some of the build steps for interactive testing, or
* `npm run test:source` skips testing the standalone zip packages (which is rather slow)
* `./bin/balena-dev` uses `ts-node/register` to transpile on the fly.
Before opening a PR, test your changes with `npm test`. Keep compatibility in mind, as the CLI is
meant to run on Linux, macOS and Windows. balena CI will run test code on all three platforms, but
this will only help if you add some test cases for your new code!
## Semantic versioning, commit messages and the ChangeLog
When a pull request is merged, Balena's versionbot / Continuous Integration system takes care of
automatically creating a new CLI release on both the [npm
registry](https://www.npmjs.com/package/balena-cli) and the GitHub [releases
page](https://github.com/balena-io/balena-cli/releases). The release version numbering adheres to
the [Semantic Versioning's](http://semver.org/) concept of patch, minor and major releases.
Generally, bug fixes and documentation changes are classed as patch changes, while new features are
classed as minor changes. If a change breaks backwards compatibility, it is a major change.
A new version entry is also automatically added to the
[CHANGELOG.md](https://github.com/balena-io/balena-cli/blob/master/CHANGELOG.md) file when a pull
request is merged. Each pull request corresponds to a single version / release. Each commit in the
pull request becomes a bullet point entry in the Changelog. The Changelog file should not be
manually edited.
To support this automation, a commit message should be structured as follows:
```text
The first line becomes a bullet point in the CHANGELOG file
Optionally, a more detailed description in one or more paragraphs.
The detailed description can be seen with `git log`, but it is not copied
to the CHANGELOG file.
Change-type: patch|minor|major
```
Only the first line of the commit message is copied to the Changelog file. The `Change-type` footer
must be preceded by a blank line, and indicates the commit's semver change type. When a PR consists
of multiple commits, the commits may have different change type values. As a whole, the PR will
produce a release of the "highest" change type. For example, two commits mixing patch and minor
change types will produce a minor CLI release, while two commits mixing minor and major change
types will produce a major CLI release.
The commit message is parsed / checked by versionbot with the
[resin-commit-lint](https://github.com/balena-io-modules/resin-commit-lint#resin-commit-lint)
package.
Because of the way that the Changelog file is automatically updated from commit messages, which
become the source of "what's new" for CLI end users, we advocate "meaningful commits" and
user-focused commit messages. A meaningful commit is one that, in isolation, introduces a fix or
feature (or part of a fix or feature) that makes sense at the Changelog level, and which leaves the
CLI in a non-broken state. Sometimes, in the course of preparing a single pull request, a developer
creates several commits as a way of saving their "work in progress", which may even fail to build
(e.g. `npm run build` fails), and which is then fixed or undone by further commits in the same PR.
In this situation, the recommendation is to "squash" or "fixup" the work-in-progress commits into
fewer, meaningful commits. Interactive rebase is a good tool to achieve this:
[blog](https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history),
[docs](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
Mixing multiple distinct features or bug fixes in a single commit is discouraged, because the
description will likely not fit in the single-line Changelog bullet point and also because it
makes it harder to review the pull request (especially a large one) and harder to isolate and
revert individual changes in case a bug is found later on. Create a separate commit for each
feature / bug fix, or even separate pull requests.
If you need to catch up with changes to the master branch while working on a pull request,
use rebase instead of merge: [docs](https://git-scm.com/book/en/v2/Git-Branching-Rebasing).
If `package.json` is updated for dependencies listed in the `repo.yml` file (like `balena-sdk`),
the commit message body should also include a line in the following format:
```
Update balena-sdk from 12.0.0 to 12.1.0
```
This allows versionbot to produce nested Changelog entries (with expandable arrows), pulling in
commit messages from the upstream repositories. The following npm script can be used to
automatically produce a commit with a suitable commit message:
```
npm run update balena-sdk ^12.1.0
```
The script will create a new branch (only if `master` is currently checked out), run `npm update`
with the given target version and commit the `package.json` and `npm-shrinkwrap.json` files. The
script by default will set the `Change-type` to `patch` or `minor`, depending on the semver change
of the updated dependency. A `major` change type can specified as an extra argument:
```
npm run update balena-sdk ^12.14.0 patch
npm run update balena-sdk ^13.0.0 major
```
## Editing documentation files (README, INSTALL, Reference website...)
The `docs/balena-cli.md` file is automatically generated by running `npm run build:doc` (which also
runs as part of `npm run build`). That file is then pulled by scripts in the
[balena-io/docs](https://github.com/balena-io/docs/) GitHub repo for publishing at the [CLI
Documentation page](https://www.balena.io/docs/reference/cli/).
The content sources for the auto generation of `docs/balena-cli.md` are:
* [Selected
sections](https://github.com/balena-io/balena-cli/blob/v12.23.0/automation/capitanodoc/capitanodoc.ts#L199-L204)
of the README file.
* The CLI's command documentation in source code (`lib/commands/` folder), for example:
* `lib/commands/push.ts`
* `lib/commands/env/add.ts`
The README file is manually edited, but subsections are automatically extracted for inclusion in
`docs/balena-cli.md` by the `getCapitanoDoc()` function in
[`automation/capitanodoc/capitanodoc.ts`](https://github.com/balena-io/balena-cli/blob/master/automation/capitanodoc/capitanodoc.ts).
**IMPORTANT**
The file [`capitanodoc.ts`](https://github.com/balena-io/balena-cli/blob/master/automation/capitanodoc/capitanodoc.ts) lists
commands to generate documentation from. At the moment, it's manually updated and maintained alphabetically.
To add a new command to be documented,
1. Find the resource which it is part of or create a new one.
2. List the location of the build file
3. Make sure to add your files in alphabetical order
4. Resources with plural names needs to have 2 sections if they have commands like: "fleet, fleets" or "device, devices" or "tag, tags"
Once added, run the command `npm run build` to generate the documentation
The `INSTALL*.md` and `TROUBLESHOOTING.md` files are also manually edited.
## Patches folder
The `patches` folder contains patch files created with the
[patch-package](https://www.npmjs.com/package/patch-package) tool. Small code changes to
third-party modules can be made by directly editing Javascript files under the `node_modules`
folder and then running `patch-package` to create the patch files. The patch files are then
applied immediately after `npm install`, through the `postinstall` script defined in
`package.json`.
The subfolders of the `patches` folder are documented in the
[apply-patches.js](https://github.com/balena-io/balena-cli/blob/master/patches/apply-patches.js)
script.
To make changes to the patch files under the `patches` folder, **do not edit them directly,**
not even for a "single character change" because the hash values in the patch files also need
to be recomputed by `patch-packages`. Instead, edit the relevant files under `node_modules`
directly, and then run `patch-packages` with the `--patch-dir` option to specify the subfolder
where the patch should be saved. For example, edit `node_modules/exit-hook/index.js` and then
run:
```sh
$ npx patch-package --patch-dir patches/all exit-hook
```
That said, these kinds of patches should be avoided in favour of creating pull requests
upstream. Patch files create additional maintenance work over time as the patches need to be
updated when the dependencies are updated, and they prevent the compounding community benefit
that sharing fixes upstream have on open source projects like the balena CLI. The typical
scenario where these patches are used is when the upstream maintainers are unresponsive or
unwilling to merge the required fixes, the fixes are very small and specific to the balena CLI,
and creating a fork of the upstream repo is likely to be more long-term effort than maintaining
the patches.
## Windows
Besides the regular npm installation dependencies, the `npm run build:installer` script
that produces the `.exe` graphical installer on Windows also requires
[NSIS](https://sourceforge.net/projects/nsis/) and [MSYS2](https://www.msys2.org/) to be
installed. Be sure to add `C:\Program Files (x86)\NSIS` to the PATH, so that `makensis`
is available. MSYS2 is recommended when developing the balena CLI on Windows.
If changes are made to npm scripts in `package.json`, don't assume that a Unix shell like
bash is available. For example, some Windows shells don't have the `cp` and `rm` commands,
which is why you'll often find `ncp` and `rimraf` used in `package.json` scripts.
## Updating the 'npm-shrinkwrap.json' file
The `npm-shrinkwrap.json` file is used to control package dependencies, as documented at
https://docs.npmjs.com/files/shrinkwrap.json.
Changes to `npm-shrinkwrap.json` can be automatically merged by git during operations like
`rebase`, `pull` and `cherry-pick`, but in some cases this results in suboptimal dependency
resolution (the `node_modules` folder may end up larger than necessary, with consequences to CLI
load time too). For this reason, the recommended way to update `npm-shrinkwrap.json` is to run
`npm install`, possibly alongside `npm dedupe` as well. The following commands can be used to
fix shrinkwrap issues and optimize the dependencies:
```sh
git checkout master -- npm-shrinkwrap.json
rm -rf node_modules
npm install # update npm-shrinkwrap.json to satisfy changes to package.json
npm dedupe # deduplicate dependencies from npm-shrinkwrap.json
npm install # re-add optional dependencies removed by dedupe
git add npm-shrinkwrap.json # add it for committing (solve merge errors)
```
Note that `npm dedupe` should always be followed by `npm install`, as shown above, even if
`npm install` had already been executed before `npm dedupe`.
Optionally, these steps may be automated by installing the
[npm-merge-driver](https://www.npmjs.com/package/npm-merge-driver):
```sh
npx npm-merge-driver install -g
```
## `fast-boot` and `npm link` - modifying the `node_modules` folder
During development or debugging, it is sometimes useful to temporarily modify the `node_modules`
folder (with or without making the respective changes to the `npm-shrinkwrap.json` file),
replacing dependencies with different versions. This can be achieved with the `npm link`
command, or by manually editing or copying files to the `node_modules` folder.
Unexpected behavior may then be observed because of the CLI's use of the
[fast-boot2](https://www.npmjs.com/package/fast-boot2) package that caches module resolution.
`fast-boot2` is configured in `lib/fast-boot.ts` to automatically invalidate the cache if
changes are made to the `package.json` or `npm-shrinkwrap.json` files, but the cache won't
be automatically invalidated if `npm link` is used or if manual modifications are made to the
`node_modules` folder. In this situation:
* Manually delete the module cache file (typically `~/.balena/cli-module-cache.json`), or
* Use the `bin/balena-dev` entry point (instead of `bin/balena`) as it does not activate
`fast-boot2`.
## TypeScript and oclif
The CLI currently contains a mix of plain JavaScript and
[TypeScript](https://www.typescriptlang.org/) code. The goal is to have all code written in
Typescript, in order to take advantage of static typing and formal programming interfaces.
The migration towards Typescript is taking place gradually, as part of maintenance work or
the implementation of new features.
Of historical interest, the CLI was originally written in [CoffeeScript](https://coffeescript.org)
and used the [Capitano](https://github.com/balena-io/capitano) framework. All CoffeeScript code was
migrated to either Javascript or Typescript, and Capitano was replaced with oclif. A few file or
variable names still refer to this legacy, for example `automation/capitanodoc/capitanodoc.ts`.
## Programming style
`npm run build` also runs [balena-lint](https://www.npmjs.com/package/@balena/lint), which automatically
reformats the code. Beyond that, we have a preference for Javascript promises over callbacks, and for
`async/await` over `.then()`.
## Common gotchas
One thing that most CLI bugs have in common is the absence of test cases exercising the broken
code, so writing some test code is a great idea. Having said that, there are also some common
gotchas to bear in mind:
* Forward slashes ('/') _vs._ backslashes ('\') in file paths. The Node.js
[path.sep](https://nodejs.org/docs/latest-v12.x/api/path.html#path_path_sep) variable stores a
platform-specific path separator character: the backslash on Windows and the forward slash on
Linux and macOS. The
[path.join](https://nodejs.org/docs/latest-v12.x/api/path.html#path_path_join_paths) function
builds paths using such platform-specific path separator. However:
* Note that Windows (kernel, cmd.exe, PowerShell, many applications) accepts ***both*** forward
slashes and backslashes as path separators (including mixing them in a path string), so code
like `mypath.split(path.sep)` may fail on Windows if `mypath` contains forward slashes. The
[path.parse](https://nodejs.org/docs/latest-v12.x/api/path.html#path_path_parse_path) function
understands both forward slashes and backslashes on Windows, and the
[path.normalize](https://nodejs.org/docs/latest-v12.x/api/path.html#path_path_normalize_path)
function will _replace_ forward slashes with backslashes.
* In [tar](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) streams sent to the Docker
daemon and to balenaCloud, the forward slash is the only acceptable path separator, regardless
of the OS where the CLI is running. Therefore, `path.sep` and `path.join` should never be used
when handling paths in tar streams! `path.posix.join` may be used instead of `path.join`.
* Avoid using the system shell to execute external commands, for example:
`child_process.exec('ssh "arg1" "arg2"');`
`child_process.spawn('ssh "arg1" "arg2"', { shell: true });`
Besides the usual security concerns of unsanitized strings, another problem is to get argument
escaping right because of the differences between the Windows 'cmd.exe' shell and the Unix
'/bin/sh'. For example, 'cmd.exe' doesn't recognize single quotes like '/bin/sh', and uses the
caret (^) instead of the backslash as the escape character. Bug territory! Most of the time,
it is possible to avoid relying on the shell altogether by providing a Javascript array of
arguments:
`spawn('ssh', ['arg1', 'arg2'], { shell: false});`
To allow for logging and debugging, the [which](https://www.npmjs.com/package/which) package may
be used to get the full path of a command before executing it, without relying on any shell:
`const fullPath = await which('ssh');`
`console.log(fullPath); # 'C:\WINDOWS\System32\OpenSSH\ssh.EXE'`
`spawn(fullPath, ['arg1', 'arg2'], { shell: false });`
* Avoid the `instanceof` operator when testing against classes/types from external packages
(including base classes), because `npm install` may result in multiple versions of the same
package being installed (to satisfy declared dependencies) and a false negative may result when
comparing an object instance from one package version with a class of another package version
(even if the implementations are identical in both packages). For example, once we fixed a bug
where the test:
`error instanceof BalenaApplicationNotFound`
changed from true to false because `npm install` added an additional copy of the `balena-errors`
package to satisfy a minor `balena-sdk` version update:
`$ find node_modules -name balena-errors`
`node_modules/balena-errors`
`node_modules/balena-sdk/node_modules/balena-errors`
In the case of subclasses of `TypedError`, a string comparison may be used instead:
`error.name === 'BalenaApplicationNotFound'`
## Further debugging notes
* If you need to selectively run specific tests, `it.only` will not work in cases when authorization is required as part of the test cycle. In order to target specific tests, control execution via `.mocharc.js` instead. Here is an example of targeting the `deploy` tests.
replace: `spec: 'tests/**/*.spec.ts',`
with: `spec: ['tests/auth/*.spec.ts', 'tests/**/deploy.spec.ts'],`

169
INSTALL-ADVANCED.md Normal file
View File

@ -0,0 +1,169 @@
# balena CLI Advanced Installation Options
**These are alternative, advanced installation options. Most users would prefer the [recommended,
streamlined installation
instructions](https://github.com/balena-io/balena-cli/blob/master/INSTALL.md).**
There are 3 options to choose from to install balena's CLI:
* [Executable Installer](#executable-installer): the easiest method on Windows and macOS, using the
traditional graphical desktop application installers.
* [Standalone Zip Package](#standalone-zip-package): these are plain zip files with the balena CLI
executable in them: extract and run. Available for all platforms: Linux, Windows, macOS.
Recommended also for scripted installation in CI (continuous integration) environments.
* [NPM Installation](#npm-installation): recommended for Node.js developers who may be interested
in integrating the balena CLI in their existing projects or workflow.
Some specific CLI commands have a few extra installation steps: see section [Additional
Dependencies](#additional-dependencies).
## Executable Installer
This is the recommended installation option on macOS and Windows. Follow the specific OS
instructions:
* [Windows](./INSTALL-WINDOWS.md)
* [macOS](./INSTALL-MAC.md)
> Note regarding WSL ([Windows Subsystem for
> Linux](https://docs.microsoft.com/en-us/windows/wsl/about))
> If you would like to use WSL, follow the [installations instructions for
> Linux](./INSTALL-LINUX.md) rather than Windows, as WSL consists of a Linux environment.
If you had previously installed the CLI using a standalone zip package, it may be a good idea to
check your system's `PATH` environment variable for duplicate entries, as the terminal will use the
entry that comes first. Check the [Standalone Zip Package](#standalone-zip-package) instructions
for how to modify the PATH variable.
By default, the CLI is installed to the following folders:
OS | Folders
--- | ---
Windows: | `C:\Program Files\balena-cli\`
macOS: | `/usr/local/lib/balena-cli/` <br> `/usr/local/bin/balena`
## Standalone Zip Package
1. Download the latest zip file from the [releases page](https://github.com/balena-io/balena-cli/releases).
Look for a file name that ends with the word "standalone", for example:
`balena-cli-vX.Y.Z-linux-x64-standalone.zip`_also for the Windows Subsystem for Linux_
`balena-cli-vX.Y.Z-macOS-x64-standalone.zip`
`balena-cli-vX.Y.Z-windows-x64-standalone.zip`
2. Extract the zip file contents to any folder you choose. The extracted contents will include a
`balena-cli` folder.
3. Add the `balena-cli` folder to the system's `PATH` environment variable.
See instructions for:
[Linux](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix) |
[macOS](https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/#.Uydjga1dXDg) |
[Windows](https://www.computerhope.com/issues/ch000549.htm)
> * If you are using macOS 10.15 or later (Catalina, Big Sur), [check this known issue and
> workaround](https://github.com/balena-io/balena-cli/issues/2244).
> * **Linux Alpine** and **Busybox:** the standalone zip package is not currently compatible with
> these "compact" Linux distributions, because of the alternative C libraries they ship with.
> For these, consider the [NPM Installation](#npm-installation) option.
> * Note that moving the `balena` executable out of the extracted `balena-cli` folder on its own
> (e.g. moving it to `/usr/local/bin/balena`) will **not** work, as it depends on the other
> folders and files also present in the `balena-cli` folder.
To update the CLI to a new version, download a new release zip file and replace the previous
installation folder. To uninstall, simply delete the folder and edit the PATH environment variable
as described above.
## NPM Installation
If you are a Node.js developer, you may wish to install the balena CLI via [npm](https://www.npmjs.com).
The npm installation involves building native (platform-specific) binary modules, which require
some development tools to be installed first, as follows.
> **The balena CLI currently requires Node.js version 18.**
> **Versions 19 and later are not yet fully supported.**
### Install development tools
#### **Linux or WSL** (Windows Subsystem for Linux)
```sh
$ sudo apt-get update && sudo apt-get -y install curl python3 git make g++
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 18
```
The `curl` command line above uses
[nvm](https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script) to install
Node.js, instead of using `apt-get`. Installing Node.js through `apt-get` is a common source of
problems from permission errors to conflict with other system packages, and therefore not
recommended.
#### **macOS**
* Download and install Apple's Command Line Tools from https://developer.apple.com/downloads/
* Install Node.js through [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script):
```sh
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 18
```
#### **Windows** (not WSL)
Install:
* If you'd like the ability to switch between Node.js versions, install
- Node.js v18 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
[nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows)
instead.
* The [MSYS2 shell](https://www.msys2.org/), which provides `git`, `make`, `g++` and more:
* `pacman -S git gcc make openssh p7zip`
* [Set a Windows environment variable](https://www.onmsft.com/how-to/how-to-set-an-environment-variable-in-windows-10): `MSYS2_PATH_TYPE=inherit`
* Note that a bug in the MSYS2 launch script (`msys2_shell.cmd`) makes text-based
interactive CLI menus to misbehave. [Check this Github issue for a
workaround](https://github.com/msys2/MINGW-packages/issues/1633#issuecomment-240583890).
* The Windows Driver Kit (WDK), which is needed to compile some native Node modules. It is **not**
necessary to install Visual Studio, only the WDK, which is "step 2" in the following guides:
* [WDK for Windows 10](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-2-install-refreshed-wdk-for-windows-10-version-2004)
* [WDK for earlier versions of Windows](https://docs.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads#step-2-install-the-wdk)
* The [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) npm package,
by running the following command on an [administrator
console](https://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/):
`npm install --global --production windows-build-tools`
### Install the balena CLI
After installing the development tools, install the balena CLI with:
```sh
$ npm install balena-cli --global --production --unsafe-perm
```
`--unsafe-perm` is needed when `npm install` is executed as the `root` user (e.g. in a Docker
container) in order to allow npm scripts like `postinstall` to be executed.
## Additional Dependencies
The `balena ssh`, `scan`, `build`, `deploy` and `preload` commands may require
additional software to be installed. Check the Additional Dependencies sections for each operating
system:
* [Windows](./INSTALL-WINDOWS.md#additional-dependencies)
* [macOS](./INSTALL-MAC.md#additional-dependencies)
* [Linux](./INSTALL-LINUX.md#additional-dependencies)
Where Docker or balenaEngine are required, they may be installed on the local machine (where the
balena CLI is executed), on a remote server, or on a balenaOS device running a [balenaOS development
image](https://www.balena.io/docs/reference/OS/overview/2.x/#dev-vs-prod-images). Reasons why this
may be desirable include:
* To avoid having to install Docker on the development machine / laptop.
* To take advantage of a more powerful server (CPU, memory).
* To build or run images "natively" on an ARM device, avoiding the need for QEMU emulation.
To use a remote Docker Engine (daemon) or balenaEngine, specify the remote machine's IP address and
port number with the `--dockerHost` and `--dockerPort` command-line options. The `preload` command
has additional requirements because the bind mount feature is used. For more details, see
`balena help` for each command or the [online
reference](https://www.balena.io/docs/reference/cli/#cli-command-reference).

85
INSTALL-LINUX.md Normal file
View File

@ -0,0 +1,85 @@
# balena CLI Installation Instructions for Linux
These instructions are suitable for most Linux distributions on Intel x86, such as
Ubuntu, Debian, Fedora, Arch Linux and other glibc-based distributions.
For the ARM architecture and for Linux distributions not based on glibc, such as
Alpine Linux, follow the [NPM Installation](./INSTALL-ADVANCED.md#npm-installation)
method.
Selected operating system: **Linux**
1. Download the latest zip file from the [latest release
page](https://github.com/balena-io/balena-cli/releases/latest). Look for a file name that ends
with "-standalone.zip", for example:
`balena-cli-vX.Y.Z-linux-x64-standalone.zip`
2. Extract the zip file contents to any folder you choose, for example `/home/james`.
The extracted contents will include a `balena-cli` folder.
3. Add that folder (e.g. `/home/james/balena-cli`) to the `PATH` environment variable.
Check this [StackOverflow
post](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix)
for instructions. Close and reopen the terminal window so that the changes to `PATH`
can take effect.
4. Check that the installation was successful by running the following commands on a
terminal window:
* `balena version` - should print the CLI's version
* `balena help` - should print a list of available commands
To update the balena CLI to a new version, download a new release zip file and replace the previous
installation folder. To uninstall, simply delete the folder and edit the PATH environment variable
as described above.
## sudo configuration
A few CLI commands require execution through sudo, e.g. `sudo balena scan`.
If your Linux distribution has an `/etc/sudoers` file that defines a `secure_path`
setting, run `sudo visudo` to edit it and add the balena CLI's installation folder to
the ***pre-existing*** `secure_path` setting, for example:
```text
Defaults secure_path="/home/james/balena-cli:<pre-existing entries go here>"
```
If an `/etc/sudoers` file does not exist, or if it does not contain a pre-existing
`secure_path` setting, do not change it.
If you also have Docker installed, ensure that it can be executed ***without*** `sudo`, so that
CLI commands like `balena build` and `balena preload` can also be executed without `sudo`.
Check Docker's [post-installation
steps](https://docs.docker.com/engine/install/linux-postinstall/) on how to achieve this.
## Additional Dependencies
### build, deploy
These commands require [Docker](https://docs.docker.com/install/overview/) or
[balenaEngine](https://www.balena.io/engine/) to be available on a local or remote
machine. Most users will follow [Docker's installation
instructions](https://docs.docker.com/install/overview/) to install Docker on the same
workstation as the balena CLI. The [advanced installation
options](./INSTALL-ADVANCED.md#additional-dependencies) document describes other possibilities.
### balena ssh
The `balena ssh` command requires the `ssh` command-line tool to be available. Most Linux
distributions will already have it installed. Otherwise, `sudo apt-get install openssh-client`
should do the trick on Debian or Ubuntu.
The `balena ssh` command also requires an SSH key to be added to your balena account: see [SSH
Access documentation](https://www.balena.io/docs/learn/manage/ssh-access/). The `balena key*`
command set can also be used to list and manage SSH keys: see `balena help -v`.
### balena scan
The `balena scan` command requires a multicast DNS (mDNS) service like
[Avahi](https://en.wikipedia.org/wiki/Avahi_(software)), which is installed by default on most
desktop Linux distributions. Otherwise, on Debian or Ubuntu, the installation command would be
`sudo apt-get install avahi-daemon`.
### balena preload
Like the `build` and `deploy` commands, the `preload` command requires Docker, with the additional
restriction that Docker must be installed on the local machine (because Docker's bind mounting
feature is used).

74
INSTALL-MAC.md Normal file
View File

@ -0,0 +1,74 @@
# balena CLI Installation Instructions for macOS
These instructions are for the recommended installation option. Advanced users may also be
interested in [advanced installation options](./INSTALL-ADVANCED.md).
Selected operating system: **macOS**
1. Download the installer from the [latest release
page](https://github.com/balena-io/balena-cli/releases/latest).
Look for a file name that ends with "-installer.pkg":
`balena-cli-vX.Y.Z-macOS-x64-installer.pkg`
2. Double click on the downloaded file to run the installer and follow the installer's
instructions.
3. Check that the installation was successful:
- [Open the Terminal
app](https://support.apple.com/en-gb/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac).
- On the terminal prompt, type `balena version` and hit Enter. It should display
the version of the balena CLI that you have installed.
No further steps are required to run most CLI commands. The `balena ssh`, `build`, `deploy`
and `preload` commands may require additional software to be installed, as described
in the next section.
To update the balena CLI, repeat the steps above for the new version.
To uninstall it, run the following command on a terminal prompt:
```text
sudo /usr/local/lib/balena-cli/bin/uninstall
```
## Additional Dependencies
### build and deploy
These commands require [Docker](https://docs.docker.com/install/overview/) or
[balenaEngine](https://www.balena.io/engine/) to be available on a local or remote
machine. Most users will follow [Docker's installation
instructions](https://docs.docker.com/install/overview/) to install Docker on the same
workstation as the balena CLI. The [advanced installation
options](./INSTALL-ADVANCED.md#additional-dependencies) document describes other possibilities.
### balena ssh
The `balena ssh` command requires the `ssh` command-line tool to be available. To check whether
it is already installed, run `ssh` on a Terminal window. If it is not yet installed, the options
include:
* Download the Xcode Command Line Tools from https://developer.apple.com/downloads
* Or, if you have Xcode installed, open Xcode, choose Preferences → General → Downloads →
Components → Command Line Tools → Install.
* Or, install [Homebrew](https://brew.sh/), then `brew install openssh`
The `balena ssh` command also requires an SSH key to be added to your balena account: see [SSH
Access documentation](https://www.balena.io/docs/learn/manage/ssh-access/). The `balena key*`
command set can also be used to list and manage SSH keys: see `balena help -v`.
### balena preload
Like the `build` and `deploy` commands, the `preload` command requires Docker.
Preloading balenaOS images for some older device types (like the Raspberry
Pi 3, but not the Raspberry 4) requires Docker to support the [AUFS storage
driver](https://docs.docker.com/storage/storagedriver/aufs-driver/). Unfortunately, Docker Desktop
for Windows and macOS dropped support for the AUFS filesystem in Docker CE versions greater than
18.06.1. The present workarounds are to either:
* Install the balena CLI on Linux (e.g. Ubuntu) with a virtual machine like VirtualBox.
This works because Docker for Linux still supports AUFS. Hint: if using a virtual machine,
copy the image file over, rather than accessing it through "file sharing", to avoid errors.
* Downgrade Docker Desktop to version 18.06.1. Link: [Docker CE for
Mac](https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-18061-ce-mac73-2018-08-29)
We are working on replacing AUFS with overlay2 in balenaOS images of the affected device types.

73
INSTALL-WINDOWS.md Normal file
View File

@ -0,0 +1,73 @@
# balena CLI Installation Instructions for Windows
These instructions are for the recommended installation option. Advanced users may also be
interested in [advanced installation options](./INSTALL-ADVANCED.md).
Selected operating system: **Windows**
1. Download the installer from the [latest release
page](https://github.com/balena-io/balena-cli/releases/latest).
Look for a file name that ends with "-installer.exe":
`balena-cli-vX.Y.Z-windows-x64-installer.exe`
2. Double click on the downloaded file to run the installer and follow the installer's
instructions.
3. Check that the installation was successful:
- Click on the Windows Start Menu, type PowerShell, and then click
on Windows PowerShell.
- On the command prompt, type `balena version` and hit Enter. It should display
the version of the balena CLI that you have installed.
No further steps are required to run most CLI commands. The `balena ssh`, `scan`, `build`,
`deploy` and `preload` commands may require additional software to be installed, as
described below.
## Additional Dependencies
### build and deploy
These commands require [Docker](https://docs.docker.com/install/overview/) or
[balenaEngine](https://www.balena.io/engine/) to be available on a local or remote
machine. Most users will follow [Docker's installation
instructions](https://docs.docker.com/install/overview/) to install Docker on the same
workstation as the balena CLI. The [advanced installation
options](./INSTALL-ADVANCED.md#additional-dependencies) document describes other possibilities.
### balena ssh
The `balena ssh` command requires the `ssh` command-line tool to be available. Microsoft started
distributing an SSH client with Windows 10, which is automatically installed through Windows
Update. To check whether it is installed, run `ssh` on a Windows Command Prompt or PowerShell. It
can also be [manually
installed](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse)
if needed. For older versions of Windows, there are several ssh/OpenSSH clients provided by 3rd
parties.
The `balena ssh` command also requires an SSH key to be added to your balena account: see [SSH
Access documentation](https://www.balena.io/docs/learn/manage/ssh-access/). The `balena key*`
command set can also be used to list and manage SSH keys: see `balena help -v`.
### balena scan
The `balena scan` command requires a multicast DNS (mDNS) service like Apple's Bonjour.
Many Windows machines will already have this service installed, as it is bundled in popular
applications such as Skype (Wikipedia lists [several others](https://en.wikipedia.org/wiki/Bonjour_(software))).
Otherwise, Bonjour for Windows can be downloaded and installed from: https://support.apple.com/kb/DL999
### balena preload
Like the `build` and `deploy` commands, the `preload` command requires Docker.
Preloading balenaOS images for some older device types (like the Raspberry
Pi 3, but not the Raspberry 4) requires Docker to support the [AUFS storage
driver](https://docs.docker.com/storage/storagedriver/aufs-driver/). Unfortunately, Docker Desktop
for Windows and macOS dropped support for the AUFS filesystem in Docker CE versions greater than
18.06.1. The present workarounds are to either:
* Install the balena CLI on Linux (e.g. Ubuntu) with a virtual machine like VirtualBox.
This works because Docker for Linux still supports AUFS. Hint: if using a virtual machine,
copy the image file over, rather than accessing it through "file sharing", to avoid errors.
* Downgrade Docker Desktop to version 18.06.1. Link: [Docker CE for
Windows](https://docs.docker.com/docker-for-windows/release-notes/#docker-community-edition-18061-ce-win73-2018-08-29)
We are working on replacing AUFS with overlay2 in balenaOS images of the affected device types.

12
INSTALL.md Normal file
View File

@ -0,0 +1,12 @@
# balena CLI Installation Instructions
Please select your operating system:
* [Windows](./INSTALL-WINDOWS.md)
* [macOS](./INSTALL-MAC.md)
* [Linux](./INSTALL-LINUX.md)
> Note regarding WSL ([Windows Subsystem for
> Linux](https://docs.microsoft.com/en-us/windows/wsl/about))
> If you would like to use WSL, follow the installations instructions for Linux
> rather than Windows, as WSL consists of a Linux environment.

190
LICENSE
View File

@ -1,21 +1,177 @@
The MIT License
Copyright (c) 2014 Resin.io, Inc. https://resin.io
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
1. Definitions.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

198
README.md
View File

@ -1,65 +1,181 @@
# Resin CLI
# balena CLI
[![npm version](https://badge.fury.io/js/resin-cli.svg)](http://badge.fury.io/js/resin-cli)
[![dependencies](https://david-dm.org/resin-io/resin-cli.png)](https://david-dm.org/resin-io/resin-cli.png)
[![Build Status](https://travis-ci.org/resin-io/resin-cli.svg?branch=master)](https://travis-ci.org/resin-io/resin-cli)
The official balena Command Line Interface.
The official Resin CLI tool.
[![npm version](https://badge.fury.io/js/balena-cli.svg)](http://badge.fury.io/js/balena-cli)
[![dependencies](https://david-dm.org/balena-io/balena-cli.svg)](https://david-dm.org/balena-io/balena-cli)
## Installing
## About
The balena CLI is a Command Line Interface for [balenaCloud](https://www.balena.io/cloud/) or
[openBalena](https://www.balena.io/open/). It is a software tool available for Windows, macOS and
Linux, used through a command prompt / terminal window. It can be used interactively or invoked in
scripts. The balena CLI builds on the [balena API](https://www.balena.io/docs/reference/api/overview/)
and the [balena SDK](https://www.balena.io/docs/reference/sdk/node-sdk/), and can also be directly
imported in Node.js applications. The balena CLI is an [open-source project on
GitHub](https://github.com/balena-io/balena-cli/), and your contribution is also welcome!
## Installation
Check the [balena CLI installation instructions on
GitHub](https://github.com/balena-io/balena-cli/blob/master/INSTALL.md).
## Choosing a shell (command prompt/terminal)
On **Windows,** the standard Command Prompt (`cmd.exe`) and
[PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell?view=powershell-6)
are supported. Alternative shells include:
* [MSYS2](https://www.msys2.org/):
* Install additional packages with the command:
`pacman -S git gcc make openssh p7zip`
* [Set a Windows environment variable](https://www.onmsft.com/how-to/how-to-set-an-environment-variable-in-windows-10): `MSYS2_PATH_TYPE=inherit`
* Note that a bug in the MSYS2 launch script (`msys2_shell.cmd`) makes text-based interactive CLI
menus to break. [Check this Github issue for a
workaround](https://github.com/msys2/MINGW-packages/issues/1633#issuecomment-240583890).
* [MSYS](http://www.mingw.org/wiki/MSYS)
* [Git for Windows](https://git-for-windows.github.io/)
* During the installation, you will be prompted to choose between _"Use MinTTY"_ and _"Use
Windows' default console window"._ Choose the latter, because of the same [MSYS2
bug](https://github.com/msys2/MINGW-packages/issues/1633) mentioned above (Git for Windows
actually uses MSYS2). For a screenshot, check this
[comment](https://github.com/balena-io/balena-cli/issues/598#issuecomment-556513098).
* Microsoft's [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about)
(WSL). In this case, a Linux distribution like Ubuntu is installed via the Microsoft Store, and a
balena CLI release **for Linux** should be selected. See
[FAQ](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md) for using the
balena CLI with WSL and Docker Desktop for Windows.
On **macOS** and **Linux,** the standard terminal window is supported. Optionally, `bash` command
auto completion may be enabled by copying the
[balena_comp](https://github.com/balena-io/balena-cli/blob/master/completion/balena-completion.bash)
file to your system's `bash_completion` directory: check [Docker's command completion
guide](https://docs.docker.com/compose/completion/) for system setup instructions.
## Logging in
Several CLI commands require access to your balenaCloud account, for example in order to push a
new release to your fleet. Those commands require creating a CLI login session by running:
```sh
$ npm install -g resin-cli
$ balena login
```
### Running locally
## Proxy support
```sh
$ ./bin/resin
HTTP(S) proxies can be configured through any of the following methods, in precedence order
(from higher to lower):
* The `BALENARC_PROXY` environment variable in URL format, with protocol (`http` or `https`),
host, port and optionally basic auth. Examples:
* `export BALENARC_PROXY='https://bob:secret@proxy.company.com:12345'`
* `export BALENARC_PROXY='http://localhost:8000'`
* The `proxy` setting in the [CLI config
file](https://www.npmjs.com/package/balena-settings-client#documentation). It may be:
* A string in URL format, e.g. `proxy: 'http://localhost:8000'`
* An object in the format:
```yaml
proxy:
protocol: 'http'
host: 'proxy.company.com'
port: 12345
proxyAuth: 'bob:secret'
```
* The `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables, in the same URL format as
`BALENARC_PROXY`.
### Proxy setup for balena ssh
In order to work behind a proxy server, the `balena ssh` command requires the
[`proxytunnel`](http://proxytunnel.sourceforge.net/) package (command-line tool) to be installed.
`proxytunnel` is available for Linux distributions like Ubuntu/Debian (`apt install proxytunnel`),
and for macOS through [Homebrew](https://brew.sh/). Windows support is limited to the [Windows
Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about) (e.g., by installing
Ubuntu through the Microsoft App Store).
Ensure that the proxy server is configured to allow proxy requests to ssh port 22, using
SSL encryption. For example, in the case of the [Squid](http://www.squid-cache.org/) proxy
server, it should be configured with the following rules in the `squid.conf` file:
`acl SSL_ports port 22`
`acl Safe_ports port 22`
### Proxy exclusion
The `BALENARC_NO_PROXY` variable may be used to exclude specified destinations from proxying.
> * This feature requires CLI version 11.30.8 or later. In the case of the npm [installation
> option](https://github.com/balena-io/balena-cli/blob/master/INSTALL.md), it also requires
> Node.js version 10.16.0 or later.
> * To exclude a `balena ssh` target from proxying (IP address or `.local` hostname), the
> `--noproxy` option should be specified in addition to the `BALENARC_NO_PROXY` variable.
By default (if `BALENARC_NO_PROXY` is not defined), all [private IPv4
addresses](https://en.wikipedia.org/wiki/Private_network) and `'*.local'` hostnames are excluded
from proxying. Other hostnames that resolve to private IPv4 addresses are **not** excluded by
default, because matching takes place before name resolution.
`localhost` and `127.0.0.1` are always excluded from proxying, regardless of the value of
BALENARC_NO_PROXY.
The format of the `BALENARC_NO_PROXY` environment variable is a comma-separated list of patterns
that are matched against hostnames or IP addresses. For example:
```
export BALENARC_NO_PROXY='*.local,dev*.mycompany.com,192.168.*'
```
## Tests
Matched patterns are excluded from proxying. Wildcard expressions are documented at
[matcher](https://www.npmjs.com/package/matcher#usage). Matching takes place _before_ name
resolution, so a pattern like `'192.168.*'` will **not** match a hostname that resolves to an IP
address like `192.168.1.2`.
You can run the [Mocha](http://mochajs.org/) test suite, you can do:
## Command reference documentation
```sh
$ gulp test
```
The full CLI command reference is available [on the web](https://www.balena.io/docs/reference/cli/
) or by running `balena help --verbose`.
## Development mode
## Support, FAQ and troubleshooting
The following command will watch for any changes and will run a linter and the whole test suite:
To learn more, troubleshoot issues, or to contact us for support:
```sh
$ gulp watch
```
* Check the [masterclass tutorials](https://www.balena.io/docs/learn/more/masterclasses/overview/)
* Check our [FAQ / troubleshooting document](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md)
* Ask us a question in the [balena forums](https://forums.balena.io/c/product-support)
If you set `DEBUG` environment variable, errors will print with a stack trace:
For CLI bug reports or feature requests, check the
[CLI GitHub issues](https://github.com/balena-io/balena-cli/issues/).
```sh
$ DEBUG=true resin ...
```
## Deprecation policy
## Documentation
The balena CLI uses [semver versioning](https://semver.org/), with the concepts
of major, minor and patch version releases.
You can renegerate the documentation with:
The latest release of a major version of the balena CLI will remain compatible with
the balenaCloud backend services for at least one year from the date when the
following major version is released. For example, balena CLI v11.36.0, as the
latest v11 release, would remain compatible with the balenaCloud backend for one
year from the date when v12.0.0 was released.
```sh
$ npm run-script doc
```
Half way through to that period (6 months after the release of the next major
version), older major versions of the balena CLI will start printing a deprecation
warning message when it is used interactively (when `stderr` is attached to a TTY
device file). At the end of that period, older major versions will exit with an
error message unless the `--unsupported` flag is used. This behavior was
introduced in CLI version 12.47.0 and is also documented by `balena help`.
To take advantage of the latest backend features and ensure compatibility, users
are encouraged to regularly update the balena CLI to the latest version.
## Manual pages
## Contributing (including editing documentation files)
UNIX manual pages reside in `man/`
Please have a look at the [CONTRIBUTING.md](./CONTRIBUTING.md) file for some guidance before
submitting a pull request or updating documentation (because some files are automatically
generated). Thank you for your help and interest!
You can regenerate UNIX `roff` manual pages from markdown with:
## License
```sh
$ gulp man
```
If you add a new `man` page, remember to add the generated filename to the `man` array in `package.json`.
## Caveats
- Some interactive widgets don't work on [Cygwin](https://cygwin.com/). If you're running Windows, it's preferrable that you use `cmd.exe`, as `Cygwin` is [not official supported by Node.js](https://github.com/chjj/blessed/issues/56#issuecomment-42671945).
The project is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
A copy is also available in the LICENSE file in this repository.

131
TROUBLESHOOTING.md Normal file
View File

@ -0,0 +1,131 @@
# balena CLI FAQ & Troubleshooting
## Where is the balena CLI's configuration file located?
The per-user configuration file lives in `$HOME/.balenarc.yml` or `%UserProfile%\_balenarc.yml`, in
Unix based operating systems and Windows respectively.
The balena CLI also attempts to read a `balenarc.yml` file in the current directory, which takes
precedence over the per-user configuration file.
## How do I point the balena CLI to the staging environment?
Set the `BALENARC_BALENA_URL=balena-staging.com` environment variable, or add
`balenaUrl: balena-staging.com` to the balena CLI's configuration file.
## How do I make the balena CLI persist data in another directory?
The balena CLI persists the session token, as well as cached assets, to `$HOME/.balena` or
`%UserProfile%\_balena`. This directory can be changed by setting an environment variable,
`BALENARC_DATA_DIRECTORY=/opt/balena`, or by adding `dataDirectory: /opt/balena` to the CLI's
configuration file, replacing `/opt/balena` with the desired directory.
## After burning to an SD card, my device doesn't boot
Check whether the downloaded image is incomplete (download was interrupted) or corrupted.
Try clearing the cache (`%HOME/.balena/cache` or `C:\Users\<user>\_balena\cache`) and running the
command again.
## I get a permission error when burning to an SD card
Check whether the SD card is locked (a physical switch on the side of the card).
## I get `connect ETIMEDOUT` with `balena tunnel`
Please update the CLI to the latest version. This issue was fixed in v12.38.5.
For more details, see: https://github.com/balena-io/balena-cli/issues/2172
## I get EINVAL errors on Cygwin
The errors may look something like this:
```
net.js:156
this._handle.open(options.fd);
^
Error: EINVAL, invalid argument
```
Some interactive widgets don't work on `Cygwin`. On Windows, PowerShell or `cmd.exe` are better
supported. Alternative shells are [listed in the README
file](./README.md#choosing-a-shell-command-promptterminal).
## I get `Invalid MBR boot signature` when configuring a device
This error, accompanied with something like: `Expected 0xAA55, but saw 0x29FE` usually indicates a corrupted device operating system image in the cache, due to bad a internet connection during the download process.
Try clearing the cache with the following command and trying again:
```sh
$ rm -rf $HOME/.balena/cache
```
Or in Windows:
```sh
> del /s /q %UserProfile%\_balena\cache
```
## I get `EACCES: permission denied` when logging in
The balena CLI stores the session token in `$HOME/.balena` or `C:\Users\<user>\_balena` in UNIX based
operating systems and Windows respectively. This error usually indicates that the user doesn't have
permissions over that directory, which can happen if the CLI was executed as the `root` user.
Try resetting the ownership by running:
```sh
$ sudo chown -R <user> $HOME/.balena
```
## Broken line wrapping / cursor behavior with `balena ssh`
Users sometimes come across broken line wrapping or cursor behavior in text terminals, for example
when long command lines are typed in a `balena ssh` session, or when using text editors like `vim`
or `nano`. This is not something specific to the balena CLI, being also a commonly reported issue
with standard remote terminal tools like `ssh` or `telnet`. It is often a remote shell
configuration issue (files like `/etc/profile`, `~/.bash_profile`, `~/.bash_login`, `~/.profile`
and the like on the remote machine), including UTF-8 misconfiguration, the use of unsupported ASCII
control characters in shell prompt formatting (e.g. the `$PS1` env var) or the output of tools or
log files that use colored text. The issue can sometimes be fixed by simply resizing the client
terminal window, or by running one or more of the following commands on the shell:
```sh
export TERMINAL=linux
stty sane
shopt -s checkwinsize
bind 'set horizontal-scroll-mode off'
```
Terminal multiplexer tools like GNU `screen` or `tmux` are sometimes reported to fix the issues, though at other times they are reported as the _cause_ of the problem. They have their own configuration files to take into account.
Further reference:
* https://stackoverflow.com/questions/1133031/shell-prompt-line-wrapping-issue
* https://superuser.com/questions/46948/any-way-to-fix-screens-mishandling-of-line-wrap-maybe-only-terminal-app
* https://unix.stackexchange.com/questions/105958/terminal-prompt-not-wrapping-correctly
* https://unix.stackexchange.com/questions/529377/terminal-long-line-wrapping
* https://github.com/microsoft/WSL/issues/1436
If nothing seems to help, consider also using a different client-side terminal application:
* Linux: xterm, KDE Konsole, GNOME Terminal
* Mac: Terminal, iTerm2
* Windows: PowerShell, PuTTY, WSL (Windows Subsystem for Linux)
## "Docker seems to be unavailable" error when using Windows Subsystem for Linux (WSL)
When running on WSL, the recommendation is to install a CLI release for Linux, like the standalone
zip package for Linux. However, commands like "balena build" will, by default, attempt to reach the
Docker daemon at the Unix socket path `/var/run/docker.sock`, while Docker Desktop for Windows uses
a Windows named pipe at `//./pipe/docker_engine` (which the Linux CLI on WSL cannot use). A
solution is:
- Open the Docker Desktop for Windows settings panel and tick the checkbox _"Expose daemon on tcp://localhost:2375 without TLS"._
- On the WSL command line, set an env var:
`export DOCKER_HOST=tcp://localhost:2375`
Alternatively, use the command-line options `-h 127.0.0.1 -p 2375` for commands like `balena build` and `balena deploy`.
Further reference:
- https://techcommunity.microsoft.com/t5/Containers/WSL-Interoperability-with-Docker/ba-p/382405
- https://forums.docker.com/t/wsl-and-docker-for-windows-cannot-connect-to-the-docker-daemon-at-tcp-localhost-2375-is-the-docker-daemon-running/63571/12

567
automation/build-bin.ts Normal file
View File

@ -0,0 +1,567 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { JsonVersions } from '../lib/commands/version/index';
import { run as oclifRun } from '@oclif/core';
import * as archiver from 'archiver';
import * as Bluebird from 'bluebird';
import { execFile } from 'child_process';
import * as filehound from 'filehound';
import { Stats } from 'fs';
import * as fs from 'fs-extra';
import * as klaw from 'klaw';
import * as path from 'path';
import * as rimraf from 'rimraf';
import * as semver from 'semver';
import { promisify } from 'util';
import { notarize } from '@electron/notarize';
import { stripIndent } from '../build/utils/lazy';
import {
diffLines,
loadPackageJson,
ROOT,
StdOutTap,
whichSpawn,
} from './utils';
const execFileAsync = promisify(execFile);
export const packageJSON = loadPackageJson();
export const version = 'v' + packageJSON.version;
const arch = process.arch;
function dPath(...paths: string[]) {
return path.join(ROOT, 'dist', ...paths);
}
interface PathByPlatform {
[platform: string]: string;
}
const standaloneZips: PathByPlatform = {
linux: dPath(`balena-cli-${version}-linux-${arch}-standalone.zip`),
darwin: dPath(`balena-cli-${version}-macOS-${arch}-standalone.zip`),
win32: dPath(`balena-cli-${version}-windows-${arch}-standalone.zip`),
};
const oclifInstallers: PathByPlatform = {
darwin: dPath('macos', `balena-${version}.pkg`),
win32: dPath('win32', `balena-${version}-${arch}.exe`),
};
const renamedOclifInstallers: PathByPlatform = {
darwin: dPath(`balena-cli-${version}-macOS-${arch}-installer.pkg`),
win32: dPath(`balena-cli-${version}-windows-${arch}-installer.exe`),
};
export const finalReleaseAssets: { [platform: string]: string[] } = {
win32: [standaloneZips['win32'], renamedOclifInstallers['win32']],
darwin: [standaloneZips['darwin'], renamedOclifInstallers['darwin']],
linux: [standaloneZips['linux']],
};
/**
* Given the output of `pkg` as a string (containing warning messages),
* diff it against previously saved output of known "safe" warnings.
* Throw an error if the diff is not empty.
*/
async function diffPkgOutput(pkgOut: string) {
const { monochrome } = await import('../tests/helpers');
const relSavedPath = path.join(
'tests',
'test-data',
'pkg',
`expected-warnings-${process.platform}-${arch}.txt`,
);
const absSavedPath = path.join(ROOT, relSavedPath);
const ignoreStartsWith = [
'> pkg@',
'> Fetching base Node.js binaries',
' fetched-',
'prebuild-install WARN install No prebuilt binaries found',
];
const modulesRE =
process.platform === 'win32'
? /(?<=[ '])([A-Z]:)?\\.+?\\node_modules(?=\\)/
: /(?<=[ '])\/.+?\/node_modules(?=\/)/;
const buildRE =
process.platform === 'win32'
? /(?<=[ '])([A-Z]:)?\\.+\\build(?=\\)/
: /(?<=[ '])\/.+\/build(?=\/)/;
const cleanLines = (chunks: string | string[]) => {
const lines = typeof chunks === 'string' ? chunks.split('\n') : chunks;
return lines
.map((line: string) => monochrome(line)) // remove ASCII colors
.filter((line: string) => !/^\s*$/.test(line)) // blank lines
.filter((line: string) =>
ignoreStartsWith.every((i) => !line.startsWith(i)),
)
.map((line: string) => {
// replace absolute paths with relative paths
let replaced = line.replace(modulesRE, 'node_modules');
if (replaced === line) {
replaced = line.replace(buildRE, 'build');
}
return replaced;
});
};
pkgOut = cleanLines(pkgOut).join('\n');
const { readFile } = (await import('fs')).promises;
const expectedOut = cleanLines(await readFile(absSavedPath, 'utf8')).join(
'\n',
);
if (expectedOut !== pkgOut) {
const sep =
'================================================================================';
const diff = diffLines(expectedOut, pkgOut);
const msg = `pkg output does not match expected output from "${relSavedPath}"
Diff:
${sep}
${diff}
${sep}
Check whether the new or changed pkg warnings are safe to ignore, then update
"${relSavedPath}"
and share the result of your investigation as comments on the pull request.
Hint: the fix is often a matter of updating the 'pkg.scripts' or 'pkg.assets'
sections in the CLI's 'package.json' file, or a matter of updating the
'buildPkg' function in 'automation/build-bin.ts'. Sometimes it requires
patching dependencies: See for example 'patches/all/open+7.0.2.patch'.
${sep}
`;
throw new Error(msg);
}
}
/**
* Call `pkg.exec` to generate the standalone zip file, capturing its warning
* messages (stdout and stderr) in order to call diffPkgOutput().
*/
async function execPkg(...args: any[]) {
const { exec: pkgExec } = await import('pkg');
const outTap = new StdOutTap(true);
try {
outTap.tap();
await (pkgExec as any)(...args);
} catch (err) {
outTap.untap();
console.log(outTap.stdoutBuf.join(''));
console.error(outTap.stderrBuf.join(''));
throw err;
}
outTap.untap();
await diffPkgOutput(outTap.allBuf.join(''));
}
/**
* Use the 'pkg' module to create a single large executable file with
* the contents of 'node_modules' and the CLI's javascript code.
* Also copy a number of native modules (binary '.node' files) that are
* compiled during 'npm install' to the 'build-bin' folder, alongside
* the single large executable file created by pkg. (This is necessary
* because of a pkg limitation that does not allow binary executables
* to be directly executed from inside another binary executable.)
*/
async function buildPkg() {
// https://github.com/vercel/pkg#targets
let targets = `linux-${arch}`;
// TBC: not possible to build for macOS or Windows arm64 on x64 nodes
if (process.platform === 'darwin') {
targets = `macos-x64`;
}
if (process.platform === 'win32') {
targets = `win-x64`;
}
const args = [
'--targets',
targets,
'--output',
'build-bin/balena',
'package.json',
];
console.log('=======================================================');
console.log(`execPkg ${args.join(' ')}`);
console.log(`cwd="${process.cwd()}" ROOT="${ROOT}"`);
console.log('=======================================================');
await execPkg(args);
const paths: Array<[string, string[], string[]]> = [
// [platform, [source path], [destination path]]
['*', ['open', 'xdg-open'], ['xdg-open']],
['darwin', ['denymount', 'bin', 'denymount'], ['denymount']],
];
await Promise.all(
paths.map(([platform, source, dest]) => {
if (platform === '*' || platform === process.platform) {
// eg copy from node_modules/open/xdg-open to build-bin/xdg-open
return fs.copy(
path.join(ROOT, 'node_modules', ...source),
path.join(ROOT, 'build-bin', ...dest),
);
}
}),
);
const nativeExtensionPaths: string[] = await filehound
.create()
.paths(path.join(ROOT, 'node_modules'))
.ext(['node', 'dll'])
.find();
console.log(`\nCopying to build-bin:\n${nativeExtensionPaths.join('\n')}`);
await Promise.all(
nativeExtensionPaths.map((extPath) =>
fs.copy(
extPath,
extPath.replace(
path.join(ROOT, 'node_modules'),
path.join(ROOT, 'build-bin'),
),
),
),
);
}
/**
* Run some basic tests on the built pkg executable.
* TODO: test more than just `balena version -j`; integrate with the
* existing mocha/chai CLI command testing.
*/
async function testPkg() {
const pkgBalenaPath = path.join(
ROOT,
'build-bin',
process.platform === 'win32' ? 'balena.exe' : 'balena',
);
console.log(`Testing standalone package "${pkgBalenaPath}"...`);
// Run `balena version -j`, parse its stdout as JSON, and check that the
// reported Node.js major version matches semver.major(process.version)
let { stdout, stderr } = await execFileAsync(pkgBalenaPath, [
'version',
'-j',
]);
const { filterCliOutputForTests } = await import('../tests/helpers');
const filtered = filterCliOutputForTests({
err: stderr.split(/\r?\n/),
out: stdout.split(/\r?\n/),
});
stdout = filtered.out.join('\n');
stderr = filtered.err.join('\n');
let pkgNodeVersion = '';
let pkgNodeMajorVersion = 0;
try {
const balenaVersions: JsonVersions = JSON.parse(stdout);
pkgNodeVersion = balenaVersions['Node.js'];
pkgNodeMajorVersion = semver.major(pkgNodeVersion);
} catch (err) {
throw new Error(stripIndent`
Error parsing JSON output of "balena version -j": ${err}
Original output: "${stdout}"`);
}
if (semver.major(process.version) !== pkgNodeMajorVersion) {
throw new Error(
`Mismatched major version: built-in pkg Node version="${pkgNodeVersion}" vs process.version="${process.version}"`,
);
}
if (filtered.err.length > 0) {
const err = filtered.err.join('\n');
throw new Error(`"${pkgBalenaPath}": non-empty stderr "${err}"`);
}
console.log('Success! (standalone package test successful)');
}
/**
* Create the zip file for the standalone 'pkg' bundle previously created
* by the buildPkg() function in 'build-bin.ts'.
*/
async function zipPkg() {
const outputFile = standaloneZips[process.platform];
if (!outputFile) {
throw new Error(
`Standalone installer unavailable for platform "${process.platform}"`,
);
}
await fs.mkdirp(path.dirname(outputFile));
await new Promise((resolve, reject) => {
console.log(`Zipping standalone package to "${outputFile}"...`);
const archive = archiver('zip', {
zlib: { level: 7 },
});
archive.directory(path.join(ROOT, 'build-bin'), 'balena-cli');
const outputStream = fs.createWriteStream(outputFile);
outputStream.on('close', resolve);
outputStream.on('error', reject);
archive.on('error', reject);
archive.on('warning', console.warn);
archive.pipe(outputStream);
archive.finalize().catch(reject);
});
}
async function signFilesForNotarization() {
console.log('Deleting unneeded zip files...');
await new Promise((resolve, reject) => {
klaw('node_modules/')
.on('data', (item: { path: string; stats: Stats }) => {
if (!item.stats.isFile()) {
return;
}
if (path.basename(item.path).endsWith('.node.bak')) {
console.log('Removing pkg .node.bak file', item.path);
fs.unlinkSync(item.path);
}
if (
path.basename(item.path).endsWith('.zip') &&
path.dirname(item.path).includes('test')
) {
console.log('Removing zip', item.path);
fs.unlinkSync(item.path);
}
})
.on('end', resolve)
.on('error', reject);
});
// Sign all .node files first
console.log('Signing .node files...');
await new Promise((resolve, reject) => {
klaw('node_modules/')
.on('data', async (item: { path: string; stats: Stats }) => {
if (!item.stats.isFile()) {
return;
}
if (path.basename(item.path).endsWith('.node')) {
console.log('running command:', 'codesign', [
'-d',
'-f',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
item.path,
]);
await whichSpawn('codesign', [
'-d',
'-f',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
item.path,
]);
}
})
.on('end', resolve)
.on('error', reject);
});
console.log('Signing other binaries...');
console.log('running command:', 'codesign', [
'-d',
'-f',
'--options=runtime',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
'node_modules/denymount/bin/denymount',
]);
await whichSpawn('codesign', [
'-d',
'-f',
'--options=runtime',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
'node_modules/denymount/bin/denymount',
]);
console.log('running command:', 'codesign', [
'-d',
'-f',
'--options=runtime',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
'node_modules/macmount/bin/macmount',
]);
await whichSpawn('codesign', [
'-d',
'-f',
'--options=runtime',
'-s',
'Developer ID Application: Balena Ltd (66H43P8FRG)',
'node_modules/macmount/bin/macmount',
]);
}
export async function buildStandaloneZip() {
console.log(`Building standalone zip package for CLI ${version}`);
try {
await buildPkg();
await testPkg();
await zipPkg();
console.log(`Standalone zip package build completed`);
} catch (error) {
console.error(`Error creating or testing standalone zip package`);
throw error;
}
}
async function renameInstallerFiles() {
if (await fs.pathExists(oclifInstallers[process.platform])) {
await fs.rename(
oclifInstallers[process.platform],
renamedOclifInstallers[process.platform],
);
}
}
/**
* If the CSC_LINK and CSC_KEY_PASSWORD env vars are set, digitally sign the
* executable installer using Microsoft SignTool.exe (Sign Tool)
* https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
*/
async function signWindowsInstaller() {
if (process.env.CSC_LINK && process.env.CSC_KEY_PASSWORD) {
const exeName = renamedOclifInstallers[process.platform];
console.log(`Signing installer "${exeName}"`);
// trust ...
await execFileAsync('signtool.exe', [
'sign',
'-t',
process.env.TIMESTAMP_SERVER || 'http://timestamp.comodoca.com',
'-f',
process.env.CSC_LINK,
'-p',
process.env.CSC_KEY_PASSWORD,
'-d',
`balena-cli ${version}`,
exeName,
]);
// ... but verify
await execFileAsync('signtool.exe', ['verify', '-pa', '-v', exeName]);
} else {
console.log(
'Skipping installer signing step because CSC_* env vars are not set',
);
}
}
/**
* Wait for Apple Installer Notarization to continue
*/
async function notarizeMacInstaller(): Promise<void> {
const teamId = process.env.XCODE_APP_LOADER_TEAM_ID || '66H43P8FRG';
const appleId =
process.env.XCODE_APP_LOADER_EMAIL || 'accounts+apple@balena.io';
const appleIdPassword = process.env.XCODE_APP_LOADER_PASSWORD;
if (appleIdPassword && teamId) {
await notarize({
tool: 'notarytool',
teamId,
appPath: renamedOclifInstallers.darwin,
appleId,
appleIdPassword,
});
}
}
/**
* Run the `oclif pack:win` or `pack:macos` command (depending on the value
* of process.platform) to generate the native installers (which end up under
* the 'dist' folder). There are some harcoded options such as selecting only
* 64-bit binaries under Windows.
*/
export async function buildOclifInstaller() {
let packOS = '';
let packOpts = ['-r', ROOT];
if (process.platform === 'darwin') {
packOS = 'macos';
packOpts = packOpts.concat('--targets', 'darwin-x64');
} else if (process.platform === 'win32') {
packOS = 'win';
packOpts = packOpts.concat('--targets', 'win32-x64');
}
if (packOS) {
console.log(`Building oclif installer for CLI ${version}`);
const packCmd = `pack:${packOS}`;
const dirs = [path.join(ROOT, 'dist', packOS)];
if (packOS === 'win') {
dirs.push(path.join(ROOT, 'tmp', 'win*'));
}
for (const dir of dirs) {
console.log(`rimraf(${dir})`);
await Bluebird.fromCallback((cb) => rimraf(dir, cb));
}
if (process.platform === 'darwin') {
console.log('Signing files for notarization...');
await signFilesForNotarization();
}
console.log('=======================================================');
console.log(`oclif ${packCmd} ${packOpts.join(' ')}`);
console.log(`cwd="${process.cwd()}" ROOT="${ROOT}"`);
console.log('=======================================================');
const oclifPath = path.join(ROOT, 'node_modules', 'oclif');
await oclifRun([packCmd].concat(...packOpts), oclifPath);
await renameInstallerFiles();
// The Windows installer is explicitly signed here (oclif doesn't do it).
// The macOS installer is automatically signed by oclif (which runs the
// `pkgbuild` tool), using the certificate name given in package.json
// (`oclif.macos.sign` section).
if (process.platform === 'win32') {
await signWindowsInstaller();
} else if (process.platform === 'darwin') {
console.log('Notarizing package...');
await notarizeMacInstaller(); // Notarize
console.log('Package notarized.');
}
console.log(`oclif installer build completed`);
}
}
/**
* Wrapper around the npm `catch-uncommitted` package in order to run it
* conditionally, only when:
* - A CI env var is set (CI=true), and
* - The OS is not Windows. (`catch-uncommitted` fails on Windows)
*/
export async function catchUncommitted(): Promise<void> {
if (process.env.DEBUG) {
console.error(`[debug] CI=${process.env.CI} platform=${process.platform}`);
}
if (
process.env.CI &&
['true', 'yes', '1'].includes(process.env.CI.toLowerCase()) &&
process.platform !== 'win32'
) {
await whichSpawn('npx', [
'catch-uncommitted',
'--catch-no-git',
'--skip-node-versionbot-changes',
'--ignore-space-at-eol',
]);
}
}
export async function testShrinkwrap(): Promise<void> {
if (process.env.DEBUG) {
console.error(`[debug] platform=${process.platform}`);
}
if (process.platform !== 'win32') {
await whichSpawn(path.resolve(__dirname, 'test-lock-deduplicated.sh'));
}
}

View File

@ -0,0 +1,162 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as path from 'path';
import { MarkdownFileParser } from './utils';
import { GlobSync } from 'glob';
/**
* This is the skeleton of CLI documentation/reference web page at:
* https://www.balena.io/docs/reference/cli/
*
* The `getCapitanoDoc` function in this module parses README.md and adds
* some content to this object.
*
* IMPORTANT
*
* All commands need to be stored under a folder in lib/commands to maintain uniformity
* Generating docs will error out if directive not followed
* To add a custom heading for command docs, add the heading next to the folder name
* in the `commandHeadings` dictionary.
*
* This dictionary is the source of truth that creates the docs config which is used
* to generate the CLI documentation. By default, the folder name will be used.
*
* Resources with plural names needs to have 2 sections if they have commands like:
* "fleet, fleets" or "device, devices" or "tag, tags"
*
*/
interface Category {
title: string;
files: string[];
}
interface Documentation {
title: string;
introduction: string;
categories: Category[];
}
// Mapping folders names to custom headings in the docs
const commandHeadings: { [key: string]: string } = {
'api-key': 'API Key',
'api-keys': 'API Keys',
login: 'Authentication',
whoami: 'Authentication',
logout: 'Authentication',
env: 'Environment Variable',
envs: 'Environment Variables',
help: 'Help and Version',
key: 'SSH Key',
keys: 'SSH Keys',
orgs: 'Organizations',
os: 'OS',
util: 'Utilities',
ssh: 'Network',
scan: 'Network',
tunnel: 'Network',
build: 'Deploy',
join: 'Platform',
leave: 'Platform',
};
// Fetch all available commands
const allCommandsPaths = new GlobSync('build/commands/**/*.js', {
ignore: 'build/commands/internal/**',
}).found;
// Throw error if any commands found outside of command directories
const illegalCommandPaths = allCommandsPaths.filter((commandPath: string) =>
/^build\/commands\/[^/]+\.js$/.test(commandPath),
);
if (illegalCommandPaths.length !== 0) {
throw new Error(
`Found the following commands without a command directory: ${illegalCommandPaths}\n
To resolve this error, move the respective commands to their resource directories or create new ones.\n
Refer to the automation/capitanodoc/capitanodoc.ts file for more information.`,
);
}
// Docs config template
const capitanoDoc: Documentation = {
title: 'balena CLI Documentation',
introduction: '',
categories: [],
};
// Helper function to capitalize each word of directory name
function formatTitle(dir: string): string {
return dir.replace(/(^\w|\s\w)/g, (word) => word.toUpperCase());
}
// Create a map to track the categories for faster lookup
const categoriesMap: { [key: string]: Category } = {};
for (const commandPath of allCommandsPaths) {
const commandDir = path.basename(path.dirname(commandPath));
const heading = commandHeadings[commandDir] || formatTitle(commandDir);
if (!categoriesMap[heading]) {
categoriesMap[heading] = { title: heading, files: [] };
capitanoDoc.categories.push(categoriesMap[heading]);
}
categoriesMap[heading].files.push(commandPath);
}
// Sort Category titles alphabetically
capitanoDoc.categories = capitanoDoc.categories.sort((a, b) =>
a.title.localeCompare(b.title),
);
// Sort Category file paths alphabetically
capitanoDoc.categories.forEach((category) => {
category.files.sort((a, b) => a.localeCompare(b));
});
/**
* Modify and return the `capitanoDoc` object above in order to generate the
* CLI documentation at docs/balena-cli.md
*
* This function parses the README.md file to extract relevant sections
* for the documentation web page.
*/
export async function getCapitanoDoc(): Promise<typeof capitanoDoc> {
const readmePath = path.join(__dirname, '..', '..', 'README.md');
const mdParser = new MarkdownFileParser(readmePath);
const sections: string[] = await Promise.all([
mdParser.getSectionOfTitle('About').then((sectionLines: string) => {
// delete the title of the 'About' section for the web page
const match = /^(#+)\s+.+?\n\s*([^]*)/.exec(sectionLines);
if (!match || match.length < 3) {
throw new Error(`Error parsing section title`);
}
// match[1] has the title, match[2] has the rest
return match && match[2];
}),
mdParser.getSectionOfTitle('Installation'),
mdParser.getSectionOfTitle('Choosing a shell (command prompt/terminal)'),
mdParser.getSectionOfTitle('Logging in'),
mdParser.getSectionOfTitle('Proxy support'),
mdParser.getSectionOfTitle('Support, FAQ and troubleshooting'),
mdParser.getSectionOfTitle('Deprecation policy'),
]);
capitanoDoc.introduction = sections.join('\n');
return capitanoDoc;
}

32
automation/capitanodoc/doc-types.d.ts vendored Normal file
View File

@ -0,0 +1,32 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Command as OclifCommandClass } from '@oclif/core';
type OclifCommand = typeof OclifCommandClass;
export interface Document {
title: string;
introduction: string;
categories: Category[];
}
export interface Category {
title: string;
commands: OclifCommand[];
}
export { OclifCommand };

View File

@ -0,0 +1,108 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as path from 'path';
import { getCapitanoDoc } from './capitanodoc';
import { Category, Document, OclifCommand } from './doc-types';
import * as markdown from './markdown';
import { stripIndent } from '../../lib/utils/lazy';
/**
* Generates the markdown document (as a string) for the CLI documentation
* page on the web: https://www.balena.io/docs/reference/cli/
*/
export async function renderMarkdown(): Promise<string> {
const capitanodoc = await getCapitanoDoc();
const result: Document = {
title: capitanodoc.title,
introduction: capitanodoc.introduction,
categories: [],
};
for (const commandCategory of capitanodoc.categories) {
const category: Category = {
title: commandCategory.title,
commands: [],
};
for (const jsFilename of commandCategory.files) {
category.commands.push(...importOclifCommands(jsFilename));
}
result.categories.push(category);
}
return markdown.render(result);
}
// Help is now managed via a plugin
// This fake command allows capitanodoc to include help in docs
class FakeHelpCommand {
description = stripIndent`
List balena commands, or get detailed help for a specific command.
List balena commands, or get detailed help for a specific command.
`;
examples = [
'$ balena help',
'$ balena help login',
'$ balena help os download',
];
args = {
command: {
description: 'command to show help for',
},
};
usage = 'help [command]';
flags = {
verbose: {
description: 'show additional commands',
char: '-v',
},
};
}
function importOclifCommands(jsFilename: string): OclifCommand[] {
// TODO: Currently oclif commands with no `usage` overridden will cause
// an error when parsed. This should be improved so that `usage` does not have
// to be overridden if not necessary.
const command: OclifCommand =
jsFilename === 'help'
? (new FakeHelpCommand() as unknown as OclifCommand)
: (require(path.join(process.cwd(), jsFilename)).default as OclifCommand);
return [command];
}
/**
* Print the CLI docs markdown to stdout.
* See package.json for how the output is redirected to a file.
*/
async function printMarkdown() {
try {
console.log(await renderMarkdown());
} catch (error) {
console.error(error);
process.exitCode = 1;
}
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
printMarkdown();

View File

@ -0,0 +1,128 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Parser } from '@oclif/core';
import * as ent from 'ent';
import * as _ from 'lodash';
import { getManualSortCompareFunction } from '../../lib/utils/helpers';
import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils';
import { Category, Document, OclifCommand } from './doc-types';
function renderOclifCommand(command: OclifCommand): string[] {
const result = [`## ${ent.encode(command.usage || '')}`];
const description = (command.description || '')
.split('\n')
.slice(1) // remove the first line, which oclif uses as help header
.join('\n')
.trim();
result.push(description);
if (!_.isEmpty(command.examples)) {
result.push('Examples:', command.examples!.map((v) => `\t${v}`).join('\n'));
}
if (!_.isEmpty(command.args)) {
result.push('### Arguments');
for (const [name, arg] of Object.entries(command.args!)) {
result.push(`#### ${name.toUpperCase()}`, arg.description || '');
}
}
if (!_.isEmpty(command.flags)) {
result.push('### Options');
for (const [name, flag] of Object.entries(command.flags!)) {
if (name === 'help') {
continue;
}
flag.name = name;
const flagUsage = Parser.flagUsages([flag])
.map(([usage, _description]) => usage)
.join()
.trim();
result.push(`#### ${flagUsage}`);
result.push(flag.description || '');
}
}
return result;
}
function renderCategory(category: Category): string[] {
const result = [`# ${category.title}`];
for (const command of category.commands) {
result.push(...renderOclifCommand(command));
}
return result;
}
function getAnchor(cmdSignature: string): string {
return `#${_.trim(cmdSignature.replace(/\W+/g, '-'), '-').toLowerCase()}`;
}
function renderToc(categories: Category[]): string[] {
const result = [`# CLI Command Reference`];
for (const category of categories) {
result.push(`- ${category.title}`);
result.push(
category.commands
.map((command) => {
const signature = capitanoizeOclifUsage(command.usage);
return `\t- [${ent.encode(signature)}](${getAnchor(signature)})`;
})
.join('\n'),
);
}
return result;
}
const manualCategorySorting: { [category: string]: string[] } = {
'Environment Variables': ['envs', 'env rm', 'env add', 'env rename'],
OS: [
'os versions',
'os download',
'os build config',
'os configure',
'os initialize',
],
};
function sortCommands(doc: Document): void {
for (const category of doc.categories) {
if (category.title in manualCategorySorting) {
category.commands = category.commands.sort(
getManualSortCompareFunction<OclifCommand, string>(
manualCategorySorting[category.title],
(cmd: OclifCommand, x: string) =>
(cmd.usage || '').toString().replace(/\W+/g, ' ').includes(x),
),
);
}
}
}
export function render(doc: Document) {
sortCommands(doc);
const result = [
`# ${doc.title}`,
doc.introduction,
...renderToc(doc.categories),
];
for (const category of doc.categories) {
result.push(...renderCategory(category));
}
return result.join('\n\n');
}

View File

@ -0,0 +1,136 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { OptionDefinition } from 'capitano';
import * as ent from 'ent';
import * as fs from 'fs';
import * as readline from 'readline';
export function getOptionPrefix(signature: string) {
if (signature.length > 1) {
return '--';
} else {
return '-';
}
}
export function getOptionSignature(signature: string) {
return `${getOptionPrefix(signature)}${signature}`;
}
export function parseCapitanoOption(option: OptionDefinition): string {
let result = getOptionSignature(option.signature);
if (Array.isArray(option.alias)) {
for (const alias of option.alias) {
result += `, ${getOptionSignature(alias)}`;
}
} else if (typeof option.alias === 'string') {
result += `, ${getOptionSignature(option.alias)}`;
}
if (option.parameter) {
result += ` <${option.parameter}>`;
}
return ent.encode(result);
}
export class MarkdownFileParser {
constructor(public mdFilePath: string) {}
/**
* Extract the lines of a markdown document section with the given title.
* For example, consider this sample markdown document:
* ```
* # balena CLI
*
* ## Introduction
* Lorem ipsum dolor sit amet, consectetur adipiscing elit,
*
* ## Getting Started
* sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
*
* ### Prerequisites
* - Foo
* - Bar
*
* ## Support
* Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
* ```
*
* Calling getSectionOfTitle('Getting Started') for the markdown doc above
* returns everything from line '## Getting Started' (included) to line
* '## Support' (excluded). This method counts the number of '#' characters
* to determine that subsections should be included as part of the parent
* section.
*
* @param title The section title without '#' chars, eg. 'Getting Started'
*/
public async getSectionOfTitle(
title: string,
includeSubsections = true,
): Promise<string> {
let foundSectionLines: string[];
let foundSectionLevel = 0;
const rl = readline.createInterface({
input: fs.createReadStream(this.mdFilePath),
crlfDelay: Infinity,
});
rl.on('line', (line) => {
// try to match a line like "## Getting Started", where the number
// of '#' characters is the sectionLevel ('##' -> 2), and the
// sectionTitle is "Getting Started"
const match = /^(#+)\s+(.+)/.exec(line);
if (match) {
const sectionLevel = match[1].length;
const sectionTitle = match[2];
// If the target section had already been found: append a line, or end it
if (foundSectionLines) {
if (!includeSubsections || sectionLevel <= foundSectionLevel) {
// end previously found section
rl.close();
}
} else if (sectionTitle === title) {
// found the target section
foundSectionLevel = sectionLevel;
foundSectionLines = [];
}
}
if (foundSectionLines) {
foundSectionLines.push(line);
}
});
return await new Promise((resolve, reject) => {
rl.on('close', () => {
if (foundSectionLines) {
resolve(foundSectionLines.join('\n'));
} else {
reject(
new Error(
`Markdown section not found: title="${title}" file="${this.mdFilePath}"`,
),
);
}
});
});
}
}

86
automation/check-doc.ts Normal file
View File

@ -0,0 +1,86 @@
/**
* @license
* Copyright 2020 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// eslint-disable-next-line no-restricted-imports
import { stripIndent } from 'common-tags';
import * as _ from 'lodash';
import { promises as fs } from 'fs';
import * as path from 'path';
import { simpleGit } from 'simple-git';
const ROOT = path.normalize(path.join(__dirname, '..'));
/**
* Compare the timestamp of balena-cli.md with the timestamp of staged files,
* issuing an error if balena-cli.md is older.
* If balena-cli.md does not require updating and the developer cannot run
* `npm run build` on their laptop, the error message suggests a workaround
* using `touch`.
*/
async function checkBuildTimestamps() {
const git = simpleGit(ROOT);
const docFile = path.join(ROOT, 'docs', 'balena-cli.md');
const [docStat, gitStatus] = await Promise.all([
fs.stat(docFile),
git.status(),
]);
const stagedFiles = _.uniq([
...gitStatus.created,
...gitStatus.staged,
...gitStatus.renamed.map((o) => o.to),
])
// select only staged files that start with lib/ or typings/
.filter((f) => f.match(/^(lib|typings)[/\\]/))
.map((f) => path.join(ROOT, f));
const fStats = await Promise.all(stagedFiles.map((f) => fs.stat(f)));
fStats.forEach((fStat, index) => {
if (fStat.mtimeMs > docStat.mtimeMs) {
const fPath = stagedFiles[index];
throw new Error(stripIndent`
--------------------------------------------------------------------------------
ERROR: at least one staged file: "${fPath}"
has a more recent modification timestamp than the documentation file:
"${docFile}"
This probably means that \`npm run build\` or \`npm test\` have not been executed,
and this error can be fixed by doing so. Running \`npm run build\` or \`npm test\`
before commiting is required in order to update the CLI markdown documentation
(in case any command-line options were updated, added or removed) and also to
catch Typescript type check errors sooner and reduce overall waiting time, given
that the CI build/tests are currently rather lengthy.
If you need/wish to bypass this check without running \`npm run build\`, run:
npx touch -am "${docFile}"
and then try again.
--------------------------------------------------------------------------------
`);
}
});
}
async function run() {
try {
await checkBuildTimestamps();
} catch (err) {
console.error(err.message);
process.exitCode = 1;
}
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run();

View File

@ -0,0 +1,71 @@
#!/usr/bin/env node
'use strict';
/**
* Check that semver v1 is greater than or equal to semver v2.
*
* We don't `require('semver')` to allow this script to be run as a npm
* 'preinstall' hook, at which point no dependencies have been installed.
*
* @param {string} version
*/
function parseSemver(version) {
const match = /v?(\d+)\.(\d+).(\d+)/.exec(version);
if (match == null) {
throw new Error(`Invalid semver version: ${version}`);
}
const [, major, minor, patch] = match;
return [parseInt(major, 10), parseInt(minor, 10), parseInt(patch, 10)];
}
/**
* @param {string} v1
* @param {string} v2
*/
function semverGte(v1, v2) {
const v1Array = parseSemver(v1);
const v2Array = parseSemver(v2);
for (let i = 0; i < 3; i++) {
if (v1Array[i] < v2Array[i]) {
return false;
} else if (v1Array[i] > v2Array[i]) {
return true;
}
}
return true;
}
function checkNpmVersion() {
const execSync = require('child_process').execSync;
const npmVersion = execSync('npm --version').toString().trim();
const requiredVersion = '6.9.0';
if (!semverGte(npmVersion, requiredVersion)) {
// In case you take issue with the error message below:
// "At this point, however, your 'npm-shrinkwrap.json' file has
// already been damaged"
// ... and think: "why not add the check to the 'preinstall' hook?",
// the reason is that it would unnecessarily prevent end users from
// using npm v6.4.1 that ships with Node 8. (It is OK for the
// shrinkwrap file to get damaged if it is not going to be reused.)
throw new Error(`\
-----------------------------------------------------------------------------
Error: npm version '${npmVersion}' detected. Please upgrade to npm v${requiredVersion} or later
because of a bug that causes the 'npm-shrinkwrap.json' file to be damaged.
At this point, however, your 'npm-shrinkwrap.json' file has already been
damaged. Please revert it to the master branch state with a command such as:
"git checkout master -- npm-shrinkwrap.json"
Then re-run "npm install" using npm version ${requiredVersion} or later.
-----------------------------------------------------------------------------`);
}
}
function main() {
try {
checkNpmVersion();
} catch (e) {
console.error(e.message || e);
process.exitCode = 1;
}
}
main();

257
automation/deploy-bin.ts Normal file
View File

@ -0,0 +1,257 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as Bluebird from 'bluebird';
import * as _ from 'lodash';
import * as semver from 'semver';
import { finalReleaseAssets, version } from './build-bin';
const { GITHUB_TOKEN } = process.env;
/**
* Create or update a release in GitHub's releases page, uploading the
* installer files (standalone zip + native oclif installers).
*/
export async function createGitHubRelease() {
console.log(`Publishing release ${version} to GitHub`);
const publishRelease = await import('publish-release');
const ghRelease = (await Bluebird.fromCallback(
publishRelease.bind(null, {
token: GITHUB_TOKEN || '',
owner: 'balena-io',
repo: 'balena-cli',
tag: version,
name: `balena-CLI ${version}`,
reuseRelease: true,
assets: finalReleaseAssets[process.platform],
}),
)) as { html_url: any };
console.log(`Release ${version} successful: ${ghRelease.html_url}`);
}
/**
* Top-level function to create a CLI release in GitHub's releases page:
* call zipStandaloneInstaller(), rename the files as we'd like them to
* display on the releases page, and call createGitHubRelease() to upload
* the files.
*/
export async function release() {
try {
await createGitHubRelease();
} catch (err) {
throw new Error(`Error creating GitHub release:\n${err}`);
}
}
/** Return a cached Octokit instance, creating a new one as needed. */
const getOctokit = _.once(function () {
const Octokit = (
require('@octokit/rest') as typeof import('@octokit/rest')
).Octokit.plugin(
(
require('@octokit/plugin-throttling') as typeof import('@octokit/plugin-throttling')
).throttling,
);
return new Octokit({
auth: GITHUB_TOKEN,
throttle: {
onRateLimit: (retryAfter: number, options: any) => {
console.warn(
`Request quota exhausted for request ${options.method} ${options.url}`,
);
// retries 3 times
if (options.request.retryCount < 3) {
console.log(`Retrying after ${retryAfter} seconds!`);
return true;
}
},
onAbuseLimit: (_retryAfter: number, options: any) => {
// does not retry, only logs a warning
console.warn(
`Abuse detected for request ${options.method} ${options.url}`,
);
},
},
});
});
/**
* Extract pagination information (current page, total pages, ordinal number)
* from the 'link' response header (example below), using the parse-link-header
* npm package:
* "link": "<https://api.github.com/repositories/187370853/releases?per_page=2&page=2>; rel=\"next\",
* <https://api.github.com/repositories/187370853/releases?per_page=2&page=3>; rel=\"last\""
*
* @param response Octokit response object (including response.headers.link)
* @param perPageDefault Default per_page pagination value if missing in URL
* @return Object where 'page' is the current page number (1-based),
* 'pages' is the total number of pages, and 'ordinal' is the ordinal number
* (3rd, 4th, 5th...) of the first item in the current page.
*/
function getPageNumbers(
response: any,
perPageDefault: number,
): { page: number; pages: number; ordinal: number } {
const res = { page: 1, pages: 1, ordinal: 1 };
if (!response.headers.link) {
return res;
}
const parse =
require('parse-link-header') as typeof import('parse-link-header');
const parsed = parse(response.headers.link);
if (parsed == null) {
throw new Error(`Failed to parse link header: '${response.headers.link}'`);
}
let perPage = perPageDefault;
if (parsed.next) {
if (parsed.next.per_page) {
perPage = parseInt(parsed.next.per_page, 10);
}
res.page = parseInt(parsed.next.page, 10) - 1;
res.pages = parseInt(parsed.last.page, 10);
} else {
if (parsed.prev.per_page) {
perPage = parseInt(parsed.prev.per_page, 10);
}
res.page = res.pages = parseInt(parsed.prev.page, 10) + 1;
}
res.ordinal = (res.page - 1) * perPage + 1;
return res;
}
/**
* Iterate over every GitHub release in the given owner/repo, check whether
* its tag_name matches against the affectedVersions semver spec, and if so
* replace its release description (body) with the given newDescription value.
* @param owner GitHub repo owner, e.g. 'balena-io' or 'pdcastro'
* @param repo GitHub repo, e.g. 'balena-cli'
* @param affectedVersions Semver spec, e.g. '2.6.1 - 7.10.9 || 8.0.0'
* @param newDescription New release description (body)
* @param editID Short string present in newDescription, e.g. '[AA101]', that
* can be searched to determine whether that release has already been updated.
*/
async function updateGitHubReleaseDescriptions(
owner: string,
repo: string,
affectedVersions: string,
newDescription: string,
editID: string,
) {
const perPage = 30;
const octokit = getOctokit();
const options = octokit.repos.listReleases.endpoint.merge({
owner,
repo,
per_page: perPage,
});
let errCount = 0;
type Release =
import('@octokit/rest').RestEndpointMethodTypes['repos']['listReleases']['response']['data'][0];
for await (const response of octokit.paginate.iterator<Release>(options)) {
const {
page: thisPage,
pages: totalPages,
ordinal,
} = getPageNumbers(response, perPage);
let i = 0;
for (const cliRelease of response.data) {
const prefix = `[#${ordinal + i++} pg ${thisPage}/${totalPages}]`;
if (!cliRelease.id) {
console.error(
`${prefix} Error: missing release ID (errCount=${++errCount})`,
);
continue;
}
const skipMsg = `${prefix} skipping release "${cliRelease.tag_name}" (${cliRelease.id})`;
if (cliRelease.draft === true) {
console.info(`${skipMsg}: draft release`);
continue;
} else if (cliRelease.body && cliRelease.body.includes(editID)) {
console.info(`${skipMsg}: already updated`);
continue;
} else if (!semver.satisfies(cliRelease.tag_name, affectedVersions)) {
console.info(`${skipMsg}: outside version range`);
continue;
} else {
const updatedRelease = {
owner,
repo,
release_id: cliRelease.id,
body: newDescription,
};
let oldBodyPreview = cliRelease.body;
if (oldBodyPreview) {
oldBodyPreview = oldBodyPreview.replace(/\s+/g, ' ').trim();
if (oldBodyPreview.length > 12) {
oldBodyPreview = oldBodyPreview.substring(0, 9) + '...';
}
}
console.info(
`${prefix} updating release "${cliRelease.tag_name}" (${cliRelease.id}) old body="${oldBodyPreview}"`,
);
try {
await octokit.repos.updateRelease(updatedRelease);
} catch (err) {
console.error(
`${skipMsg}: Error: ${err.message} (count=${++errCount})`,
);
continue;
}
}
}
}
}
/**
* Add a warning description to CLI releases affected by a mixpanel tracking
* security issue (#1359). This function can be executed "manually" with the
* following command line:
*
* npx ts-node --type-check -P automation/tsconfig.json automation/run.ts fix1359
*/
export async function updateDescriptionOfReleasesAffectedByIssue1359() {
// Run only on Linux/Node10, instead of all platform/Node combinations.
// (It could have been any other platform, as long as it only runs once.)
if (process.platform !== 'linux' || semver.major(process.version) !== 10) {
return;
}
const owner = 'balena-io';
const repo = 'balena-cli';
const affectedVersions =
'2.6.1 - 7.10.9 || 8.0.0 - 8.1.0 || 9.0.0 - 9.15.6 || 10.0.0 - 10.17.5 || 11.0.0 - 11.7.2';
const editID = '[AA100]';
let newDescription = `
Please note: the "login" command in this release is affected by a
security issue fixed in versions
[7.10.10](https://github.com/balena-io/balena-cli/releases/tag/v7.10.10),
[8.1.1](https://github.com/balena-io/balena-cli/releases/tag/v8.1.1),
[9.15.7](https://github.com/balena-io/balena-cli/releases/tag/v9.15.7),
[10.17.6](https://github.com/balena-io/balena-cli/releases/tag/v10.17.6),
[11.7.3](https://github.com/balena-io/balena-cli/releases/tag/v11.7.3)
and later. If you need to use this version, avoid passing your password,
keys or tokens as command-line arguments. ${editID}`;
// remove line breaks and collapse white space
newDescription = newDescription.replace(/\s+/g, ' ').trim();
await updateGitHubReleaseDescriptions(
owner,
repo,
affectedVersions,
newDescription,
editID,
);
}

107
automation/run.ts Normal file
View File

@ -0,0 +1,107 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as _ from 'lodash';
import {
buildOclifInstaller,
buildStandaloneZip,
catchUncommitted,
testShrinkwrap,
} from './build-bin';
import {
release,
updateDescriptionOfReleasesAffectedByIssue1359,
} from './deploy-bin';
// DEBUG set to falsy for negative values else is truthy
process.env.DEBUG = ['0', 'no', 'false', '', undefined].includes(
process.env.DEBUG?.toLowerCase(),
)
? ''
: '1';
/**
* Trivial command-line parser. Check whether the command-line argument is one
* of the following strings, then call the appropriate functions:
* 'build:installer' (to build a native oclif installer)
* 'build:standalone' (to build a standalone pkg package)
* 'release' (to create/update a GitHub release)
*
* @param args Arguments to parse (default is process.argv.slice(2))
*/
async function parse(args?: string[]) {
args = args || process.argv.slice(2);
console.error(`[debug] automation/run.ts process.argv=[${process.argv}]`);
console.error(`[debug] automation/run.ts args=[${args}]`);
if (_.isEmpty(args)) {
throw new Error('missing command-line arguments');
}
const commands: { [cmd: string]: () => void | Promise<void> } = {
'build:installer': buildOclifInstaller,
'build:standalone': buildStandaloneZip,
'catch-uncommitted': catchUncommitted,
'test-shrinkwrap': testShrinkwrap,
fix1359: updateDescriptionOfReleasesAffectedByIssue1359,
release,
};
for (const arg of args) {
if (!Object.hasOwn(commands, arg)) {
throw new Error(`command unknown: ${arg}`);
}
}
// The BUILD_TMP env var is used as an alternative location for oclif
// (patched) to copy/extract the CLI files, run npm install and then
// create the NSIS executable installer for Windows. This was necessary
// to avoid issues with a 260-char limit on Windows paths (possibly a
// limitation of some library used by NSIS), as the "current working dir"
// provided by balena CI is a rather long path to start with.
if (process.platform === 'win32' && !process.env.BUILD_TMP) {
const randID = (await import('crypto'))
.randomBytes(6)
.toString('base64')
.replace(/\+/g, '-')
.replace(/\//g, '_'); // base64url (RFC 4648)
process.env.BUILD_TMP = `C:\\tmp\\${randID}`;
}
for (const arg of args) {
try {
const cmdFunc = commands[arg];
await cmdFunc();
} catch (err) {
if (typeof err === 'object') {
err.message = `"${arg}": ${err.message}`;
}
throw err;
}
}
}
/** See jsdoc for parse() function above */
export async function run(args?: string[]) {
try {
await parse(args);
} catch (e) {
console.error(e.message ? `Error: ${e.message}` : e);
process.exitCode = 1;
}
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run();

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -e
cp npm-shrinkwrap.json npm-shrinkwrap.json.old
npm i
npm dedupe
npm i
if ! diff -q npm-shrinkwrap.json npm-shrinkwrap.json.old > /dev/null; then
rm npm-shrinkwrap.json.old
echo "** npm-shrinkwrap.json was not deduplicated or not fully committed - FAIL **";
echo "** This can usually be fixed with: **";
echo "** git checkout master -- npm-shrinkwrap.json **";
echo "** rm -rf node_modules **";
echo "** npm install && npm dedupe && npm install **";
exit 1;
fi
rm npm-shrinkwrap.json.old

140
automation/update-module.ts Normal file
View File

@ -0,0 +1,140 @@
import { exec } from 'child_process';
import * as semver from 'semver';
const changeTypes = ['major', 'minor', 'patch'] as const;
const validateChangeType = (maybeChangeType: string = 'minor') => {
maybeChangeType = maybeChangeType.toLowerCase();
switch (maybeChangeType) {
case 'patch':
case 'minor':
case 'major':
return maybeChangeType;
default:
throw new Error(`Invalid change type: '${maybeChangeType}'`);
}
};
const compareSemverChangeType = (oldVersion: string, newVersion: string) => {
const oldSemver = semver.parse(oldVersion)!;
const newSemver = semver.parse(newVersion)!;
for (const changeType of changeTypes) {
if (oldSemver[changeType] !== newSemver[changeType]) {
return changeType;
}
}
};
const run = async (cmd: string) => {
console.info(`Running '${cmd}'`);
return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => {
const p = exec(cmd, { encoding: 'utf8' }, (err, stdout, stderr) => {
if (err) {
reject(err);
return;
}
resolve({ stdout, stderr });
});
p.stdout?.pipe(process.stdout);
p.stderr?.pipe(process.stderr);
});
};
const getVersion = async (module: string): Promise<string> => {
const { stdout } = await run(`npm ls --json --depth 0 ${module}`);
return JSON.parse(stdout).dependencies[module].version;
};
interface Upstream {
repo: string;
url: string;
module?: string;
}
const getUpstreams = async () => {
const fs = await import('fs');
const repoYaml = fs.readFileSync(__dirname + '/../repo.yml', 'utf8');
const yaml = await import('js-yaml');
const { upstream } = yaml.load(repoYaml) as {
upstream: Upstream[];
};
return upstream;
};
const getUsage = (upstreams: Upstream[], upstreamName: string) => `
Usage: npm run update ${upstreamName} $version [$changeType=minor]
Upstream names: ${upstreams.map(({ repo }) => repo).join(', ')}
`;
async function $main() {
const upstreams = await getUpstreams();
if (process.argv.length < 3) {
throw new Error(getUsage(upstreams, '$upstreamName'));
}
const upstreamName = process.argv[2];
const upstream = upstreams.find((v) => v.repo === upstreamName);
if (!upstream) {
throw new Error(
`Invalid upstream name '${upstreamName}', valid options: ${upstreams
.map(({ repo }) => repo)
.join(', ')}`,
);
}
if (process.argv.length < 4) {
throw new Error(getUsage(upstreams, upstreamName));
}
const packageName = upstream.module || upstream.repo;
const oldVersion = await getVersion(packageName);
await run(`npm install ${packageName}@${process.argv[3]}`);
const newVersion = await getVersion(packageName);
if (newVersion === oldVersion) {
throw new Error(`Already on version '${newVersion}'`);
}
console.log(`Updated ${upstreamName} from ${oldVersion} to ${newVersion}`);
const semverChangeType = compareSemverChangeType(oldVersion, newVersion);
const changeType = process.argv[4]
? // if the caller specified a change type, use that one
validateChangeType(process.argv[4])
: // use the same change type as in the dependency, but avoid major bumps
semverChangeType && semverChangeType !== 'major'
? semverChangeType
: 'minor';
console.log(`Using Change-type: ${changeType}`);
let { stdout: currentBranch } = await run('git rev-parse --abbrev-ref HEAD');
currentBranch = currentBranch.trim();
console.log(`Currenty on branch: '${currentBranch}'`);
if (currentBranch === 'master') {
await run(`git checkout -b "update-${upstreamName}-${newVersion}"`);
}
await run(`git add package.json npm-shrinkwrap.json`);
await run(
`git commit --message "Update ${upstreamName} to ${newVersion}" --message "Update ${upstreamName} from ${oldVersion} to ${newVersion}" --message "Change-type: ${changeType}"`,
);
}
async function main() {
try {
await $main();
} catch (e) {
console.error(e);
process.exitCode = 1;
}
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
main();

147
automation/utils.ts Normal file
View File

@ -0,0 +1,147 @@
/**
* @license
* Copyright 2019-2020 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { spawn } from 'child_process';
import * as path from 'path';
export const ROOT = path.join(__dirname, '..');
/** Tap and buffer this process' stdout and stderr */
export class StdOutTap {
public stdoutBuf: string[] = [];
public stderrBuf: string[] = [];
public allBuf: string[] = []; // both stdout and stderr
protected origStdoutWrite: typeof process.stdout.write;
protected origStderrWrite: typeof process.stdout.write;
constructor(protected printDots = false) {}
tap() {
this.origStdoutWrite = process.stdout.write;
this.origStderrWrite = process.stderr.write;
process.stdout.write = (chunk: string, ...args: any[]): boolean => {
this.stdoutBuf.push(chunk);
this.allBuf.push(chunk);
const str = this.printDots ? '.' : chunk;
return this.origStdoutWrite.call(process.stdout, str, ...args);
};
process.stderr.write = (chunk: string, ...args: any[]): boolean => {
this.stderrBuf.push(chunk);
this.allBuf.push(chunk);
const str = this.printDots ? '.' : chunk;
return this.origStderrWrite.call(process.stderr, str, ...args);
};
}
untap() {
process.stdout.write = this.origStdoutWrite;
process.stderr.write = this.origStderrWrite;
if (this.printDots) {
console.error('');
}
}
}
/**
* Diff strings by line, using the 'diff' npm package:
* https://www.npmjs.com/package/diff
*/
export function diffLines(str1: string, str2: string): string {
const { diffTrimmedLines } = require('diff');
const diffObjs = diffTrimmedLines(str1, str2);
const prefix = (chunk: string, char: string) =>
chunk
.split('\n')
.map((line: string) => `${char} ${line}`)
.join('\n');
const diffStr = diffObjs
.map((part: any) => {
return part.added
? prefix(part.value, '+')
: part.removed
? prefix(part.value, '-')
: prefix(part.value, ' ');
})
.join('\n');
return diffStr;
}
export function loadPackageJson() {
return require(path.join(ROOT, 'package.json'));
}
/**
* Error handling wrapper around the npm `which` package:
* "Like the unix which utility. Finds the first instance of a specified
* executable in the PATH environment variable. Does not cache the results,
* so hash -r is not needed when the PATH changes."
*
* @param program Basename of a program, for example 'ssh'
* @returns The program's full path, e.g. 'C:\WINDOWS\System32\OpenSSH\ssh.EXE'
*/
export async function which(program: string): Promise<string> {
const whichMod = await import('which');
let programPath: string;
try {
programPath = await whichMod(program);
} catch (err) {
if (err.code === 'ENOENT') {
throw new Error(`'${program}' program not found. Is it installed?`);
}
throw err;
}
return programPath;
}
/**
* Call which(programName) and spawn() with the given arguments. Throw an error
* if the process exit code is not zero.
*/
export async function whichSpawn(
programName: string,
args: string[] = [],
): Promise<void> {
const program = await which(programName);
let error: Error | undefined;
let exitCode: number | undefined;
try {
exitCode = await new Promise<number>((resolve, reject) => {
try {
spawn(program, args, { stdio: 'inherit' })
.on('error', reject)
.on('close', resolve);
} catch (err) {
reject(err);
}
});
} catch (err) {
error = err;
}
if (error || exitCode) {
const msg = [
`${programName} failed with exit code ${exitCode}:`,
`"${program}" [${args}]`,
];
if (error) {
msg.push(`${error}`);
}
throw new Error(msg.join('\n'));
}
}

21
bin/balena Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env node
// We boost the threadpool size as ext2fs can deadlock with some
// operations otherwise, if the pool runs out.
process.env.UV_THREADPOOL_SIZE = '64';
// Disable oclif registering ts-node
process.env.OCLIF_TS_NODE = 0;
async function run() {
// Use fast-boot to cache require lookups, speeding up startup
await require('../build/fast-boot').start();
// Set the desired es version for downstream modules that support it
require('@balena/es-version').set('es2018');
// Run the CLI
await require('../build/app').run(undefined, { dir: __dirname });
}
run();

87
bin/balena-dev Executable file
View File

@ -0,0 +1,87 @@
#!/usr/bin/env node
// ****************************************************************************
// THIS IS FOR DEV PURPOSES ONLY AND WILL NOT BE PART OF THE PUBLISHED PACKAGE
// Before opening a PR you should build and test your changes using bin/balena
// ****************************************************************************
// We boost the threadpool size as ext2fs can deadlock with some
// operations otherwise, if the pool runs out.
process.env.UV_THREADPOOL_SIZE = '64';
// Note on `fast-boot2`: We do not use `fast-boot2` with `balena-dev` because:
// * fast-boot2's cacheKiller option is configured to include the timestamps of
// the package.json and npm-shrinkwrap.json files, to avoid unexpected CLI
// behavior when changes are made to dependencies during development. This is
// generally a good thing, however, `balena-dev` (a few lines below) edits
// `package.json` to modify oclif paths, and this results in cache
// invalidation and a performance hit rather than speedup.
// * Even if the timestamps are removed from cacheKiller, so that there is no
// cache invalidation, fast-boot's speedup is barely noticeable when ts-node
// is used, e.g. 1.43s vs 1.4s when running `balena version`.
// * `fast-boot` causes unexpected behavior when used with `npm link` or
// when the `node_modules` folder is manually modified (affecting transitive
// dependencies) during development (e.g. bug investigations). A workaround
// is to use `balena-dev` without `fast-boot`. See also notes in
// `CONTRIBUTING.md`.
const path = require('path');
const rootDir = path.join(__dirname, '..');
// Allow balena-dev to work with oclif by temporarily
// pointing oclif config options to lib/ instead of build/
modifyOclifPaths();
// Undo changes on exit
process.on('exit', function () {
modifyOclifPaths(true);
});
// Undo changes in case of ctrl-c
process.on('SIGINT', function () {
modifyOclifPaths(true);
// Note process exit here will interfere with commands that do their own SIGINT handling,
// but without it commands can not be exited.
// So currently using balena-dev does not guarantee proper exit behaviour when using ctrl-c.
// Ideally a better solution is needed.
process.exit();
});
// Set the desired es version for downstream modules that support it
require('@balena/es-version').set('es2018');
// Note: before ts-node v6.0.0, 'transpile-only' (no type checking) was the
// default option. We upgraded ts-node and found that adding 'transpile-only'
// was necessary to avoid a mysterious 'null' error message. On the plus side,
// it is supposed to run faster. We still benefit from type checking when
// running 'npm run build'.
require('ts-node').register({
project: path.join(rootDir, 'tsconfig.json'),
transpileOnly: true,
});
require('../lib/app').run(undefined, { dir: __dirname, development: true });
// Modify package.json oclif paths from build/ -> lib/, or vice versa
function modifyOclifPaths(revert) {
const fs = require('fs');
const packageJsonPath = path.join(rootDir, 'package.json');
const packageJson = fs.readFileSync(packageJsonPath, 'utf8');
const packageObj = JSON.parse(packageJson);
if (!packageObj.oclif) {
return;
}
let oclifSectionText = JSON.stringify(packageObj.oclif);
if (!revert) {
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/lib/');
} else {
oclifSectionText = oclifSectionText.replace(/\/lib\//g, '/build/');
}
packageObj.oclif = JSON.parse(oclifSectionText);
fs.writeFileSync(
packageJsonPath,
`${JSON.stringify(packageObj, null, 2)}\n`,
'utf8',
);
}

View File

@ -1,2 +0,0 @@
#!/usr/bin/env node
require('../build/app');

View File

@ -1,16 +0,0 @@
#!/usr/bin/env node
var os = require('../build/actions/os');
var errors = require('../build/errors');
// TODO: Do some error handling when image or device are incorrect
os.install.action({
image: process.argv[2],
device: process.argv[3]
}, {
yes: true,
fromScript: true
}, function(error) {
return errors.handle(error);
});

View File

@ -1,157 +0,0 @@
(function() {
var _, async, commandOptions, path, resin, vcs, visuals;
path = require('path');
_ = require('lodash-contrib');
async = require('async');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
commandOptions = require('./command-options');
vcs = require('resin-vcs');
exports.create = {
signature: 'app create <name>',
description: 'create an application',
help: 'Use this command to create a new resin.io application.\n\nYou can specify the application type with the `--type` option.\nOtherwise, an interactive dropdown will be shown for you to select from.\n\nYou can see a list of supported device types with\n\n $ resin devices supported\n\nExamples:\n\n $ resin app create MyApp\n $ resin app create MyApp --type raspberry-pi',
options: [
{
signature: 'type',
parameter: 'type',
description: 'application type',
alias: 't'
}
],
permission: 'user',
action: function(params, options, done) {
return async.waterfall([
function(callback) {
if (options.type != null) {
return callback(null, options.type);
}
return resin.models.device.getSupportedDeviceTypes(function(error, deviceTypes) {
if (error != null) {
return callback(error);
}
return visuals.widgets.select('Select a type', deviceTypes, callback);
});
}, function(type, callback) {
return resin.models.application.create(params.name, type, callback);
}
], done);
}
};
exports.list = {
signature: 'apps',
description: 'list all applications',
help: 'Use this command to list all your applications.\n\nNotice this command only shows the most important bits of information for each app.\nIf you want detailed information, use resin app <id> instead.\n\nExamples:\n\n $ resin apps',
permission: 'user',
action: function(params, options, done) {
return resin.models.application.getAll(function(error, applications) {
if (error != null) {
return done(error);
}
console.log(visuals.widgets.table.horizontal(applications, ['id', 'app_name', 'device_type', 'online_devices', 'devices_length']));
return done();
});
}
};
exports.info = {
signature: 'app <id>',
description: 'list a single application',
help: 'Use this command to show detailed information for a single application.\n\nExamples:\n\n $ resin app 91',
permission: 'user',
action: function(params, options, done) {
return resin.models.application.get(params.id, function(error, application) {
if (error != null) {
return done(error);
}
console.log(visuals.widgets.table.vertical(application, ['id', 'app_name', 'device_type', 'git_repository', 'commit']));
return done();
});
}
};
exports.restart = {
signature: 'app restart <id>',
description: 'restart an application',
help: 'Use this command to restart all devices that belongs to a certain application.\n\nExamples:\n\n $ resin app restart 91',
permission: 'user',
action: function(params, options, done) {
return resin.models.application.restart(params.id, done);
}
};
exports.remove = {
signature: 'app rm <id>',
description: 'remove an application',
help: 'Use this command to remove a resin.io application.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nExamples:\n\n $ resin app rm 91\n $ resin app rm 91 --yes',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return visuals.patterns.remove('application', options.yes, function(callback) {
return resin.models.application.remove(params.id, callback);
}, done);
}
};
exports.associate = {
signature: 'app associate <id>',
description: 'associate a resin project',
help: 'Use this command to associate a project directory with a resin application.\n\nThis command adds a \'resin\' git remote to the directory and runs git init if necessary.\n\nExamples:\n\n $ resin app associate 91\n $ resin app associate 91 --project my/app/directory',
permission: 'user',
action: function(params, options, done) {
var currentDirectory;
currentDirectory = process.cwd();
return async.waterfall([
function(callback) {
return vcs.initialize(currentDirectory, callback);
}, function(callback) {
return resin.models.application.get(params.id, callback);
}, function(application, callback) {
return vcs.addRemote(currentDirectory, application.git_repository, callback);
}
], function(error, remoteUrl) {
if (error != null) {
return done(error);
}
console.info("git repository added: " + remoteUrl);
return done(null, remoteUrl);
});
}
};
exports.init = {
signature: 'init',
description: 'init an application',
help: 'Use this command to initialise a directory as a resin application.\n\nThis command performs the following steps:\n - Create a resin.io application.\n - Initialize the current directory as a git repository.\n - Add the corresponding git remote to the application.\n\nExamples:\n\n $ resin init\n $ resin init --project my/app/directory',
permission: 'user',
action: function(params, options, done) {
var currentDirectory;
currentDirectory = process.cwd();
return async.waterfall([
function(callback) {
var currentDirectoryBasename;
currentDirectoryBasename = path.basename(currentDirectory);
return visuals.widgets.ask('What is the name of your application?', currentDirectoryBasename, callback);
}, function(applicationName, callback) {
return exports.create.action({
name: applicationName
}, options, callback);
}, function(applicationId, callback) {
return exports.associate.action({
id: applicationId
}, options, callback);
}
], done);
}
};
}).call(this);

View File

@ -1,134 +0,0 @@
(function() {
var _, async, resin, url, visuals;
_ = require('lodash-contrib');
url = require('url');
async = require('async');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
exports.login = {
signature: 'login',
description: 'login to resin.io',
help: 'Use this command to login to your resin.io account.\nYou need to login before you can use most of the commands this tool provides.\n\nYou can pass your credentials as `--username` and `--password` options, or you can omit the\ncredentials, in which case the tool will present you with an interactive login form.\n\nExamples:\n\n $ resin login --username <username> --password <password>\n $ resin login',
options: [
{
signature: 'username',
parameter: 'username',
description: 'user name',
alias: 'u'
}, {
signature: 'password',
parameter: 'password',
description: 'user password',
alias: 'p'
}
],
action: function(params, options, done) {
var hasOptionCredentials;
hasOptionCredentials = !_.isEmpty(options);
if (hasOptionCredentials) {
if (!options.username) {
return done(new Error('Missing username'));
}
if (!options.password) {
return done(new Error('Missing password'));
}
}
return async.waterfall([
function(callback) {
if (hasOptionCredentials) {
return callback(null, options);
} else {
return visuals.widgets.login(callback);
}
}, function(credentials, callback) {
return resin.auth.login(credentials, callback);
}
], done);
}
};
exports.logout = {
signature: 'logout',
description: 'logout from resin.io',
help: 'Use this command to logout from your resin.io account.o\n\nExamples:\n\n $ resin logout',
permission: 'user',
action: function(params, options, done) {
return resin.auth.logout(done);
}
};
exports.signup = {
signature: 'signup',
description: 'signup to resin.io',
help: 'Use this command to signup for a resin.io account.\n\nIf signup is successful, you\'ll be logged in to your new user automatically.\n\nExamples:\n\n $ resin signup\n Email: me@mycompany.com\n Username: johndoe\n Password: ***********\n\n $ resin signup --email me@mycompany.com --username johndoe --password ***********\n\n $ resin whoami\n johndoe',
options: [
{
signature: 'email',
parameter: 'email',
description: 'user email',
alias: 'e'
}, {
signature: 'username',
parameter: 'username',
description: 'user name',
alias: 'u'
}, {
signature: 'password',
parameter: 'user password',
description: 'user password',
alias: 'p'
}
],
action: function(params, options, done) {
var hasOptionCredentials;
hasOptionCredentials = !_.isEmpty(options);
if (hasOptionCredentials) {
if (options.email == null) {
return done(new Error('Missing email'));
}
if (options.username == null) {
return done(new Error('Missing username'));
}
if (options.password == null) {
return done(new Error('Missing password'));
}
}
return async.waterfall([
function(callback) {
if (hasOptionCredentials) {
return callback(null, options);
}
return visuals.widgets.register(callback);
}, function(credentials, callback) {
return resin.auth.register(credentials, function(error, token) {
return callback(error, credentials);
});
}, function(credentials, callback) {
return resin.auth.login(credentials, callback);
}
], done);
}
};
exports.whoami = {
signature: 'whoami',
description: 'get current username',
help: 'Use this command to find out the current logged in username.\n\nExamples:\n\n $ resin whoami',
permission: 'user',
action: function(params, options, done) {
return resin.auth.whoami(function(error, username) {
if (username == null) {
return done(new Error('Username not found'));
}
return console.log(username);
});
}
};
}).call(this);

View File

@ -1,45 +0,0 @@
(function() {
var _;
_ = require('lodash');
exports.yes = {
signature: 'yes',
description: 'confirm non interactively',
boolean: true,
alias: 'y'
};
exports.optionalApplication = {
signature: 'application',
parameter: 'application',
description: 'application id',
alias: ['a', 'app']
};
exports.application = _.defaults({
required: 'You have to specify an application'
}, exports.optionalApplication);
exports.network = {
signature: 'network',
parameter: 'network',
description: 'network type',
alias: 'n'
};
exports.wifiSsid = {
signature: 'ssid',
parameter: 'ssid',
description: 'wifi ssid, if network is wifi',
alias: 's'
};
exports.wifiKey = {
signature: 'key',
parameter: 'key',
description: 'wifi key, if network is wifi',
alias: 'k'
};
}).call(this);

View File

@ -1,148 +0,0 @@
(function() {
var _, async, commandOptions, osAction, path, resin, vcs, visuals;
_ = require('lodash-contrib');
path = require('path');
async = require('async');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
vcs = require('resin-vcs');
commandOptions = require('./command-options');
osAction = require('./os');
exports.list = {
signature: 'devices',
description: 'list all devices',
help: 'Use this command to list all devices that belong to a certain application.\n\nExamples:\n\n $ resin devices --application 91',
options: [commandOptions.application],
permission: 'user',
action: function(params, options, done) {
return resin.models.device.getAllByApplication(options.application, function(error, devices) {
if (error != null) {
return done(error);
}
console.log(visuals.widgets.table.horizontal(devices, ['id', 'name', 'device_type', 'is_online', 'application_name', 'status', 'last_seen']));
return done();
});
}
};
exports.info = {
signature: 'device <id>',
description: 'list a single device',
help: 'Use this command to show information about a single device.\n\nExamples:\n\n $ resin device 317',
permission: 'user',
action: function(params, options, done) {
return resin.models.device.get(params.id, function(error, device) {
if (error != null) {
return done(error);
}
console.log(visuals.widgets.table.vertical(device, ['id', 'name', 'device_type', 'is_online', 'ip_address', 'application_name', 'status', 'last_seen', 'uuid', 'commit', 'supervisor_version', 'is_web_accessible', 'note']));
return done();
});
}
};
exports.remove = {
signature: 'device rm <id>',
description: 'remove a device',
help: 'Use this command to remove a device from resin.io.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nExamples:\n\n $ resin device rm 317\n $ resin device rm 317 --yes',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return visuals.patterns.remove('device', options.yes, function(callback) {
return resin.models.device.remove(params.id, callback);
}, done);
}
};
exports.identify = {
signature: 'device identify <uuid>',
description: 'identify a device with a UUID',
help: 'Use this command to identify a device.\n\nIn the Raspberry Pi, the ACT led is blinked several times.\n\nExamples:\n\n $ resin device identify 23c73a12e3527df55c60b9ce647640c1b7da1b32d71e6a39849ac0f00db828',
permission: 'user',
action: function(params, options, done) {
return resin.models.device.identify(params.uuid, done);
}
};
exports.rename = {
signature: 'device rename <id> [name]',
description: 'rename a resin device',
help: 'Use this command to rename a device.\n\nIf you omit the name, you\'ll get asked for it interactively.\n\nExamples:\n\n $ resin device rename 317 MyPi\n $ resin device rename 317',
permission: 'user',
action: function(params, options, done) {
return async.waterfall([
function(callback) {
if (!_.isEmpty(params.name)) {
return callback(null, params.name);
}
return visuals.widgets.ask('How do you want to name this device?', null, callback);
}, function(name, callback) {
return resin.models.device.rename(params.id, name, callback);
}
], done);
}
};
exports.supported = {
signature: 'devices supported',
description: 'list all supported devices',
help: 'Use this command to get the list of all supported devices\n\nExamples:\n\n $ resin devices supported',
permission: 'user',
action: function(params, options, done) {
return resin.models.device.getSupportedDeviceTypes(function(error, devices) {
if (error != null) {
return done(error);
}
_.each(devices, _.unary(console.log));
return done();
});
}
};
exports.init = {
signature: 'device init [device]',
description: 'initialise a device with resin os',
help: 'Use this command to download the OS image of a certain application and write it to an SD Card.\n\nNote that this command requires admin privileges.\n\nIf `device` is omitted, you will be prompted to select a device interactively.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nYou can quiet the progress bar by passing the `--quiet` boolean option.\n\nYou may have to unmount the device before attempting this operation.\n\nYou need to configure the network type and other settings:\n\nEthernet:\n You can setup the device OS to use ethernet by setting the `--network` option to "ethernet".\n\nWifi:\n You can setup the device OS to use wifi by setting the `--network` option to "wifi".\n If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well.\n\nYou can omit network related options to be asked about them interactively.\n\nExamples:\n\n $ resin device init --application 91\n $ resin device init --application 91 --network ethernet\n $ resin device init /dev/disk2 --application 91 --network wifi --ssid MyNetwork --key secret',
options: [commandOptions.optionalApplication, commandOptions.network, commandOptions.wifiSsid, commandOptions.wifiKey],
permission: 'user',
action: function(params, options, done) {
params.id = options.application;
return async.waterfall([
function(callback) {
if (options.application != null) {
return callback(null, options.application);
}
return vcs.getApplicationId(process.cwd(), callback);
}, function(applicationId, callback) {
params.id = applicationId;
if (params.device != null) {
return callback(null, params.device);
}
return visuals.patterns.selectDrive(callback);
}, function(device, callback) {
params.device = device;
return visuals.patterns.confirm(options.yes, "This will completely erase " + params.device + ". Are you sure you want to continue?", callback);
}, function(confirmed, callback) {
if (!confirmed) {
return done();
}
options.yes = confirmed;
return osAction.download.action(params, options, callback);
}, function(outputFile, callback) {
params.image = outputFile;
return osAction.install.action(params, options, callback);
}
], done);
}
};
}).call(this);

View File

@ -1,33 +0,0 @@
(function() {
var _, async, drivelist, visuals;
_ = require('lodash');
async = require('async');
visuals = require('resin-cli-visuals');
drivelist = require('drivelist');
exports.list = {
signature: 'drives',
description: 'list available drives',
help: 'Use this command to list all drives that are connected to your machine.\n\nExamples:\n\n $ resin drives',
permission: 'user',
action: function(params, options, done) {
return drivelist.list(function(error, drives) {
if (error != null) {
return done(error);
}
return async.reject(drives, drivelist.isSystem, function(removableDrives) {
if (_.isEmpty(removableDrives)) {
return done(new Error('No removable devices available'));
}
console.log(visuals.widgets.table.horizontal(removableDrives, ['device', 'description', 'size']));
return done();
});
});
}
};
}).call(this);

View File

@ -1,81 +0,0 @@
(function() {
var _, commandOptions, resin, visuals;
_ = require('lodash-contrib');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
commandOptions = require('./command-options');
exports.list = {
signature: 'envs',
description: 'list all environment variables',
help: 'Use this command to list all environment variables for a particular application.\nNotice we will support per-device environment variables soon.\n\nThis command lists all custom environment variables set on the devices running\nthe application. If you want to see all environment variables, including private\nones used by resin, use the verbose option.\n\nExample:\n\n $ resin envs --application 91\n $ resin envs --application 91 --verbose',
options: [
commandOptions.application, {
signature: 'verbose',
description: 'show private environment variables',
boolean: true,
alias: 'v'
}
],
permission: 'user',
action: function(params, options, done) {
return resin.models.environmentVariables.getAllByApplication(options.application, function(error, environmentVariables) {
if (error != null) {
return done(error);
}
if (!options.verbose) {
environmentVariables = _.reject(environmentVariables, resin.models.environmentVariables.isSystemVariable);
}
console.log(visuals.widgets.table.horizontal(environmentVariables, ['id', 'name', 'value']));
return done();
});
}
};
exports.remove = {
signature: 'env rm <id>',
description: 'remove an environment variable',
help: 'Use this command to remove an environment variable from an application.\n\nDon\'t remove resin specific variables, as things might not work as expected.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nExamples:\n\n $ resin env rm 215\n $ resin env rm 215 --yes',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return visuals.patterns.remove('environment variable', options.yes, function(callback) {
return resin.models.environmentVariables.remove(params.id, callback);
}, done);
}
};
exports.add = {
signature: 'env add <key> [value]',
description: 'add an environment variable',
help: 'Use this command to add an enviroment variable to an application.\n\nYou need to pass the `--application` option.\n\nIf value is omitted, the tool will attempt to use the variable\'s value\nas defined in your host machine.\n\nIf the value is grabbed from the environment, a warning message will be printed.\nUse `--quiet` to remove it.\n\nExamples:\n\n $ resin env add EDITOR vim -a 91\n $ resin env add TERM -a 91',
options: [commandOptions.application],
permission: 'user',
action: function(params, options, done) {
if (params.value == null) {
params.value = process.env[params.key];
if (params.value == null) {
return done(new Error("Environment value not found for key: " + params.key));
} else {
console.info("Warning: using " + params.key + "=" + params.value + " from host environment");
}
}
return resin.models.environmentVariables.create(options.application, params.key, params.value, done);
}
};
exports.rename = {
signature: 'env rename <id> <value>',
description: 'rename an environment variable',
help: 'Use this command to rename an enviroment variable from an application.\n\nExamples:\n\n $ resin env rename 376 emacs',
permission: 'user',
action: function(params, options, done) {
return resin.models.environmentVariables.update(params.id, params.value, done);
}
};
}).call(this);

View File

@ -1,78 +0,0 @@
(function() {
var _, async, examplesData, fs, path, resin, vcs, visuals;
async = require('async');
fs = require('fs');
path = require('path');
_ = require('lodash');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
vcs = require('resin-vcs');
examplesData = require('../data/examples.json');
exports.list = {
signature: 'examples',
description: 'list all example applications',
help: 'Use this command to list available example applications from resin.io\n\nExample:\n\n $ resin examples',
permission: 'user',
action: function() {
examplesData = _.map(examplesData, function(example, index) {
example.id = index + 1;
return example;
});
examplesData = _.map(examplesData, function(example) {
if (example.author == null) {
example.author = 'Unknown';
}
return example;
});
return console.log(visuals.widgets.table.horizontal(examplesData, ['id', 'display_name', 'repository', 'author']));
}
};
exports.info = {
signature: 'example <id>',
description: 'list a single example application',
help: 'Use this command to show information of a single example application\n\nExample:\n\n $ resin example 3',
permission: 'user',
action: function(params, options, done) {
var example, id;
id = params.id - 1;
example = examplesData[id];
if (example == null) {
return done(new Error("Unknown example: " + id));
}
example.id = id;
if (example.author == null) {
example.author = 'Unknown';
}
console.log(visuals.widgets.table.vertical(example, ['id', 'display_name', 'description', 'author', 'repository']));
return done();
}
};
exports.clone = {
signature: 'example clone <id>',
description: 'clone an example application',
help: 'Use this command to clone an example application to the current directory\n\nThis command outputs information about the cloning process.\nUse `--quiet` to remove that output.\n\nExample:\n\n $ resin example clone 3',
permission: 'user',
action: function(params, options, done) {
var currentDirectory, example;
example = examplesData[params.id - 1];
if (example == null) {
return done(new Error("Unknown example: " + id));
}
currentDirectory = process.cwd();
console.info("Cloning " + example.display_name + " to " + currentDirectory);
return vcs.clone(example.repository, currentDirectory, done);
}
};
}).call(this);

View File

@ -1,162 +0,0 @@
(function() {
var PADDING_INITIAL, PADDING_MIDDLE, _, addAlias, addOptionPrefix, buildHelpString, buildOptionSignatureHelp, capitano, command, general, getCommandHelp, getFieldMaxLength, getOptionHelp, getOptionsParsedSignatures, resin;
_ = require('lodash');
_.str = require('underscore.string');
resin = require('resin-sdk');
capitano = require('capitano');
PADDING_INITIAL = ' ';
PADDING_MIDDLE = '\t';
getFieldMaxLength = function(array, field) {
return _.max(_.map(array, function(item) {
return item[field].toString().length;
}));
};
buildHelpString = function(firstColumn, secondColumn) {
var result;
result = "" + PADDING_INITIAL + firstColumn;
result += "" + PADDING_MIDDLE + secondColumn;
return result;
};
addOptionPrefix = function(option) {
if (option.length <= 0) {
return;
}
if (option.length === 1) {
return "-" + option;
} else {
return "--" + option;
}
};
addAlias = function(alias) {
return ", " + (addOptionPrefix(alias));
};
buildOptionSignatureHelp = function(option) {
var alias, i, len, ref, result;
result = addOptionPrefix(option.signature.toString());
if (_.isString(option.alias)) {
result += addAlias(option.alias);
} else if (_.isArray(option.alias)) {
ref = option.alias;
for (i = 0, len = ref.length; i < len; i++) {
alias = ref[i];
result += addAlias(alias);
}
}
if (option.parameter != null) {
result += " <" + option.parameter + ">";
}
return result;
};
getCommandHelp = function(command) {
var commandSignature, maxSignatureLength;
maxSignatureLength = getFieldMaxLength(capitano.state.commands, 'signature');
commandSignature = _.str.rpad(command.signature.toString(), maxSignatureLength, ' ');
return buildHelpString(commandSignature, command.description);
};
getOptionsParsedSignatures = function(optionsHelp) {
var maxLength;
maxLength = _.max(_.map(optionsHelp, function(signature) {
return signature.length;
}));
return _.map(optionsHelp, function(signature) {
return _.str.rpad(signature, maxLength, ' ');
});
};
getOptionHelp = function(option, maxLength) {
var result;
result = PADDING_INITIAL;
result += _.str.rpad(option.signature, maxLength, ' ');
result += PADDING_MIDDLE;
result += option.description;
return result;
};
general = function() {
var command, i, j, len, len1, option, optionSignatureMaxLength, options, ref;
console.log('Usage: resin [COMMAND] [OPTIONS]\n');
console.log('Commands:\n');
ref = capitano.state.commands;
for (i = 0, len = ref.length; i < len; i++) {
command = ref[i];
if (command.isWildcard()) {
continue;
}
console.log(getCommandHelp(command));
}
console.log('\nGlobal Options:\n');
options = _.map(capitano.state.globalOptions, function(option) {
option.signature = buildOptionSignatureHelp(option);
return option;
});
optionSignatureMaxLength = _.max(_.map(options, function(option) {
return option.signature.length;
}));
for (j = 0, len1 = options.length; j < len1; j++) {
option = options[j];
console.log(getOptionHelp(option, optionSignatureMaxLength));
}
return console.log();
};
command = function(params, options, done) {
return capitano.state.getMatchCommand(params.command, function(error, command) {
var i, len, option, optionSignatureMaxLength;
if (error != null) {
return done(error);
}
if ((command == null) || command.isWildcard()) {
return capitano.defaults.actions.commandNotFound(params.command);
}
console.log("Usage: " + command.signature);
if (command.help != null) {
console.log("\n" + command.help);
} else if (command.description != null) {
console.log("\n" + (_.str.humanize(command.description)));
}
if (!_.isEmpty(command.options)) {
console.log('\nOptions:\n');
options = _.map(command.options, function(option) {
option.signature = buildOptionSignatureHelp(option);
return option;
});
optionSignatureMaxLength = _.max(_.map(options, function(option) {
return option.signature.toString().length;
}));
for (i = 0, len = options.length; i < len; i++) {
option = options[i];
console.log(getOptionHelp(option, optionSignatureMaxLength));
}
console.log();
}
return done();
});
};
exports.help = {
signature: 'help [command...]',
description: 'show help',
help: 'Get detailed help for an specific command.\n\nExamples:\n\n $ resin help apps\n $ resin help os download',
action: function(params, options, done) {
if (params.command != null) {
return command(params, options, done);
} else {
return general(params, options, done);
}
}
};
}).call(this);

View File

@ -1,20 +0,0 @@
(function() {
module.exports = {
app: require('./app'),
info: require('./info'),
auth: require('./auth'),
drive: require('./drive'),
device: require('./device'),
env: require('./environment-variables'),
keys: require('./keys'),
logs: require('./logs'),
notes: require('./notes'),
preferences: require('./preferences'),
os: require('./os'),
help: require('./help'),
examples: require('./examples'),
plugin: require('./plugin'),
update: require('./update')
};
}).call(this);

View File

@ -1,16 +0,0 @@
(function() {
var packageJSON;
packageJSON = require('../../package.json');
exports.version = {
signature: 'version',
description: 'output the version number',
help: 'Display the Resin CLI, as well as the bundled NodeJS version.',
action: function() {
console.log(packageJSON.name + ": " + packageJSON.version);
return console.log("node: " + process.version);
}
};
}).call(this);

View File

@ -1,92 +0,0 @@
(function() {
var _, async, capitano, commandOptions, fs, resin, visuals;
_ = require('lodash');
_.str = require('underscore.string');
async = require('async');
fs = require('fs');
resin = require('resin-sdk');
capitano = require('capitano');
visuals = require('resin-cli-visuals');
commandOptions = require('./command-options');
exports.list = {
signature: 'keys',
description: 'list all ssh keys',
help: 'Use this command to list all your SSH keys.\n\nExamples:\n\n $ resin keys',
permission: 'user',
action: function(params, options, done) {
return resin.models.key.getAll(function(error, keys) {
if (error != null) {
return done(error);
}
console.log(visuals.widgets.table.horizontal(keys, ['id', 'title']));
return done();
});
}
};
exports.info = {
signature: 'key <id>',
description: 'list a single ssh key',
help: 'Use this command to show information about a single SSH key.\n\nExamples:\n\n $ resin key 17',
permission: 'user',
action: function(params, options, done) {
return resin.models.key.get(params.id, function(error, key) {
var sshKeyWidth;
if (error != null) {
return done(error);
}
sshKeyWidth = resin.settings.get('sshKeyWidth');
key.public_key = '\n' + visuals.helpers.chop(key.public_key, sshKeyWidth);
console.log(visuals.widgets.table.vertical(key, ['id', 'title', 'public_key']));
return done();
});
}
};
exports.remove = {
signature: 'key rm <id>',
description: 'remove a ssh key',
help: 'Use this command to remove a SSH key from resin.io.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nExamples:\n\n $ resin key rm 17\n $ resin key rm 17 --yes',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return visuals.patterns.remove('key', options.yes, function(callback) {
return resin.models.key.remove(params.id, callback);
}, done);
}
};
exports.add = {
signature: 'key add <name> [path]',
description: 'add a SSH key to resin.io',
help: 'Use this command to associate a new SSH key with your account.\n\nIf `path` is omitted, the command will attempt\nto read the SSH key from stdin.\n\nExamples:\n\n $ resin key add Main ~/.ssh/id_rsa.pub\n $ cat ~/.ssh/id_rsa.pub | resin key add Main',
permission: 'user',
action: function(params, options, done) {
return async.waterfall([
function(callback) {
if (params.path != null) {
return fs.readFile(params.path, {
encoding: 'utf8'
}, callback);
} else {
return capitano.utils.getStdin(function(data) {
return callback(null, data);
});
}
}, function(key, callback) {
return resin.models.key.create(params.name, key, callback);
}
], done);
}
};
}).call(this);

View File

@ -1,48 +0,0 @@
(function() {
var LOGS_HISTORY_COUNT, _, resin;
_ = require('lodash');
resin = require('resin-sdk');
LOGS_HISTORY_COUNT = 200;
exports.logs = {
signature: 'logs <uuid>',
description: 'show device logs',
help: 'Use this command to show logs for a specific device.\n\nBy default, the command prints all log messages and exit.\n\nTo limit the output to the n last lines, use the `--num` option along with a number.\nThis is similar to doing `resin logs <uuid> | tail -n X`.\n\nTo continuously stream output, and see new logs in real time, use the `--tail` option.\n\nNote that for now you need to provide the whole UUID for this command to work correctly,\nand the tool won\'t notice if you\'re using an invalid UUID.\n\nThis is due to some technical limitations that we plan to address soon.\n\nExamples:\n\n $ resin logs 23c73a12e3527df55c60b9ce647640c1b7da1b32d71e6a39849ac0f00db828\n $ resin logs 23c73a12e3527df55c60b9ce647640c1b7da1b32d71e6a39849ac0f00db828 --num 20\n $ resin logs 23c73a12e3527df55c60b9ce647640c1b7da1b32d71e6a39849ac0f00db828 --tail',
options: [
{
signature: 'num',
parameter: 'num',
description: 'number of lines to display',
alias: 'n'
}, {
signature: 'tail',
description: 'continuously stream output',
boolean: true,
alias: 't'
}
],
permission: 'user',
action: function(params, options, done) {
return resin.logs.subscribe(params.uuid, {
history: options.num || LOGS_HISTORY_COUNT,
tail: options.tail
}, function(error, message) {
if (error != null) {
return done(error);
}
if (_.isArray(message)) {
_.each(message, function(line) {
return console.log(line);
});
} else {
console.log(message);
}
return done();
});
}
};
}).call(this);

View File

@ -1,27 +0,0 @@
(function() {
var async, resin;
async = require('async');
resin = require('resin-sdk');
exports.set = {
signature: 'note <|note>',
description: 'set a device note',
help: 'Use this command to set or update a device note.\n\nIf note command isn\'t passed, the tool attempts to read from `stdin`.\n\nTo view the notes, use $ resin device <id>.\n\nExamples:\n\n $ resin note "My useful note" --device 317\n $ cat note.txt | resin note --device 317',
options: [
{
signature: 'device',
parameter: 'device',
description: 'device id',
alias: ['d', 'dev'],
required: 'You have to specify a device'
}
],
permission: 'user',
action: function(params, options, done) {
return resin.models.device.note(options.device, params.note, done);
}
};
}).call(this);

View File

@ -1,159 +0,0 @@
(function() {
var _, async, commandOptions, diskio, fs, mkdirp, npm, os, packageJSON, path, progressStream, resin, updateActions, visuals;
_ = require('lodash-contrib');
fs = require('fs');
os = require('os');
async = require('async');
path = require('path');
mkdirp = require('mkdirp');
resin = require('resin-sdk');
visuals = require('resin-cli-visuals');
progressStream = require('progress-stream');
diskio = require('diskio');
commandOptions = require('./command-options');
npm = require('../npm');
packageJSON = require('../../package.json');
updateActions = require('./update');
exports.download = {
signature: 'os download <id>',
description: 'download device OS',
help: 'Use this command to download the device OS configured to a specific network.\n\nEthernet:\n You can setup the device OS to use ethernet by setting the `--network` option to "ethernet".\n\nWifi:\n You can setup the device OS to use wifi by setting the `--network` option to "wifi".\n If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well.\n\nAlternatively, you can omit all kind of network configuration options to configure interactively.\n\nYou have to specify an output location with the `--output` option.\n\nExamples:\n\n $ resin os download 91 --output ~/MyResinOS.zip\n $ resin os download 91 --network ethernet --output ~/MyResinOS.zip\n $ resin os download 91 --network wifi --ssid MyNetwork --key secreykey123 --output ~/MyResinOS.zip\n $ resin os download 91 --network ethernet --output ~/MyResinOS.zip',
options: [
commandOptions.network, commandOptions.wifiSsid, commandOptions.wifiKey, {
signature: 'output',
parameter: 'output',
description: 'output file',
alias: 'o',
required: 'You need to specify an output file'
}
],
permission: 'user',
action: function(params, options, done) {
var osParams;
osParams = {
network: options.network,
wifiSsid: options.ssid,
wifiKey: options.key,
appId: params.id
};
return async.waterfall([
function(callback) {
if (osParams.network != null) {
return callback();
}
return visuals.patterns.selectNetworkParameters(function(error, parameters) {
if (error != null) {
return callback(error);
}
_.extend(osParams, parameters);
return callback();
});
}, function(callback) {
return mkdirp(path.dirname(options.output), _.unary(callback));
}, function(callback) {
var bar;
console.info("Destination file: " + options.output + "\n");
bar = new visuals.widgets.Progress('Downloading Device OS');
return resin.models.os.download(osParams, options.output, callback, function(state) {
return bar.update(state);
});
}
], function(error) {
if (error != null) {
return done(error);
}
console.info("\nFinished downloading " + options.output);
return done(null, options.output);
});
}
};
exports.install = {
signature: 'os install <image> [device]',
description: 'write an operating system image to a device',
help: 'Use this command to write an operating system image to a device.\n\nNote that this command requires admin privileges.\n\nIf `device` is omitted, you will be prompted to select a device interactively.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nYou can quiet the progress bar by passing the `--quiet` boolean option.\n\nYou may have to unmount the device before attempting this operation.\n\nSee the `drives` command to get a list of all connected devices to your machine and their respective ids.\n\nIn Mac OS X:\n\n $ sudo diskutil unmountDisk /dev/xxx\n\nIn GNU/Linux:\n\n $ sudo umount /dev/xxx\n\nExamples:\n\n $ resin os install rpi.iso /dev/disk2',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return async.waterfall([
function(callback) {
return npm.isUpdated(packageJSON.name, packageJSON.version, callback);
}, function(isUpdated, callback) {
if (isUpdated) {
return callback();
}
console.info('Resin CLI is outdated.\n\nIn order to avoid device compatibility issues, this command\nrequires that you have the Resin CLI updated.\n\nUpdating now...');
return updateActions.update.action(params, options, _.unary(done));
}, function(callback) {
if (params.device != null) {
return callback(null, params.device);
}
return visuals.patterns.selectDrive(function(error, device) {
if (error != null) {
return callback(error);
}
if (device == null) {
return callback(new Error('No removable devices available'));
}
return callback(null, device);
});
}, function(device, callback) {
var message;
params.device = device;
message = "This will completely erase " + params.device + ". Are you sure you want to continue?";
return visuals.patterns.confirm(options.yes, message, callback);
}, function(confirmed, callback) {
var bar, error, imageFileSize, imageFileStream, progress;
if (!confirmed) {
return done();
}
imageFileSize = fs.statSync(params.image).size;
if (imageFileSize === 0) {
error = new Error("Invalid OS image: " + params.image + ". The image is 0 bytes.");
return callback(error);
}
progress = progressStream({
length: imageFileSize,
time: 500
});
if (!options.quiet) {
bar = new visuals.widgets.Progress('Writing Device OS');
progress.on('progress', function(status) {
return bar.update(status);
});
}
imageFileStream = fs.createReadStream(params.image).pipe(progress);
return diskio.writeStream(params.device, imageFileStream, callback);
}
], function(error) {
var resinWritePath, windosu;
if (error == null) {
return done();
}
if (_.all([os.platform() === 'win32', error.code === 'EPERM' || error.code === 'EACCES', !options.fromScript])) {
windosu = require('windosu');
resinWritePath = "\"" + (path.join(__dirname, '..', '..', 'bin', 'resin-write')) + "\"";
return windosu.exec("\"" + process.argv[0] + "\" " + resinWritePath + " \"" + params.image + "\" \"" + params.device + "\"");
} else {
return done(error);
}
});
}
};
}).call(this);

View File

@ -1,83 +0,0 @@
(function() {
var _, commandOptions, plugins, visuals;
_ = require('lodash');
visuals = require('resin-cli-visuals');
commandOptions = require('./command-options');
plugins = require('../plugins');
exports.list = {
signature: 'plugins',
description: 'list all plugins',
help: 'Use this command to list all the installed resin plugins.\n\nExamples:\n\n $ resin plugins',
permission: 'user',
action: function(params, options, done) {
return plugins.list(function(error, resinPlugins) {
if (error != null) {
return done(error);
}
if (_.isEmpty(resinPlugins)) {
console.log('You don\'t have any plugins yet');
return done();
}
console.log(visuals.widgets.table.horizontal(resinPlugins, ['name', 'version', 'description', 'license']));
return done();
});
}
};
exports.install = {
signature: 'plugin install <name>',
description: 'install a plugin',
help: 'Use this command to install a resin plugin\n\nUse `--quiet` to prevent information logging.\n\nExamples:\n\n $ resin plugin install hello',
permission: 'user',
action: function(params, options, done) {
return plugins.install(params.name, function(error) {
if (error != null) {
return done(error);
}
console.info("Plugin installed: " + params.name);
return done();
});
}
};
exports.update = {
signature: 'plugin update <name>',
description: 'update a plugin',
help: 'Use this command to update a resin plugin\n\nUse `--quiet` to prevent information logging.\n\nExamples:\n\n $ resin plugin update hello',
permission: 'user',
action: function(params, options, done) {
return plugins.update(params.name, function(error, version) {
if (error != null) {
return done(error);
}
console.info("Plugin updated: " + params.name + "@" + version);
return done();
});
}
};
exports.remove = {
signature: 'plugin rm <name>',
description: 'remove a plugin',
help: 'Use this command to remove a resin.io plugin.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nExamples:\n\n $ resin plugin rm hello\n $ resin plugin rm hello --yes',
options: [commandOptions.yes],
permission: 'user',
action: function(params, options, done) {
return visuals.patterns.remove('plugin', options.yes, function(callback) {
return plugins.remove(params.name, callback);
}, function(error) {
if (error != null) {
return done(error);
}
console.info("Plugin removed: " + params.name);
return done();
});
}
};
}).call(this);

View File

@ -1,23 +0,0 @@
(function() {
var open, resin, url;
open = require('open');
url = require('url');
resin = require('resin-sdk');
exports.preferences = {
signature: 'preferences',
description: 'open preferences form',
help: 'Use this command to open the preferences form.\n\nIn the future, we will allow changing all preferences directly from the terminal.\nFor now, we open your default web browser and point it to the web based preferences form.\n\nExamples:\n\n $ resin preferences',
permission: 'user',
action: function() {
var absUrl, preferencesUrl;
preferencesUrl = resin.settings.get('urls.preferences');
absUrl = url.resolve(resin.settings.get('remoteUrl'), preferencesUrl);
return open(absUrl);
}
};
}).call(this);

View File

@ -1,23 +0,0 @@
(function() {
var npm, packageJSON;
npm = require('../npm');
packageJSON = require('../../package.json');
exports.update = {
signature: 'update',
description: 'update the resin cli',
help: 'Use this command to update the Resin CLI\n\nThis command outputs information about the update process.\nUse `--quiet` to remove that output.\n\nThe Resin CLI checks for updates once per day.\n\nMajor updates require a manual update with this update command,\nwhile minor updates are applied automatically.\n\nExamples:\n\n $ resin update',
action: function(params, options, done) {
return npm.update(packageJSON.name, function(error, version) {
if (error != null) {
return done(error);
}
console.info("Upgraded " + packageJSON.name + " to v" + version + ".");
return done(null, version);
});
}
};
}).call(this);

View File

@ -1,172 +0,0 @@
(function() {
var _, actions, async, capitano, changeProjectDirectory, errors, plugins, resin, update;
_ = require('lodash');
async = require('async');
capitano = require('capitano');
resin = require('resin-sdk');
actions = require('./actions');
errors = require('./errors');
plugins = require('./plugins');
update = require('./update');
capitano.permission('user', function(done) {
return resin.auth.isLoggedIn(function(isLoggedIn) {
if (!isLoggedIn) {
return done(new Error('You have to log in'));
}
return done();
});
});
capitano.command({
signature: '*',
action: function() {
return capitano.execute({
command: 'help'
});
}
});
capitano.globalOption({
signature: 'quiet',
description: 'quiet (no output)',
boolean: true,
alias: 'q'
});
capitano.globalOption({
signature: 'project',
parameter: 'path',
description: 'project path',
alias: 'j'
});
capitano.globalOption({
signature: 'no-color',
description: 'disable colour highlighting',
boolean: true
});
capitano.command(actions.info.version);
capitano.command(actions.help.help);
capitano.command(actions.auth.login);
capitano.command(actions.auth.logout);
capitano.command(actions.auth.signup);
capitano.command(actions.auth.whoami);
capitano.command(actions.app.create);
capitano.command(actions.app.list);
capitano.command(actions.app.info);
capitano.command(actions.app.remove);
capitano.command(actions.app.restart);
capitano.command(actions.app.associate);
capitano.command(actions.app.init);
capitano.command(actions.device.list);
capitano.command(actions.device.supported);
capitano.command(actions.device.rename);
capitano.command(actions.device.init);
capitano.command(actions.device.info);
capitano.command(actions.device.remove);
capitano.command(actions.device.identify);
capitano.command(actions.drive.list);
capitano.command(actions.notes.set);
capitano.command(actions.preferences.preferences);
capitano.command(actions.keys.list);
capitano.command(actions.keys.add);
capitano.command(actions.keys.info);
capitano.command(actions.keys.remove);
capitano.command(actions.env.list);
capitano.command(actions.env.add);
capitano.command(actions.env.rename);
capitano.command(actions.env.remove);
capitano.command(actions.logs.logs);
capitano.command(actions.os.download);
capitano.command(actions.os.install);
capitano.command(actions.examples.list);
capitano.command(actions.examples.clone);
capitano.command(actions.examples.info);
capitano.command(actions.plugin.list);
capitano.command(actions.plugin.install);
capitano.command(actions.plugin.update);
capitano.command(actions.plugin.remove);
capitano.command(actions.update.update);
changeProjectDirectory = function(directory) {
try {
return process.chdir(directory);
} catch (_error) {
return errors.handle(new Error("Invalid project: " + directory));
}
};
async.waterfall([
function(callback) {
return update.check(callback);
}, function(callback) {
return plugins.register('resin-plugin-', callback);
}, function(callback) {
var dataPrefix;
dataPrefix = resin.settings.get('dataPrefix');
return resin.data.prefix.set(dataPrefix, callback);
}, function(callback) {
var cli;
cli = capitano.parse(process.argv);
if (cli.global.quiet) {
console.info = _.noop;
}
if (cli.global.project != null) {
changeProjectDirectory(cli.global.project);
}
return capitano.execute(cli, callback);
}
], errors.handle);
}).call(this);

View File

@ -1,96 +0,0 @@
[
{
"name": "basic-resin-node-project",
"display_name": "Node.js Starter Project",
"repository": "https://github.com/resin-io/basic-resin-node-project",
"description": "This is a simple Hello, World project for node.js designed to act as a basis for future work. It demonstrates how to install native Linux packages and configure your application."
},
{
"name": "cimon",
"display_name": "Cimon",
"repository": "https://bitbucket.org/efwe/cimon",
"description": "A simple tool for reading temperatures from a USB-enabled thermometer. This project is used as the backend to efwe's awesome temperature visualisation at 123k.de.",
"author": "efwe"
},
{
"name": "firebaseDTL",
"display_name": "Digital Temperature Logger",
"repository": "https://github.com/shaunmulligan/firebaseDTL",
"description": "A Firebase-backed Digital Temperature Logger allowing you to connect devices with multiple temperature sensors to a central cloud-based datastore.",
"author": "Shaun Mulligan"
},
{
"name": "digitiser",
"display_name": "Digitiser",
"repository": "https://github.com/shaunmulligan/digitiser",
"description": "A tool for displaying integer values from a JSON endpoint on a MAX7219 7-segment display.",
"author": "Shaun Mulligan"
},
{
"name": "basic-gpio",
"display_name": "Example Pi Pins Application",
"repository": "https://github.com/shaunmulligan/basic-gpio",
"description": "A simple application which demonstrates the use of the Pi Pins library to interface with GPIO.",
"author": "Shaun Mulligan"
},
{
"name": "coder",
"display_name": "Google Coder",
"repository": "https://github.com/resin-io/coder",
"description": "Resin.io-enabled version of Google's excellent Coder project which makes it easy to develop web projects on your device."
},
{
"name": "hoversnap",
"display_name": "Hoversnap",
"repository": "https://github.com/resin-io/hoversnap",
"description": "A tool for controlling a camera using a foot switch in order to capture shots in which people appear to be flying."
},
{
"name": "resin-piminer",
"display_name": "Pi Miner",
"repository": "https://github.com/csquared/resin-piminer",
"description": "A bitcoin miner for the Raspberry Pi.",
"author": "Chris Continanza"
},
{
"name": "resin-cctv",
"display_name": "Resin CCTV",
"repository": "https://github.com/abresas/resin-cctv",
"description": "A project which allows you to use your devices as a CCTV camera system which hooks into Dropbox.",
"author": "Aleksis Brezas"
},
{
"name": "resin_player",
"display_name": "Resin Player",
"repository": "https://bitbucket.org/lifeeth/resin_player/",
"description": "A project which allows you to play squeezebox media through your devices.",
"author": "Praneeth Bodduluri"
},
{
"name": "salesforceTemp",
"display_name": "Salesforce Temperature Probe",
"repository": "https://github.com/shaunmulligan/salesforceTemp",
"description": "Example application for interfacing with a temperature probe using Salesforce.com.",
"author": "Shaun Mulligan"
},
{
"name": "sms2speech",
"display_name": "SMS to Speech",
"repository": "https://github.com/alexandrosm/sms2speech",
"description": "A simple tool which uses Twillio to read out incoming SMS messages.",
"author": "Alexandros Marinos"
},
{
"name": "resin-kiosk",
"display_name": "Simple Digitiser Kiosk",
"repository": "https://bitbucket.org/lifeeth/resin-kiosk",
"description": "Displays values from a JSON endpoint on your browser in kiosk mode",
"author": "Praneeth Bodduluri"
},
{
"name": "text2speech",
"display_name": "Text to Speech Converter",
"repository": "https://github.com/resin-io/text2speech",
"description": "A simple application that makes your device speak out loud."
}
]

View File

@ -1,47 +0,0 @@
(function() {
var _, os;
_ = require('lodash');
os = require('os');
exports.handle = function(error, exit) {
var errorCode, message;
if (exit == null) {
exit = true;
}
if ((error == null) || !(error instanceof Error)) {
return;
}
if (process.env.DEBUG) {
console.error(error.stack);
} else {
if (error.code === 'EISDIR') {
console.error("File is a directory: " + error.path);
} else if (error.code === 'ENOENT') {
console.error("No such file or directory: " + error.path);
} else if (error.code === 'EACCES' || error.code === 'EPERM') {
message = 'You don\'t have enough privileges to run this operation.\n';
if (os.platform() === 'win32') {
message += 'Run a new Command Prompt as administrator and try running this command again.';
} else {
message += 'Try running this command again prefixing it with `sudo`.';
}
console.error(message);
} else if (error.code === 'ENOGIT') {
console.error('Git is not installed on this system.\nHead over to http://git-scm.com to install it and run this command again.');
} else if (error.message != null) {
console.error(error.message);
}
}
if (_.isNumber(error.exitCode)) {
errorCode = error.exitCode;
} else {
errorCode = 1;
}
if (exit) {
return process.exit(errorCode);
}
};
}).call(this);

View File

@ -1,63 +0,0 @@
(function() {
var _, async, npm;
npm = require('npm');
async = require('async');
_ = require('lodash-contrib');
exports.update = function(name, callback) {
return async.waterfall([
function(callback) {
var options;
options = {
loglevel: 'silent',
global: true
};
return npm.load(options, _.unary(callback));
}, function(callback) {
return npm.commands.update([name], function(error, data) {
return callback(error, data);
});
}, function(data, callback) {
var error, newVersion;
if (_.isEmpty(data)) {
error = new Error('You are already running the latest version');
return callback(error);
}
newVersion = _.last(_.first(_.last(data)).split('@'));
return callback(null, newVersion);
}
], callback);
};
exports.getLatestVersion = function(name, callback) {
return async.waterfall([
function(callback) {
var options;
options = {
loglevel: 'silent',
global: true
};
return npm.load(options, _.unary(callback));
}, function(callback) {
return npm.commands.view([name], true, function(error, data) {
var versions;
versions = _.keys(data);
return callback(error, _.first(versions));
});
}
], callback);
};
exports.isUpdated = function(name, currentVersion, callback) {
return exports.getLatestVersion(name, function(error, latestVersion) {
if (error != null) {
return callback(error);
}
return callback(null, currentVersion === latestVersion);
});
};
}).call(this);

View File

@ -1,55 +0,0 @@
(function() {
var Nplugm, _, capitano, nplugm, registerPlugin;
Nplugm = require('nplugm');
_ = require('lodash');
capitano = require('capitano');
nplugm = null;
registerPlugin = function(plugin) {
if (!_.isArray(plugin)) {
return capitano.command(plugin);
}
return _.each(plugin, capitano.command);
};
exports.register = function(prefix, callback) {
nplugm = new Nplugm(prefix);
return nplugm.list(function(error, plugins) {
var i, len, plugin;
if (error != null) {
return callback(error);
}
for (i = 0, len = plugins.length; i < len; i++) {
plugin = plugins[i];
try {
registerPlugin(nplugm.require(plugin));
} catch (_error) {
error = _error;
console.error(error.message);
}
}
return callback();
});
};
exports.list = function() {
return nplugm.list.apply(nplugm, arguments);
};
exports.install = function() {
return nplugm.install.apply(nplugm, arguments);
};
exports.update = function() {
return nplugm.update.apply(nplugm, arguments);
};
exports.remove = function() {
return nplugm.remove.apply(nplugm, arguments);
};
}).call(this);

View File

@ -1,37 +0,0 @@
(function() {
var packageJSON, updateAction, updateNotifier;
updateNotifier = require('update-notifier');
packageJSON = require('../package.json');
updateAction = require('./actions/update');
exports.perform = function(callback) {
return updateAction.update.action(null, null, callback);
};
exports.notify = function(update) {
if (!process.stdout.isTTY) {
return;
}
return console.log("> Major update available: " + update.current + " -> " + update.latest + "\n> Run resin update to update.\n> Beware that a major release might introduce breaking changes.\n");
};
exports.check = function(callback) {
var notifier;
notifier = updateNotifier({
pkg: packageJSON
});
if (notifier.update == null) {
return callback();
}
if (notifier.update.type === 'major') {
exports.notify(notifier.update);
return callback();
}
console.log("Performing " + notifier.update.type + " update, hold tight...");
return exports.perform(callback);
};
}).call(this);

View File

@ -1,127 +0,0 @@
{
"coffeescript_error": {
"level": "error"
},
"arrow_spacing": {
"name": "arrow_spacing",
"level": "error"
},
"no_tabs": {
"name": "no_tabs",
"level": "ignore"
},
"no_trailing_whitespace": {
"name": "no_trailing_whitespace",
"level": "error",
"allowed_in_comments": false,
"allowed_in_empty_lines": false
},
"max_line_length": {
"name": "max_line_length",
"value": 120,
"level": "error",
"limitComments": true
},
"line_endings": {
"name": "line_endings",
"level": "ignore",
"value": "unix"
},
"no_trailing_semicolons": {
"name": "no_trailing_semicolons",
"level": "error"
},
"indentation": {
"name": "indentation",
"value": 1,
"level": "error"
},
"camel_case_classes": {
"name": "camel_case_classes",
"level": "error"
},
"colon_assignment_spacing": {
"name": "colon_assignment_spacing",
"level": "error",
"spacing": {
"left": 0,
"right": 1
}
},
"no_implicit_braces": {
"name": "no_implicit_braces",
"level": "ignore",
"strict": false
},
"no_plusplus": {
"name": "no_plusplus",
"level": "ignore"
},
"no_throwing_strings": {
"name": "no_throwing_strings",
"level": "error"
},
"no_backticks": {
"name": "no_backticks",
"level": "error"
},
"no_implicit_parens": {
"name": "no_implicit_parens",
"strict": false,
"level": "ignore"
},
"no_empty_param_list": {
"name": "no_empty_param_list",
"level": "error"
},
"no_stand_alone_at": {
"name": "no_stand_alone_at",
"level": "ignore"
},
"space_operators": {
"name": "space_operators",
"level": "error"
},
"duplicate_key": {
"name": "duplicate_key",
"level": "error"
},
"empty_constructor_needs_parens": {
"name": "empty_constructor_needs_parens",
"level": "ignore"
},
"cyclomatic_complexity": {
"name": "cyclomatic_complexity",
"value": 10,
"level": "ignore"
},
"newlines_after_classes": {
"name": "newlines_after_classes",
"value": 3,
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"name": "no_unnecessary_fat_arrows",
"level": "error"
},
"missing_fat_arrows": {
"name": "missing_fat_arrows",
"level": "ignore"
},
"non_empty_constructor_needs_parens": {
"name": "non_empty_constructor_needs_parens",
"level": "ignore"
},
"no_unnecessary_double_quotes": {
"name": "no_unnecessary_double_quotes",
"level": "error"
},
"no_debugger": {
"name": "no_debugger",
"level": "warn"
},
"no_interpolation_in_single_quotes": {
"name": "no_interpolation_in_single_quotes",
"level": "error"
}
}

91
completion/_balena Normal file
View File

@ -0,0 +1,91 @@
#compdef balena
#autoload
#GENERATED FILE DON'T MODIFY#
_balena() {
typeset -A opt_args
local context state line curcontext="$curcontext"
# Valid top-level completions
main_commands=( api-key api-keys app block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local login logout logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version whoami )
# Sub-completions
api_key_cmds=( generate revoke )
app_cmds=( create )
block_cmds=( create )
config_cmds=( generate inject read reconfigure write )
device_cmds=( deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm shutdown start-service stop-service track-fleet )
devices_cmds=( supported )
env_cmds=( add rename rm )
fleet_cmds=( create pin purge rename restart rm track-latest )
internal_cmds=( osinit )
key_cmds=( add rm )
local_cmds=( configure flash )
os_cmds=( build-config configure download initialize versions )
release_cmds=( finalize invalidate validate )
tag_cmds=( rm set )
_arguments -C \
'(- 1 *)--version[show version and exit]' \
'(- 1 *)'{-h,--help}'[show help options and exit]' \
'1:first command:_balena_main_cmds' \
'2:second command:_balena_sec_cmds' \
&& ret=0
}
(( $+functions[_balena_main_cmds] )) ||
_balena_main_cmds() {
_describe -t main_commands 'command' main_commands "$@" && ret=0
}
(( $+functions[_balena_sec_cmds] )) ||
_balena_sec_cmds() {
case $line[1] in
"api-key")
_describe -t api_key_cmds 'api-key_cmd' api_key_cmds "$@" && ret=0
;;
"app")
_describe -t app_cmds 'app_cmd' app_cmds "$@" && ret=0
;;
"block")
_describe -t block_cmds 'block_cmd' block_cmds "$@" && ret=0
;;
"config")
_describe -t config_cmds 'config_cmd' config_cmds "$@" && ret=0
;;
"device")
_describe -t device_cmds 'device_cmd' device_cmds "$@" && ret=0
;;
"devices")
_describe -t devices_cmds 'devices_cmd' devices_cmds "$@" && ret=0
;;
"env")
_describe -t env_cmds 'env_cmd' env_cmds "$@" && ret=0
;;
"fleet")
_describe -t fleet_cmds 'fleet_cmd' fleet_cmds "$@" && ret=0
;;
"internal")
_describe -t internal_cmds 'internal_cmd' internal_cmds "$@" && ret=0
;;
"key")
_describe -t key_cmds 'key_cmd' key_cmds "$@" && ret=0
;;
"local")
_describe -t local_cmds 'local_cmd' local_cmds "$@" && ret=0
;;
"os")
_describe -t os_cmds 'os_cmd' os_cmds "$@" && ret=0
;;
"release")
_describe -t release_cmds 'release_cmd' release_cmds "$@" && ret=0
;;
"tag")
_describe -t tag_cmds 'tag_cmd' tag_cmds "$@" && ret=0
;;
esac
}
_balena "$@"

View File

@ -0,0 +1,88 @@
#!/bin/bash
#GENERATED FILE DON'T MODIFY#
_balena_complete()
{
local cur prev
# Valid top-level completions
main_commands="api-key api-keys app block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local login logout logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version whoami"
# Sub-completions
api_key_cmds="generate revoke"
app_cmds="create"
block_cmds="create"
config_cmds="generate inject read reconfigure write"
device_cmds="deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm shutdown start-service stop-service track-fleet"
devices_cmds="supported"
env_cmds="add rename rm"
fleet_cmds="create pin purge rename restart rm track-latest"
internal_cmds="osinit"
key_cmds="add rm"
local_cmds="configure flash"
os_cmds="build-config configure download initialize versions"
release_cmds="finalize invalidate validate"
tag_cmds="rm set"
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 1 ]
then
COMPREPLY=( $(compgen -W "${main_commands}" -- $cur) )
elif [ $COMP_CWORD -eq 2 ]
then
case "$prev" in
api-key)
COMPREPLY=( $(compgen -W "$api_key_cmds" -- $cur) )
;;
app)
COMPREPLY=( $(compgen -W "$app_cmds" -- $cur) )
;;
block)
COMPREPLY=( $(compgen -W "$block_cmds" -- $cur) )
;;
config)
COMPREPLY=( $(compgen -W "$config_cmds" -- $cur) )
;;
device)
COMPREPLY=( $(compgen -W "$device_cmds" -- $cur) )
;;
devices)
COMPREPLY=( $(compgen -W "$devices_cmds" -- $cur) )
;;
env)
COMPREPLY=( $(compgen -W "$env_cmds" -- $cur) )
;;
fleet)
COMPREPLY=( $(compgen -W "$fleet_cmds" -- $cur) )
;;
internal)
COMPREPLY=( $(compgen -W "$internal_cmds" -- $cur) )
;;
key)
COMPREPLY=( $(compgen -W "$key_cmds" -- $cur) )
;;
local)
COMPREPLY=( $(compgen -W "$local_cmds" -- $cur) )
;;
os)
COMPREPLY=( $(compgen -W "$os_cmds" -- $cur) )
;;
release)
COMPREPLY=( $(compgen -W "$release_cmds" -- $cur) )
;;
tag)
COMPREPLY=( $(compgen -W "$tag_cmds" -- $cur) )
;;
"*")
;;
esac
fi
}
complete -F _balena_complete balena

View File

@ -0,0 +1,175 @@
/**
* @license
* Copyright 2021 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('path');
const rootDir = path.join(__dirname, '..');
const fs = require('fs');
const manifestFile = 'oclif.manifest.json';
commandsFilePath = path.join(rootDir, manifestFile);
if (fs.existsSync(commandsFilePath)) {
console.log('Generating shell auto completion files...');
} else {
console.error(`generate-completion.js: Could not find "${manifestFile}"`);
process.exitCode = 1;
return;
}
const commandsJson = JSON.parse(fs.readFileSync(commandsFilePath, 'utf8'));
const mainCommands = [];
const additionalCommands = [];
for (const key of Object.keys(commandsJson.commands)) {
const cmd = key.split(':');
if (cmd.length > 1) {
additionalCommands.push(cmd);
if (!mainCommands.includes(cmd[0])) {
mainCommands.push(cmd[0]);
}
} else {
mainCommands.push(cmd[0]);
}
}
const mainCommandsStr = mainCommands.join(' ');
// GENERATE BASH COMPLETION FILE
bashFilePathIn = path.join(__dirname, '/templates/bash.template');
bashFilePathOut = path.join(__dirname, 'balena-completion.bash');
try {
fs.unlinkSync(bashFilePathOut);
} catch (error) {
process.exitCode = 1;
return console.error(error);
}
fs.readFile(bashFilePathIn, 'utf8', function (err, data) {
if (err) {
process.exitCode = 1;
return console.error(err);
}
data = data.replace(
'#TEMPLATE FILE FOR BASH COMPLETION#',
"#GENERATED FILE DON'T MODIFY#",
);
data = data.replace(
/\$main_commands\$/g,
'main_commands="' + mainCommandsStr + '"',
);
let subCommands = [];
let prevElement = additionalCommands[0][0];
additionalCommands.forEach(function (element) {
if (element[0] === prevElement) {
subCommands.push(element[1]);
} else {
const prevElement2 = prevElement.replace(/-/g, '_') + '_cmds';
data = data.replace(
/\$sub_cmds\$/g,
' ' + prevElement2 + '="' + subCommands.join(' ') + '"\n$sub_cmds$',
);
data = data.replace(
/\$sub_cmds_prev\$/g,
' ' +
prevElement +
')\n COMPREPLY=( $(compgen -W "$' +
prevElement2 +
'" -- $cur) )\n ;;\n$sub_cmds_prev$',
);
prevElement = element[0];
subCommands = [];
subCommands.push(element[1]);
}
});
// cleanup placeholders
data = data.replace(/\$sub_cmds\$/g, '');
data = data.replace(/\$sub_cmds_prev\$/g, '');
fs.writeFile(bashFilePathOut, data, 'utf8', function (error) {
if (error) {
process.exitCode = 1;
return console.error(error);
}
});
});
// GENERATE ZSH COMPLETION FILE
zshFilePathIn = path.join(__dirname, '/templates/zsh.template');
zshFilePathOut = path.join(__dirname, '_balena');
try {
fs.unlinkSync(zshFilePathOut);
} catch (error) {
process.exitCode = 1;
return console.error(error);
}
fs.readFile(zshFilePathIn, 'utf8', function (err, data) {
if (err) {
process.exitCode = 1;
return console.error(err);
}
data = data.replace(
'#TEMPLATE FILE FOR ZSH COMPLETION#',
"#GENERATED FILE DON'T MODIFY#",
);
data = data.replace(
/\$main_commands\$/g,
'main_commands=( ' + mainCommandsStr + ' )',
);
let subCommands = [];
let prevElement = additionalCommands[0][0];
additionalCommands.forEach(function (element) {
if (element[0] === prevElement) {
subCommands.push(element[1]);
} else {
const prevElement2 = prevElement.replace(/-/g, '_') + '_cmds';
data = data.replace(
/\$sub_cmds\$/g,
' ' + prevElement2 + '=( ' + subCommands.join(' ') + ' )\n$sub_cmds$',
);
data = data.replace(
/\$sub_cmds_prev\$/g,
' "' +
prevElement +
'")\n _describe -t ' +
prevElement2 +
" '" +
prevElement +
"_cmd' " +
prevElement2 +
' "$@" && ret=0\n ;;\n$sub_cmds_prev$',
);
prevElement = element[0];
subCommands = [];
subCommands.push(element[1]);
}
});
// cleanup placeholders
data = data.replace(/\$sub_cmds\$/g, '');
data = data.replace(/\$sub_cmds_prev\$/g, '');
fs.writeFile(zshFilePathOut, data, 'utf8', function (error) {
if (error) {
process.exitCode = 1;
return console.error(error);
}
});
});

View File

@ -1,49 +0,0 @@
_resin() {
COMPREPLY=()
local current="${COMP_WORDS[COMP_CWORD]}"
local previous="${COMP_WORDS[COMP_CWORD-1]}"
local options="version help login logout signup drive whoami app apps init devices device note preferences keys key envs env logs os examples example"
case "${previous}" in
app)
local subcommands="create rm restart"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
drive)
local subcommands="list"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
devices)
local subcommands="supported"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
device)
local subcommands="rename rm identify init"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
key)
local subcommands="add rm"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
env)
local subcommands="add rename rm"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
os)
local subcommands="download install"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
example)
local subcommands="clone"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
return 0 ;;
*)
;;
esac
COMPREPLY=( $(compgen -W "${options}" -- ${current}) )
return 0
}
complete -F _resin resin

View File

@ -0,0 +1,32 @@
#!/bin/bash
#TEMPLATE FILE FOR BASH COMPLETION#
_balena_complete()
{
local cur prev
# Valid top-level completions
$main_commands$
# Sub-completions
$sub_cmds$
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 1 ]
then
COMPREPLY=( $(compgen -W "${main_commands}" -- $cur) )
elif [ $COMP_CWORD -eq 2 ]
then
case "$prev" in
$sub_cmds_prev$
"*")
;;
esac
fi
}
complete -F _balena_complete balena

View File

@ -0,0 +1,35 @@
#compdef balena
#autoload
#TEMPLATE FILE FOR ZSH COMPLETION#
_balena() {
typeset -A opt_args
local context state line curcontext="$curcontext"
# Valid top-level completions
$main_commands$
# Sub-completions
$sub_cmds$
_arguments -C \
'(- 1 *)--version[show version and exit]' \
'(- 1 *)'{-h,--help}'[show help options and exit]' \
'1:first command:_balena_main_cmds' \
'2:second command:_balena_sec_cmds' \
&& ret=0
}
(( $+functions[_balena_main_cmds] )) ||
_balena_main_cmds() {
_describe -t main_commands 'command' main_commands "$@" && ret=0
}
(( $+functions[_balena_sec_cmds] )) ||
_balena_sec_cmds() {
case $line[1] in
$sub_cmds_prev$
esac
}
_balena "$@"

View File

@ -1,10 +0,0 @@
# app associate <id>
Use this command to associate a project directory with a resin application.
This command adds a 'resin' git remote to the directory and runs git init if necessary.
Examples:
$ resin app associate 91
$ resin app associate 91 --project my/app/directory

View File

@ -1,21 +0,0 @@
# app create <name>
Use this command to create a new resin.io application.
You can specify the application type with the `--type` option.
Otherwise, an interactive dropdown will be shown for you to select from.
You can see a list of supported device types with
$ resin devices supported
Examples:
$ resin app create MyApp
$ resin app create MyApp --type raspberry-pi
## Options
### --type, -t <type>
application type

View File

@ -1,7 +0,0 @@
# app <id>
Use this command to show detailed information for a single application.
Examples:
$ resin app 91

View File

@ -1,13 +0,0 @@
# init
Use this command to initialise a directory as a resin application.
This command performs the following steps:
- Create a resin.io application.
- Initialize the current directory as a git repository.
- Add the corresponding git remote to the application.
Examples:
$ resin init
$ resin init --project my/app/directory

View File

@ -1,10 +0,0 @@
# apps
Use this command to list all your applications.
Notice this command only shows the most important bits of information for each app.
If you want detailed information, use resin app <id> instead.
Examples:
$ resin apps

View File

@ -1,17 +0,0 @@
# app rm <id>
Use this command to remove a resin.io application.
Notice this command asks for confirmation interactively.
You can avoid this by passing the `--yes` boolean option.
Examples:
$ resin app rm 91
$ resin app rm 91 --yes
## Options
### --yes, -y
confirm non interactively

View File

@ -1,7 +0,0 @@
# app restart <id>
Use this command to restart all devices that belongs to a certain application.
Examples:
$ resin app restart 91

View File

@ -1,22 +0,0 @@
# login
Use this command to login to your resin.io account.
You need to login before you can use most of the commands this tool provides.
You can pass your credentials as `--username` and `--password` options, or you can omit the
credentials, in which case the tool will present you with an interactive login form.
Examples:
$ resin login --username <username> --password <password>
$ resin login
## Options
### --username, -u <username>
user name
### --password, -p <password>
user password

View File

@ -1,7 +0,0 @@
# logout
Use this command to logout from your resin.io account.o
Examples:
$ resin logout

View File

@ -1,31 +0,0 @@
# signup
Use this command to signup for a resin.io account.
If signup is successful, you'll be logged in to your new user automatically.
Examples:
$ resin signup
Email: me@mycompany.com
Username: johndoe
Password: ***********
$ resin signup --email me@mycompany.com --username johndoe --password ***********
$ resin whoami
johndoe
## Options
### --email, -e <email>
user email
### --username, -u <username>
user name
### --password, -p <user password>
user password

View File

@ -1,7 +0,0 @@
# whoami
Use this command to find out the current logged in username.
Examples:
$ resin whoami

View File

@ -1,9 +0,0 @@
# device identify <uuid>
Use this command to identify a device.
In the Raspberry Pi, the ACT led is blinked several times.
Examples:
$ resin device identify 23c73a12e3527df55c60b9ce647640c1b7da1b32d71e6a39849ac0f00db828

View File

@ -1,7 +0,0 @@
# device <id>
Use this command to show information about a single device.
Examples:
$ resin device 317

View File

@ -1,49 +0,0 @@
# device init [device]
Use this command to download the OS image of a certain application and write it to an SD Card.
Note that this command requires admin privileges.
If `device` is omitted, you will be prompted to select a device interactively.
Notice this command asks for confirmation interactively.
You can avoid this by passing the `--yes` boolean option.
You can quiet the progress bar by passing the `--quiet` boolean option.
You may have to unmount the device before attempting this operation.
You need to configure the network type and other settings:
Ethernet:
You can setup the device OS to use ethernet by setting the `--network` option to "ethernet".
Wifi:
You can setup the device OS to use wifi by setting the `--network` option to "wifi".
If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well.
You can omit network related options to be asked about them interactively.
Examples:
$ resin device init --application 91
$ resin device init --application 91 --network ethernet
$ resin device init /dev/disk2 --application 91 --network wifi --ssid MyNetwork --key secret
## Options
### --application, --a,app, --a,app <application>
application id
### --network, -n <network>
network type
### --ssid, -s <ssid>
wifi ssid, if network is wifi
### --key, -k <key>
wifi key, if network is wifi

View File

@ -1,13 +0,0 @@
# devices
Use this command to list all devices that belong to a certain application.
Examples:
$ resin devices --application 91
## Options
### --application, --a,app, --a,app <application>
application id

View File

@ -1,17 +0,0 @@
# device rm <id>
Use this command to remove a device from resin.io.
Notice this command asks for confirmation interactively.
You can avoid this by passing the `--yes` boolean option.
Examples:
$ resin device rm 317
$ resin device rm 317 --yes
## Options
### --yes, -y
confirm non interactively

View File

@ -1,10 +0,0 @@
# device rename <id> [name]
Use this command to rename a device.
If you omit the name, you'll get asked for it interactively.
Examples:
$ resin device rename 317 MyPi
$ resin device rename 317

View File

@ -1,7 +0,0 @@
# devices supported
Use this command to get the list of all supported devices
Examples:
$ resin devices supported

View File

@ -1,7 +0,0 @@
# drives
Use this command to list all drives that are connected to your machine.
Examples:
$ resin drives

View File

@ -1,22 +0,0 @@
# env add <key> [value]
Use this command to add an enviroment variable to an application.
You need to pass the `--application` option.
If value is omitted, the tool will attempt to use the variable's value
as defined in your host machine.
If the value is grabbed from the environment, a warning message will be printed.
Use `--quiet` to remove it.
Examples:
$ resin env add EDITOR vim -a 91
$ resin env add TERM -a 91
## Options
### --application, --a,app, --a,app <application>
application id

View File

@ -1,23 +0,0 @@
# envs
Use this command to list all environment variables for a particular application.
Notice we will support per-device environment variables soon.
This command lists all custom environment variables set on the devices running
the application. If you want to see all environment variables, including private
ones used by resin, use the verbose option.
Example:
$ resin envs --application 91
$ resin envs --application 91 --verbose
## Options
### --application, --a,app, --a,app <application>
application id
### --verbose, -v
show private environment variables

View File

@ -1,19 +0,0 @@
# env rm <id>
Use this command to remove an environment variable from an application.
Don't remove resin specific variables, as things might not work as expected.
Notice this command asks for confirmation interactively.
You can avoid this by passing the `--yes` boolean option.
Examples:
$ resin env rm 215
$ resin env rm 215 --yes
## Options
### --yes, -y
confirm non interactively

View File

@ -1,7 +0,0 @@
# env rename <id> <value>
Use this command to rename an enviroment variable from an application.
Examples:
$ resin env rename 376 emacs

View File

@ -1,10 +0,0 @@
# example clone <id>
Use this command to clone an example application to the current directory
This command outputs information about the cloning process.
Use `--quiet` to remove that output.
Example:
$ resin example clone 3

View File

@ -1,7 +0,0 @@
# example <id>
Use this command to show information of a single example application
Example:
$ resin example 3

View File

@ -1,7 +0,0 @@
# examples
Use this command to list available example applications from resin.io
Example:
$ resin examples

Some files were not shown because too many files have changed in this diff Show More