mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-24 18:45:07 +00:00
Compare commits
86 Commits
node-v16
...
add-device
Author | SHA1 | Date | |
---|---|---|---|
6f5920cb63 | |||
8244636bf2 | |||
6a01fb361c | |||
ca637b3fb6 | |||
006293bd01 | |||
338b5d79d3 | |||
60dd0daae5 | |||
662b8283a6 | |||
cfc866cf41 | |||
e566badfff | |||
69834c417e | |||
8aa9c62afd | |||
4f29e37fe7 | |||
99e8a36bb5 | |||
669cbe227f | |||
e9156d77f1 | |||
767216c842 | |||
d3018f9061 | |||
37c6ad855b | |||
ca97678358 | |||
3bb0036ba8 | |||
ac9e2a9e7e | |||
52e95e6d0a | |||
c5d2aa7eec | |||
683220e303 | |||
44f09b32fa | |||
d1a0660a3d | |||
ee1987f188 | |||
39e9997d9e | |||
97b8c75043 | |||
7cb8349f29 | |||
6063f4c776 | |||
4899d545f1 | |||
115bf6433d | |||
e5ce1ade89 | |||
9c4174ea8a | |||
cf16957195 | |||
4de369ff95 | |||
ac3ebff8ee | |||
76b01d92d3 | |||
19144163ee | |||
535ffccbad | |||
6f5ada9692 | |||
1c7d9255ae | |||
807e6ea2ad | |||
c76f019fd0 | |||
3c2c925eed | |||
14b54be15e | |||
7fb82f7447 | |||
4a5d44a0f1 | |||
1cba0284df | |||
6e4fe229bf | |||
7033075900 | |||
ded268ff3c | |||
a366f0b7eb | |||
507c8a1bfd | |||
1fb46bfa5d | |||
2e115968d5 | |||
83020797b0 | |||
0c4647e980 | |||
a20d2a04a8 | |||
57b0dccc7d | |||
d1e3bdf29a | |||
bdf7fedd7a | |||
c163662f4a | |||
a2823fd3ec | |||
d717352b84 | |||
e46902e683 | |||
e96ef6697e | |||
6f54197b7b | |||
34b4ac2d9f | |||
f99244603a | |||
523c0af0fb | |||
2206b475c6 | |||
a117dc0382 | |||
cf3e8ff909 | |||
36d1af1e33 | |||
18f83092fe | |||
ee3c796787 | |||
934c3ddf38 | |||
66e6daf78c | |||
97eb107de4 | |||
def205f1fb | |||
5c8f78678b | |||
769f1ca5b4 | |||
cb26a736fc |
131
.github/actions/publish/action.yml
vendored
Normal file
131
.github/actions/publish/action.yml
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
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
|
||||
|
||||
# --- custom environment
|
||||
XCODE_APP_LOADER_EMAIL:
|
||||
type: string
|
||||
default: "accounts+apple@balena.io"
|
||||
NODE_VERSION:
|
||||
type: string
|
||||
# FIXME: (please) https://github.com/balena-io/balena-cli/issues/2165
|
||||
default: "12.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 }}
|
||||
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 }}
|
||||
|
||||
- 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
|
57
.github/actions/test/action.yml
vendored
Normal file
57
.github/actions/test/action.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
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
|
||||
|
||||
# --- custom environment
|
||||
NODE_VERSION:
|
||||
type: string
|
||||
# FIXME: (please) https://github.com/balena-io/balena-cli/issues/2165
|
||||
default: "12.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: Test release
|
||||
shell: bash
|
||||
run: |
|
||||
set -ea
|
||||
|
||||
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
|
||||
|
||||
if [[ -e package-lock.json ]]; then
|
||||
npm ci
|
||||
else
|
||||
npm i
|
||||
fi
|
||||
|
||||
npm run build
|
||||
npm run test
|
||||
|
||||
- name: Compress custom source
|
||||
shell: pwsh
|
||||
run: tar -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 }}
|
||||
path: ${{ runner.temp }}/custom.tgz
|
||||
retention-days: 1
|
16
.github/workflows/flowzone.yml
vendored
Normal file
16
.github/workflows/flowzone.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Flowzone
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, closed]
|
||||
branches:
|
||||
- "main"
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
flowzone:
|
||||
name: Flowzone
|
||||
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
|
||||
secrets: inherit
|
||||
with:
|
||||
tests_run_on: '["ubuntu-20.04","macos-11","windows-2019"]'
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,7 +10,6 @@
|
||||
*.seed
|
||||
/.idea/
|
||||
/.lock-wscript
|
||||
/.nvmrc
|
||||
/.nyc_output/
|
||||
/.vscode/
|
||||
/coverage/
|
||||
|
20
.resinci.yml
20
.resinci.yml
@ -1,20 +0,0 @@
|
||||
---
|
||||
npm:
|
||||
platforms:
|
||||
- name: linux
|
||||
os: ubuntu
|
||||
architecture: x86_64
|
||||
node_versions:
|
||||
- "12"
|
||||
- "14"
|
||||
##
|
||||
## Temporarily skip Alpine tests until the following issues are resolved:
|
||||
## * https://github.com/concourse/concourse/issues/7905
|
||||
## * https://github.com/product-os/balena-concourse/issues/631
|
||||
##
|
||||
# - name: linux
|
||||
# os: alpine
|
||||
# architecture: x86_64
|
||||
# node_versions:
|
||||
# - "12"
|
||||
# - "14"
|
@ -1,3 +1,774 @@
|
||||
- commits:
|
||||
- subject: "patch: update balena-preload to 12.2.0"
|
||||
hash: ca637b3fb669cd8997ceb70201d4cabe0c621ecf
|
||||
body: ""
|
||||
footer: {}
|
||||
author: Edwin Joassart
|
||||
nested: []
|
||||
version: 14.5.15
|
||||
title: ""
|
||||
date: 2022-12-12T13:41:11.847Z
|
||||
- commits:
|
||||
- subject: Bump multicast-dns to rebased commit (again)
|
||||
hash: 60dd0daae5682c797ad5ac6fec94ccb7b91c5264
|
||||
body: >
|
||||
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
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: pipex
|
||||
nested: []
|
||||
version: 14.5.14
|
||||
title: ""
|
||||
date: 2022-12-11T21:46:37.025Z
|
||||
- commits:
|
||||
- subject: Build on macos-11 for library compatibility reasons
|
||||
hash: e566badfffbe54a44f8fdd627fc8a78a5ecc204f
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Page-
|
||||
nested: []
|
||||
- subject: Build on ubuntu-20.04 for library compatibility reasons
|
||||
hash: 69834c417e2aa2d2c20a9749319fc72bb6e563fa
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Page-
|
||||
nested: []
|
||||
version: 14.5.13
|
||||
title: ""
|
||||
date: 2022-12-08T14:00:25.894Z
|
||||
- commits:
|
||||
- subject: Move GH publishing to FZ core
|
||||
hash: 99e8a36bb581ac84619ecba452c5afa3d56dae94
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.12
|
||||
title: ""
|
||||
date: 2022-11-21T18:46:45.663Z
|
||||
- commits:
|
||||
- subject: Adding .nvmrc so we can use nvm use instead of hunting for version
|
||||
hash: 767216c842569a523540b7d4d32133c4e53c7596
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: zoobot
|
||||
nested: []
|
||||
version: 14.5.11
|
||||
title: ""
|
||||
date: 2022-11-17T18:32:46.270Z
|
||||
- commits:
|
||||
- subject: Fix surfacing incompatible device type errors as not recognized
|
||||
hash: ca9767835852da53758f8e9713db85357f22ba8b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.5.10
|
||||
title: ""
|
||||
date: 2022-11-11T11:24:19.344Z
|
||||
- commits:
|
||||
- subject: Prevent git from existing with 141
|
||||
hash: 52e95e6d0a96cfb07c111b927f3f8b0607063b99
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.9
|
||||
title: ""
|
||||
date: 2022-11-11T00:49:23.691Z
|
||||
- commits:
|
||||
- subject: Replace missing input
|
||||
hash: 44f09b32fac79c387681f6988e6c621fb0e1ad15
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.8
|
||||
title: ""
|
||||
date: 2022-11-10T23:32:18.629Z
|
||||
- commits:
|
||||
- subject: Just ignore errors during publish
|
||||
hash: 39e9997d9e0a8622d0fc255afe508131a33a9123
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.7
|
||||
title: ""
|
||||
date: 2022-11-10T22:19:20.861Z
|
||||
- commits:
|
||||
- subject: Ignore PIPE signal
|
||||
hash: 6063f4c7762140731a42dd1e5515ce3326b4cb91
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.6
|
||||
title: ""
|
||||
date: 2022-11-10T21:07:32.419Z
|
||||
- commits:
|
||||
- subject: Don't pipefail
|
||||
hash: e5ce1ade892ddddd8a34209b83dcafaeb53a0051
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.5
|
||||
title: ""
|
||||
date: 2022-11-10T20:07:10.573Z
|
||||
- commits:
|
||||
- subject: Error when the device type and image parameters do not match
|
||||
hash: 4de369ff956a4da2a34ddb8f54cf3fcef10a9ec2
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#2537"
|
||||
resolves: "#2537"
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.5.4
|
||||
title: ""
|
||||
date: 2022-11-10T18:31:18.648Z
|
||||
- commits:
|
||||
- subject: Switch to Flowzone
|
||||
hash: 19144163eeed93a6b68b91715d87e043879a8d51
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: ab77
|
||||
nested: []
|
||||
version: 14.5.3
|
||||
title: ""
|
||||
date: 2022-11-10T17:20:17.608Z
|
||||
- commits:
|
||||
- subject: Stop waiting for the analytics response
|
||||
hash: 1c7d9255ae5333ff717b9f32ef7adf1690cbb163
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
See: https://balena.zulipchat.com/#narrow/stream/345884-aspect.2Fanalytics/topic/Balena.20CLI.20analytics-performance
|
||||
see: https://balena.zulipchat.com/#narrow/stream/345884-aspect.2Fanalytics/topic/Balena.20CLI.20analytics-performance
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.5.2
|
||||
title: "'Stop waiting for the analytics response'"
|
||||
date: 2022-10-21T16:18:42.222Z
|
||||
- commits:
|
||||
- subject: Bump parse-link-header from 1.0.1 to 2.0.0
|
||||
hash: 3c2c925eed81ed61e1326437038cda1059b1a0ba
|
||||
body: >
|
||||
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
|
||||
...
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: dependabot[bot] <support@github.com>
|
||||
signed-off-by: dependabot[bot] <support@github.com>
|
||||
author: dependabot[bot]
|
||||
nested: []
|
||||
version: 14.5.1
|
||||
title: "'Bump parse-link-header from 1.0.1 to 2.0.0'"
|
||||
date: 2022-10-20T17:14:00.057Z
|
||||
- commits:
|
||||
- subject: keeps events loggiging with default message
|
||||
hash: d1e3bdf29a4cbe976f6d2feff0eb0f8553b3865a
|
||||
body: ""
|
||||
footer:
|
||||
change-type: minor
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
- subject: uses amplitude data events format
|
||||
hash: bdf7fedd7aa596834243590cf914f8f366088867
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
- subject: changes analytics endpoint to analytics-backend
|
||||
hash: c163662f4a63e1a3b0621ef28c8720f6f4a1edcd
|
||||
body: ""
|
||||
footer:
|
||||
change-type: minor
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
version: 14.5.0
|
||||
title: "'changes analytics endpoint to analytics-backend'"
|
||||
date: 2022-10-18T11:18:18.257Z
|
||||
- commits:
|
||||
- subject: Update simple-git to 3.14.1
|
||||
hash: 70330759007bfdba81986e6c7db1f5c2cb0d7d5f
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.4.4
|
||||
title: "'Update simple git'"
|
||||
date: 2022-10-18T10:00:35.080Z
|
||||
- commits:
|
||||
- subject: "config generate: Fix the incompatible arch errors showing as not found"
|
||||
hash: 2e115968d5dce98fe05ab0607e1c04bd9f4c67c8
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.4.3
|
||||
title: "'config generate: Fix the incompatible arch errors showing as not found'"
|
||||
date: 2022-10-17T20:46:59.653Z
|
||||
- commits:
|
||||
- subject: Stop relying on device-type.json for resolving the device type aliases
|
||||
hash: a20d2a04a86797d77819c63e556d8ec7d4c128ca
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#2541"
|
||||
resolves: "#2541"
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Stop relying on device-type.json for resolving the cpu architecture
|
||||
hash: 57b0dccc7d12197dc78c2b8fd4f3cdb6329ec510
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#2542"
|
||||
resolves: "#2542"
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.4.2
|
||||
title: "'Stop relying on device-type.json for resolving the cpu architecture'"
|
||||
date: 2022-10-17T16:15:07.388Z
|
||||
- commits:
|
||||
- subject: "balena os initialize: Clarify that the process includes flashing"
|
||||
hash: e46902e6839eeb2f59f445aeef94500bd34b8c14
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Heath Raftery
|
||||
nested: []
|
||||
version: 14.4.1
|
||||
title: "'Add to description that command is device specific'"
|
||||
date: 2022-10-12T13:55:50.416Z
|
||||
- commits:
|
||||
- subject: "device register: Add support for the `--deviceType` option"
|
||||
hash: 34b4ac2d9f4a759a1e9c1f313bd2e6691f8f8c12
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#2531"
|
||||
resolves: "#2531"
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update balena-sdk to 16.28.0
|
||||
hash: f99244603a22abb27e37d8df7a2d6ebf3711ab9f
|
||||
body: |
|
||||
Update balena-sdk from 16.22.0 to 16.28.0
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: "device.register: Allow providing a device type for the registered
|
||||
device"
|
||||
hash: 93c69c7dd734618220dddedf1acbbd764b337ff7
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#1270"
|
||||
resolves: "#1270"
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.28.0
|
||||
title: ""
|
||||
date: 2022-10-12T06:43:28.586Z
|
||||
- commits:
|
||||
- subject: Add support for batch operations for more device modifying methods
|
||||
hash: 4c506a79bab2e3ec7203db0d1a672f1c5056b729
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.27.0
|
||||
title: ""
|
||||
date: 2022-10-07T18:42:53.725Z
|
||||
- commits:
|
||||
- subject: Fix request batching chunking when there is no grouping navigation prop
|
||||
hash: 41df48a6304f12979e4f1df77227eec41362904c
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "request-batching: Increase the batch size to 200 items"
|
||||
hash: 1f72425be70cffa9a236a491e273ddcb0ffc090e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.26.7
|
||||
title: ""
|
||||
date: 2022-10-07T15:44:16.819Z
|
||||
- commits:
|
||||
- subject: Fix request batching not chunking the items of the operation
|
||||
hash: a496304b655a83bd4ccdc1a90de1ad9132f478c0
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
See: "#1257"
|
||||
see: "#1257"
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.26.6
|
||||
title: ""
|
||||
date: 2022-10-06T23:54:12.408Z
|
||||
- commits:
|
||||
- subject: Delete redundant .resinci.yml
|
||||
hash: 0157a7b278b3b18316eef83cc65f0c6aeaafed9a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Pagan Gazzard
|
||||
nested: []
|
||||
version: balena-sdk-16.26.5
|
||||
title: ""
|
||||
date: 2022-09-26T12:55:45.316Z
|
||||
- commits:
|
||||
- subject: Remove moment in favor of date-fns
|
||||
hash: eeb54985a14acd5b8500edf90bd0a0cd60237008
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
version: balena-sdk-16.26.4
|
||||
title: ""
|
||||
date: 2022-09-23T17:04:35.961Z
|
||||
- commits:
|
||||
- subject: Skip running tests in flowzone till we can inject env vars
|
||||
hash: d1cbd35bbab56ca806abb2e12b2959106d98d54d
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Switch from balenaCI to flowzone
|
||||
hash: 93c029e00dccef2401cfa8db36cc6b77cd14bf6b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Pagan Gazzard
|
||||
nested: []
|
||||
version: balena-sdk-16.26.3
|
||||
title: ""
|
||||
date: 2022-09-21T12:49:23.400Z
|
||||
- commits:
|
||||
- subject: Update balena-register-device to 8.0.0
|
||||
hash: 1eb28196a8e773a1ba3f1bfbeb455c8abac0b432
|
||||
body: |
|
||||
Update balena-register-device from 7.1.0 to 8.0.0
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Remove the travis & appveyor configurations
|
||||
hash: 32c19504ca79ec134b34e30a4e6a52157a7b0bd6
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
- subject: "tsconfig: Enable strict type checking"
|
||||
hash: 77b5211af6f87c364302342f24f9f95bc6c8ba35
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
- subject: Update devDependencies
|
||||
hash: 32a482be80c978b3c8f83a2335a17c70a224cb52
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
- subject: Update the uuid package to v9
|
||||
hash: 4567f824d6f45c825594fda3ec7c4b8e5f3ea561
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
- subject: Prevent creating a package-lock.json
|
||||
hash: 3c0e432980a30a1fb0678acd8d0459bd53d69565
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
- subject: Drop support for node 10 in favor of 14 & 16
|
||||
hash: ea7c5670950918363380cff9576a082abad6dbb9
|
||||
body: |
|
||||
That's required in order to update uuid to v9.
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
version: balena-register-device-8.0.0
|
||||
title: "'Drop node 10 in favor of 14 & 16 & update the uuid package to v9'"
|
||||
date: 2022-09-06T12:49:29.202Z
|
||||
- commits:
|
||||
- subject: Support `supervisorVersion`/`osVersion`/`osVariant`/`macAddress` fields
|
||||
hash: 6f10fe77ba11ec57bb012777975423dda498a8bd
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Pagan Gazzard
|
||||
version: balena-register-device-7.2.0
|
||||
date: 2021-04-29T12:35:30.543Z
|
||||
- commits:
|
||||
- subject: Update dependencies
|
||||
hash: 8d78459d6cf6e0dcaa4721c38898eeb2d25c5674
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Pagan Gazzard
|
||||
version: balena-register-device-7.1.1
|
||||
date: 2021-04-29T12:23:50.655Z
|
||||
version: balena-sdk-16.26.2
|
||||
title: "'Update balena-register-device to 8.0.0'"
|
||||
date: 2022-09-06T14:13:05.260Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to v4.8
|
||||
hash: b1e463143d532718b525481c0098431c20353300
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.26.1
|
||||
title: "'Update TypeScript to v4.8'"
|
||||
date: 2022-08-29T07:13:05.100Z
|
||||
- commits:
|
||||
- subject: Pin TypeScript to 4.7 until upstream dependencies are updated
|
||||
hash: 979b2a6c29734da792fc2d4fbd1644637c34c66c
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "types: Add the InvitationTokenDecodedPayload type"
|
||||
hash: c0877db26efbde5907d6b322e58c21570c6adc35
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.26.0
|
||||
title: "'types: Add the InvitationTokenDecodedPayload type'"
|
||||
date: 2022-08-26T08:34:23.591Z
|
||||
- commits:
|
||||
- subject: Deprecate the public_key from the user JWT
|
||||
hash: 51f0d62d9e71aaa99565b3ffd03637f201422b08
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.25.1
|
||||
title: "'Deprecate the public_key from the user JWT'"
|
||||
date: 2022-08-05T11:58:08.709Z
|
||||
- commits:
|
||||
- subject: "application.remove: Support batch deletions by providing multiple IDs"
|
||||
hash: 8238a338e95f773e4ff439dcb93b275ff0250d64
|
||||
body: ""
|
||||
footer:
|
||||
Resolves: "#1255"
|
||||
resolves: "#1255"
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Refactor the request batching implementation to be generic
|
||||
hash: c3eeda42c2924d1d84beeca7077fd3aa7c6a8d1b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Change pine options merging to extend the default `$select`ed
|
||||
properties
|
||||
hash: 47dd4bd69f49589717e635f5dc8903b056f449be
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.25.0
|
||||
title: "'application.remove: Support batch deletions by providing multiple IDs'"
|
||||
date: 2022-08-04T14:10:56.891Z
|
||||
- commits:
|
||||
- subject: Refactor the internal mergePineOptions utility
|
||||
hash: 5a0fb3952dfd79aa73be3c4dec5cf75ca7c7810a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.24.2
|
||||
title: "'Refactor the internal mergePineOptions utility'"
|
||||
date: 2022-08-02T16:55:58.822Z
|
||||
- commits:
|
||||
- subject: Update Husky to v7
|
||||
hash: 9aab4c042d26b23838bf6faeb7b5ebae9b382e04
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
See: https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v8
|
||||
see: https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v8
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.24.1
|
||||
title: "'Update Husky to v7'"
|
||||
date: 2022-07-21T14:04:26.953Z
|
||||
- commits:
|
||||
- subject: "types: Add missing Application to Service relation"
|
||||
hash: a38ced5f200903d96ab3e6e13c3efb3f3761414e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-16.24.0
|
||||
title: "'types: Add missing Application to Service relation'"
|
||||
date: 2022-07-08T17:43:16.397Z
|
||||
- commits:
|
||||
- subject: Add expiry-date for generation of user and device keys
|
||||
hash: 9ed3643ed9e2180ee9b4aef3c32a1d5a745d554a
|
||||
body: ""
|
||||
footer:
|
||||
Change-Type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
|
||||
signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
|
||||
author: Nitish Agarwal
|
||||
nested: []
|
||||
version: balena-sdk-16.23.0
|
||||
title: "'Add expiryDate for generation of user and device keys'"
|
||||
date: 2022-07-07T12:22:14.983Z
|
||||
version: 14.4.0
|
||||
title: "'device register: Add support for the option'"
|
||||
date: 2022-10-12T12:30:20.793Z
|
||||
- commits:
|
||||
- subject: Add unified OS versions in the examples of the device & os commands
|
||||
hash: a117dc0382c7644b23b00940229e0794d7249b59
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
signed-off-by: Thodoris Greasidis <thodoris@balena.io>
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 14.3.1
|
||||
title: "'Add unified OS versions in the examples of the device & os commands'"
|
||||
date: 2022-09-06T10:29:09.912Z
|
||||
- commits:
|
||||
- subject: "release: Add `validate` command for validating releases"
|
||||
hash: 934c3ddf3886f0456be7c17bc3e131a2a06c60b1
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
- subject: "release: Add `invalidate` command for invalidating releases"
|
||||
hash: 66e6daf78c5e85a9af518aeec553640fbc1830f7
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
version: 14.3.0
|
||||
title: "'release: Add and commands for invalidating and validating releases
|
||||
(respectively)'"
|
||||
date: 2022-08-17T11:37:12.623Z
|
||||
- commits:
|
||||
- subject: "fleet: Add `track-latest` command for tracking the latest release"
|
||||
hash: 97eb107de46056ec30bd39827bdea65dd1ba8d02
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
- subject: "fleet: Add `pin` command for pinning fleets to a specific release"
|
||||
hash: def205f1fbd214e9bff091822adc30a8e9f50033
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
version: 14.2.0
|
||||
title: "'Add fleet and commands'"
|
||||
date: 2022-08-16T19:41:49.915Z
|
||||
- commits:
|
||||
- subject: Add device track command for pinning a device to the latest release or
|
||||
a specific release
|
||||
hash: cb26a736fc77da7f3571b998277f49956b961785
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
|
||||
author: Matthew Yarmolinsky
|
||||
nested: []
|
||||
version: 14.1.0
|
||||
title: "'Add device track command'"
|
||||
date: 2022-08-03T18:45:07.351Z
|
||||
- commits:
|
||||
- subject: Drop undocumented support for numeric ids in balena device commands
|
||||
hash: 8a7fbdb55dc669727dc97561b3e7ef1e7f20efb0
|
||||
@ -376,8 +1147,8 @@
|
||||
- subject: "patch: bump browserify from 14.5.0 to 17.0.0"
|
||||
hash: 2ee532e8dcc3eda0c54296f468f7f9a9e637071a
|
||||
body: >
|
||||
Bumps [browserify](https://github.com/browserify/browserify)
|
||||
from 14.5.0 to 17.0.0.
|
||||
Bumps [browserify](https://github.com/browserify/browserify) from 14.5.0
|
||||
to 17.0.0.
|
||||
|
||||
- [Release notes](https://github.com/browserify/browserify/releases)
|
||||
|
||||
@ -406,8 +1177,7 @@
|
||||
- subject: "patch: bump tmp from 0.0.31 to 0.2.1"
|
||||
hash: e905a6a8054297c89e75447e5ff48ca92e13bd49
|
||||
body: >
|
||||
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.0.31 to
|
||||
0.2.1.
|
||||
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.0.31 to 0.2.1.
|
||||
|
||||
- [Release notes](https://github.com/raszi/node-tmp/releases)
|
||||
|
||||
@ -490,8 +1260,7 @@
|
||||
- subject: "patch: bump mocha from 3.5.3 to 10.0.0"
|
||||
hash: 548996665b7e6159e5e209aa4a10987e071da024
|
||||
body: >
|
||||
Bumps [mocha](https://github.com/mochajs/mocha) from 3.5.3 to
|
||||
10.0.0.
|
||||
Bumps [mocha](https://github.com/mochajs/mocha) from 3.5.3 to 10.0.0.
|
||||
|
||||
- [Release notes](https://github.com/mochajs/mocha/releases)
|
||||
|
||||
@ -534,8 +1303,8 @@
|
||||
- subject: "patch: bump mockttp from 0.9.1 to 2.7.0"
|
||||
hash: fa44187e4e510171666f046d6a3a658f59956fd4
|
||||
body: >-
|
||||
Bumps [mockttp](https://github.com/httptoolkit/mockttp) from
|
||||
0.9.1 to 2.7.0.
|
||||
Bumps [mockttp](https://github.com/httptoolkit/mockttp) from 0.9.1 to
|
||||
2.7.0.
|
||||
|
||||
- [Release notes](https://github.com/httptoolkit/mockttp/releases)
|
||||
|
||||
@ -608,8 +1377,8 @@
|
||||
- subject: "patch: bump superagent from 3.8.3 to 7.1.2"
|
||||
hash: ae3974af1965386bf236b7ae295e4a9ecc285f0c
|
||||
body: >
|
||||
Bumps [superagent](https://github.com/visionmedia/superagent)
|
||||
from 3.8.3 to 7.1.2.
|
||||
Bumps [superagent](https://github.com/visionmedia/superagent) from 3.8.3
|
||||
to 7.1.2.
|
||||
|
||||
- [Release notes](https://github.com/visionmedia/superagent/releases)
|
||||
|
||||
@ -638,8 +1407,7 @@
|
||||
- subject: "patch: bump dotenv from 4.0.0 to 16.0.0"
|
||||
hash: b2ddda64df84d5a109b2adc1ee847ff5aef17000
|
||||
body: >
|
||||
Bumps [dotenv](https://github.com/motdotla/dotenv) from 4.0.0 to
|
||||
16.0.0.
|
||||
Bumps [dotenv](https://github.com/motdotla/dotenv) from 4.0.0 to 16.0.0.
|
||||
|
||||
- [Release notes](https://github.com/motdotla/dotenv/releases)
|
||||
|
||||
@ -778,8 +1546,8 @@
|
||||
- subject: "minor: Add trying SDK in the browser"
|
||||
hash: 50a6ca1844869eaccaf3275361a4016f7a284c05
|
||||
body: >
|
||||
Add information about using SDK in the browser as a partial.
|
||||
Solving: https://github.com/balena-io/docs/issues/2205
|
||||
Add information about using SDK in the browser as a partial. Solving:
|
||||
https://github.com/balena-io/docs/issues/2205
|
||||
footer:
|
||||
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
|
||||
signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
|
||||
@ -866,8 +1634,7 @@
|
||||
- subject: Remove unnecessary vpn address filtering when fetching local addresses
|
||||
hash: 12266a3c9349e5d944ba203e56f2fe80b5e97970
|
||||
body: >
|
||||
This has been handled by the supervisor since v2.2.0 / balenaOS
|
||||
v1.14
|
||||
This has been handled by the supervisor since v2.2.0 / balenaOS v1.14
|
||||
|
||||
from 2016-09-23 and is not relevant for any supported devices
|
||||
footer:
|
||||
@ -1237,8 +2004,8 @@
|
||||
- subject: Add support for building images with progress
|
||||
hash: e072408ee951d3caf46af5050d0b71991d114614
|
||||
body: >
|
||||
Using build instead of pull allows to add metadata (e.g. labels)
|
||||
to pulled images in an
|
||||
Using build instead of pull allows to add metadata (e.g. labels) to pulled
|
||||
images in an
|
||||
|
||||
atomic way. This commit adds the `DockerProgres.build()` method to
|
||||
|
||||
@ -2327,8 +3094,7 @@
|
||||
- subject: Allow more lenient gzip decompression
|
||||
hash: 9c7bc3051b279c9d09ec501a78dbe9f506d65650
|
||||
body: >
|
||||
Be more lenient with decoding compressed
|
||||
responses, since (very rarely)
|
||||
Be more lenient with decoding compressed responses, since (very rarely)
|
||||
|
||||
servers send slightly invalid gzip responses that are still accepted
|
||||
|
||||
@ -4001,8 +4767,8 @@
|
||||
- subject: Improve directory scan speed prior to tarballing
|
||||
hash: 257dd514ed7c0f6988b8a47219991cc4f61b4529
|
||||
body: >
|
||||
This changes improves the speed that the project is tarballed by
|
||||
switching from
|
||||
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.
|
||||
|
||||
@ -4513,8 +5279,7 @@
|
||||
- subject: Allow more lenient gzip decompression
|
||||
hash: 9c7bc3051b279c9d09ec501a78dbe9f506d65650
|
||||
body: >
|
||||
Be more lenient with decoding compressed responses,
|
||||
since (very rarely)
|
||||
Be more lenient with decoding compressed responses, since (very rarely)
|
||||
|
||||
servers send slightly invalid gzip responses that are still accepted
|
||||
|
||||
@ -4812,8 +5577,7 @@
|
||||
- subject: Add balena.yml handling and `--draft` to `balena deploy` release creation
|
||||
hash: 7d568a928b4297671e3776b72f64a6e2845d5f72
|
||||
body: >
|
||||
This change allows use of a contract and release semver when doing a
|
||||
push,
|
||||
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.
|
||||
footer:
|
||||
@ -6183,8 +6947,7 @@
|
||||
- subject: "docker: Improve handling of Docker-in-Docker errors"
|
||||
hash: 9036ce9af373eb8d328f105839163db0cae38ae6
|
||||
body: >
|
||||
The `local` logging driver captures output from container’s
|
||||
stdout/stderr
|
||||
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.
|
||||
|
||||
@ -9843,8 +10606,7 @@
|
||||
- commits:
|
||||
- author: Thodoris Greasidis
|
||||
body: >-
|
||||
Didn't convert the source, so that we don't end
|
||||
up
|
||||
Didn't convert the source, so that we don't end up
|
||||
|
||||
having conflicts with other ongoing PRs.
|
||||
footers:
|
||||
@ -17470,8 +18232,7 @@
|
||||
subject: "dependencies: bump etcher-sdk to pull in fixes"
|
||||
- author: Gergely Imreh
|
||||
body: >-
|
||||
To fix the same error as here
|
||||
https://github.com/nodejs/node/issues/20285
|
||||
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/
|
||||
footers:
|
||||
@ -19014,11 +19775,11 @@
|
||||
subject: Improve `selectFromList` function signature to be much more reusable
|
||||
- author: Akis Kesoglou
|
||||
body: >-
|
||||
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.
|
||||
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.
|
||||
|
||||
@ -19684,9 +20445,9 @@
|
||||
subject: Fix invoking undefined method
|
||||
- author: Akis Kesoglou
|
||||
body: >-
|
||||
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).
|
||||
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:
|
||||
|
||||
|
202
CHANGELOG.md
202
CHANGELOG.md
@ -4,6 +4,208 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 14.5.15 - 2022-12-12
|
||||
|
||||
* patch: update balena-preload to 12.2.0 [Edwin Joassart]
|
||||
|
||||
## 14.5.14 - 2022-12-11
|
||||
|
||||
* Bump multicast-dns to rebased commit (again) [pipex]
|
||||
|
||||
## 14.5.13 - 2022-12-08
|
||||
|
||||
* Build on macos-11 for library compatibility reasons [Page-]
|
||||
* Build on ubuntu-20.04 for library compatibility reasons [Page-]
|
||||
|
||||
## 14.5.12 - 2022-11-21
|
||||
|
||||
* Move GH publishing to FZ core [ab77]
|
||||
|
||||
## 14.5.11 - 2022-11-17
|
||||
|
||||
* Adding .nvmrc so we can use nvm use instead of hunting for version [zoobot]
|
||||
|
||||
## 14.5.10 - 2022-11-11
|
||||
|
||||
* Fix surfacing incompatible device type errors as not recognized [Thodoris Greasidis]
|
||||
|
||||
## 14.5.9 - 2022-11-11
|
||||
|
||||
* Prevent git from existing with 141 [ab77]
|
||||
|
||||
## 14.5.8 - 2022-11-10
|
||||
|
||||
* Replace missing input [ab77]
|
||||
|
||||
## 14.5.7 - 2022-11-10
|
||||
|
||||
* Just ignore errors during publish [ab77]
|
||||
|
||||
## 14.5.6 - 2022-11-10
|
||||
|
||||
* Ignore PIPE signal [ab77]
|
||||
|
||||
## 14.5.5 - 2022-11-10
|
||||
|
||||
* Don't pipefail [ab77]
|
||||
|
||||
## 14.5.4 - 2022-11-10
|
||||
|
||||
* Error when the device type and image parameters do not match [Thodoris Greasidis]
|
||||
|
||||
## 14.5.3 - 2022-11-10
|
||||
|
||||
* Switch to Flowzone [ab77]
|
||||
|
||||
## 14.5.2 - 2022-10-21
|
||||
|
||||
* Stop waiting for the analytics response [Thodoris Greasidis]
|
||||
|
||||
## 14.5.1 - 2022-10-20
|
||||
|
||||
* Bump parse-link-header from 1.0.1 to 2.0.0 [dependabot[bot]]
|
||||
|
||||
## 14.5.0 - 2022-10-18
|
||||
|
||||
* keeps events loggiging with default message [Otávio Jacobi]
|
||||
* uses amplitude data events format [Otávio Jacobi]
|
||||
* changes analytics endpoint to analytics-backend [Otávio Jacobi]
|
||||
|
||||
## 14.4.4 - 2022-10-18
|
||||
|
||||
* Update simple-git to 3.14.1 [Thodoris Greasidis]
|
||||
|
||||
## 14.4.3 - 2022-10-17
|
||||
|
||||
* config generate: Fix the incompatible arch errors showing as not found [Thodoris Greasidis]
|
||||
|
||||
## 14.4.2 - 2022-10-17
|
||||
|
||||
* Stop relying on device-type.json for resolving the device type aliases [Thodoris Greasidis]
|
||||
* Stop relying on device-type.json for resolving the cpu architecture [Thodoris Greasidis]
|
||||
|
||||
## 14.4.1 - 2022-10-12
|
||||
|
||||
* balena os initialize: Clarify that the process includes flashing [Heath Raftery]
|
||||
|
||||
## 14.4.0 - 2022-10-12
|
||||
|
||||
* device register: Add support for the `--deviceType` option [Thodoris Greasidis]
|
||||
|
||||
<details>
|
||||
<summary> Update balena-sdk to 16.28.0 [Thodoris Greasidis] </summary>
|
||||
|
||||
> ### balena-sdk-16.28.0 - 2022-10-12
|
||||
>
|
||||
> * device.register: Allow providing a device type for the registered device [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.27.0 - 2022-10-07
|
||||
>
|
||||
> * Add support for batch operations for more device modifying methods [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.26.7 - 2022-10-07
|
||||
>
|
||||
> * Fix request batching chunking when there is no grouping navigation prop [Thodoris Greasidis]
|
||||
> * request-batching: Increase the batch size to 200 items [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.26.6 - 2022-10-06
|
||||
>
|
||||
> * Fix request batching not chunking the items of the operation [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.26.5 - 2022-09-26
|
||||
>
|
||||
> * Delete redundant .resinci.yml [Pagan Gazzard]
|
||||
>
|
||||
> ### balena-sdk-16.26.4 - 2022-09-23
|
||||
>
|
||||
> * Remove moment in favor of date-fns [Matthew Yarmolinsky]
|
||||
>
|
||||
> ### balena-sdk-16.26.3 - 2022-09-21
|
||||
>
|
||||
> * Skip running tests in flowzone till we can inject env vars [Thodoris Greasidis]
|
||||
> * Switch from balenaCI to flowzone [Pagan Gazzard]
|
||||
>
|
||||
> ### balena-sdk-16.26.2 - 2022-09-06
|
||||
>
|
||||
>
|
||||
> <details>
|
||||
> <summary> Update balena-register-device to 8.0.0 [Thodoris Greasidis] </summary>
|
||||
>
|
||||
>> #### balena-register-device-8.0.0 - 2022-09-06
|
||||
>>
|
||||
>> * Remove the travis & appveyor configurations [Thodoris Greasidis]
|
||||
>> * tsconfig: Enable strict type checking [Thodoris Greasidis]
|
||||
>> * Update devDependencies [Thodoris Greasidis]
|
||||
>> * Update the uuid package to v9 [Thodoris Greasidis]
|
||||
>> * Prevent creating a package-lock.json [Thodoris Greasidis]
|
||||
>> * Drop support for node 10 in favor of 14 & 16 [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-register-device-7.2.0 - 2021-04-29
|
||||
>>
|
||||
>> * Support `supervisorVersion`/`osVersion`/`osVariant`/`macAddress` fields [Pagan Gazzard]
|
||||
>>
|
||||
>> #### balena-register-device-7.1.1 - 2021-04-29
|
||||
>>
|
||||
>> * Update dependencies [Pagan Gazzard]
|
||||
>>
|
||||
> </details>
|
||||
>
|
||||
>
|
||||
> ### balena-sdk-16.26.1 - 2022-08-29
|
||||
>
|
||||
> * Update TypeScript to v4.8 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.26.0 - 2022-08-26
|
||||
>
|
||||
> * Pin TypeScript to 4.7 until upstream dependencies are updated [Thodoris Greasidis]
|
||||
> * types: Add the InvitationTokenDecodedPayload type [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.25.1 - 2022-08-05
|
||||
>
|
||||
> * Deprecate the public_key from the user JWT [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.25.0 - 2022-08-04
|
||||
>
|
||||
> * application.remove: Support batch deletions by providing multiple IDs [Thodoris Greasidis]
|
||||
> * Refactor the request batching implementation to be generic [Thodoris Greasidis]
|
||||
> * Change pine options merging to extend the default `$select`ed properties [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.24.2 - 2022-08-02
|
||||
>
|
||||
> * Refactor the internal mergePineOptions utility [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.24.1 - 2022-07-21
|
||||
>
|
||||
> * Update Husky to v7 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.24.0 - 2022-07-08
|
||||
>
|
||||
> * types: Add missing Application to Service relation [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-16.23.0 - 2022-07-07
|
||||
>
|
||||
> * Add expiry-date for generation of user and device keys [Nitish Agarwal]
|
||||
>
|
||||
</details>
|
||||
|
||||
## 14.3.1 - 2022-09-06
|
||||
|
||||
* Add unified OS versions in the examples of the device & os commands [Thodoris Greasidis]
|
||||
|
||||
## 14.3.0 - 2022-08-17
|
||||
|
||||
* release: Add `validate` command for validating releases [Matthew Yarmolinsky]
|
||||
* release: Add `invalidate` command for invalidating releases [Matthew Yarmolinsky]
|
||||
|
||||
## 14.2.0 - 2022-08-16
|
||||
|
||||
* fleet: Add `track-latest` command for tracking the latest release [Matthew Yarmolinsky]
|
||||
* fleet: Add `pin` command for pinning fleets to a specific release [Matthew Yarmolinsky]
|
||||
|
||||
## 14.1.0 - 2022-08-03
|
||||
|
||||
* Add device track command for pinning a device to the latest release or a specific release [Matthew Yarmolinsky]
|
||||
|
||||
## 14.0.0 - 2022-08-01
|
||||
|
||||
* Drop undocumented support for numeric ids in balena device commands [Matthew Yarmolinsky]
|
||||
|
@ -45,8 +45,6 @@ const execFileAsync = promisify(execFile);
|
||||
export const packageJSON = loadPackageJson();
|
||||
export const version = 'v' + packageJSON.version;
|
||||
const arch = process.arch;
|
||||
const MSYS2_BASH =
|
||||
process.env.MSYSSHELLPATH || 'C:\\msys64\\usr\\bin\\bash.exe';
|
||||
|
||||
function dPath(...paths: string[]) {
|
||||
return path.join(ROOT, 'dist', ...paths);
|
||||
@ -425,20 +423,28 @@ async function renameInstallerFiles() {
|
||||
|
||||
/**
|
||||
* If the CSC_LINK and CSC_KEY_PASSWORD env vars are set, digitally sign the
|
||||
* executable installer by running the balena-io/scripts/shared/sign-exe.sh
|
||||
* script (which must be in the PATH) using a MSYS2 bash shell.
|
||||
* 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}"`);
|
||||
await execFileAsync(MSYS2_BASH, [
|
||||
'sign-exe.sh',
|
||||
// trust ...
|
||||
await execFileAsync('signtool.exe', [
|
||||
'sign',
|
||||
'-t',
|
||||
process.env.TIMESTAMP_SERVER || 'http://timestamp.comodoca.com',
|
||||
'-f',
|
||||
exeName,
|
||||
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',
|
||||
@ -450,14 +456,21 @@ async function signWindowsInstaller() {
|
||||
* Wait for Apple Installer Notarization to continue
|
||||
*/
|
||||
async function notarizeMacInstaller(): Promise<void> {
|
||||
const appleId = 'accounts+apple@balena.io';
|
||||
const { notarize } = await import('electron-notarize');
|
||||
await notarize({
|
||||
appBundleId: 'io.balena.etcher',
|
||||
appPath: renamedOclifInstallers.darwin,
|
||||
appleId,
|
||||
appleIdPassword: '@keychain:CLI_PASSWORD',
|
||||
});
|
||||
const appleId =
|
||||
process.env.XCODE_APP_LOADER_EMAIL || 'accounts+apple@balena.io';
|
||||
const appBundleId = packageJSON.oclif.macos.identifier || 'io.balena.cli';
|
||||
const appleIdPassword = process.env.XCODE_APP_LOADER_PASSWORD;
|
||||
|
||||
if (appleIdPassword) {
|
||||
const { notarize } = await import('electron-notarize');
|
||||
// https://github.com/electron/notarize/blob/main/README.md
|
||||
await notarize({
|
||||
appBundleId,
|
||||
appPath: renamedOclifInstallers.darwin,
|
||||
appleId,
|
||||
appleIdPassword,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,11 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const stripIndent = require('common-tags/lib/stripIndent');
|
||||
const _ = require('lodash');
|
||||
const { promises: fs } = require('fs');
|
||||
const path = require('path');
|
||||
const simplegit = require('simple-git/promise');
|
||||
// tslint:disable-next-line:import-blacklist
|
||||
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, '..'));
|
||||
|
||||
@ -31,7 +32,7 @@ const ROOT = path.normalize(path.join(__dirname, '..'));
|
||||
* using `touch`.
|
||||
*/
|
||||
async function checkBuildTimestamps() {
|
||||
const git = simplegit(ROOT);
|
||||
const git = simpleGit(ROOT);
|
||||
const docFile = path.join(ROOT, 'docs', 'balena-cli.md');
|
||||
const [docStat, gitStatus] = await Promise.all([
|
||||
fs.stat(docFile),
|
||||
@ -81,4 +82,5 @@ async function run() {
|
||||
}
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
run();
|
@ -12,15 +12,15 @@ _balena() {
|
||||
# Sub-completions
|
||||
api_key_cmds=( generate )
|
||||
config_cmds=( generate inject read reconfigure write )
|
||||
device_cmds=( deactivate identify init local-mode move os-update public-url purge reboot register rename restart rm shutdown )
|
||||
device_cmds=( deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm services shutdown track-fleet )
|
||||
devices_cmds=( supported )
|
||||
env_cmds=( add rename rm )
|
||||
fleet_cmds=( create purge rename restart 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 )
|
||||
release_cmds=( finalize invalidate validate )
|
||||
tag_cmds=( rm set )
|
||||
|
||||
|
||||
|
@ -11,15 +11,15 @@ _balena_complete()
|
||||
# Sub-completions
|
||||
api_key_cmds="generate"
|
||||
config_cmds="generate inject read reconfigure write"
|
||||
device_cmds="deactivate identify init local-mode move os-update public-url purge reboot register rename restart rm shutdown"
|
||||
device_cmds="deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm services shutdown track-fleet"
|
||||
devices_cmds="supported"
|
||||
env_cmds="add rename rm"
|
||||
fleet_cmds="create purge rename restart 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"
|
||||
release_cmds="finalize invalidate validate"
|
||||
tag_cmds="rm set"
|
||||
|
||||
|
||||
|
@ -801,6 +801,7 @@ Examples:
|
||||
|
||||
$ balena device init
|
||||
$ balena device init -f myorg/myfleet
|
||||
$ balena device init --fleet myFleet --os-version 2.101.7 --drive /dev/disk5 --config config.json --yes
|
||||
$ balena device init --fleet myFleet --os-version 2.83.21+rev1.prod --drive /dev/disk5 --config config.json --yes
|
||||
|
||||
### Options
|
||||
@ -922,6 +923,7 @@ Requires balenaCloud; will not work with openBalena or standalone balenaOS.
|
||||
Examples:
|
||||
|
||||
$ balena device os-update 23c73a1
|
||||
$ balena device os-update 23c73a1 --version 2.101.7
|
||||
$ balena device os-update 23c73a1 --version 2.31.0+rev1.prod
|
||||
|
||||
### Arguments
|
||||
@ -1035,6 +1037,7 @@ Examples:
|
||||
$ balena device register MyFleet
|
||||
$ balena device register MyFleet --uuid <uuid>
|
||||
$ balena device register myorg/myfleet --uuid <uuid>
|
||||
$ balena device register myorg/myfleet --uuid <uuid> --deviceType <deviceTypeSlug>
|
||||
|
||||
### Arguments
|
||||
|
||||
@ -1048,6 +1051,10 @@ fleet name or slug (preferred)
|
||||
|
||||
custom uuid
|
||||
|
||||
#### --deviceType DEVICETYPE
|
||||
|
||||
device type slug (run 'balena devices supported' for possible values)
|
||||
|
||||
## device rename <uuid> [newName]
|
||||
|
||||
Rename a device.
|
||||
@ -2065,9 +2072,11 @@ Development images can be selected by appending `.dev` to the version.
|
||||
Examples:
|
||||
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.101.7
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2022.7.0
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^2.90.0
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.60.1+rev1
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.60.1+rev1.dev
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^2.60.0
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2021.10.2.prod
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version latest
|
||||
$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version default
|
||||
@ -2252,7 +2261,9 @@ expiry date assigned to generated provisioning api key (format: YYYY-MM-DD)
|
||||
## os initialize <image>
|
||||
|
||||
Initialize an os image for a device with a previously
|
||||
configured operating system image.
|
||||
configured operating system image and flash the
|
||||
an external storage drive or the device's storage
|
||||
medium depending on the device type.
|
||||
|
||||
|
||||
Note: Initializing the device may ask for administrative permissions
|
||||
|
@ -175,26 +175,26 @@ export default class ConfigGenerateCmd extends Command {
|
||||
|
||||
const deviceType = options.deviceType || resourceDeviceType;
|
||||
|
||||
const deviceManifest = await balena.models.device.getManifestBySlug(
|
||||
deviceType,
|
||||
);
|
||||
|
||||
// Check compatibility if application and deviceType provided
|
||||
if (options.fleet && options.deviceType) {
|
||||
const appDeviceManifest = await balena.models.device.getManifestBySlug(
|
||||
resourceDeviceType,
|
||||
);
|
||||
|
||||
const helpers = await import('../../utils/helpers');
|
||||
if (
|
||||
!helpers.areDeviceTypesCompatible(appDeviceManifest, deviceManifest)
|
||||
!(await helpers.areDeviceTypesCompatible(
|
||||
resourceDeviceType,
|
||||
deviceType,
|
||||
))
|
||||
) {
|
||||
throw new balena.errors.BalenaInvalidDeviceType(
|
||||
const { ExpectedError } = await import('../../errors');
|
||||
throw new ExpectedError(
|
||||
`Device type ${options.deviceType} is incompatible with fleet ${options.fleet}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const deviceManifest = await balena.models.device.getManifestBySlug(
|
||||
deviceType,
|
||||
);
|
||||
|
||||
// Prompt for values
|
||||
// Pass params as an override: if there is any param with exactly the same name as a
|
||||
// required option, that value is used (and the corresponding question is not asked)
|
||||
|
@ -70,6 +70,7 @@ export default class DeviceInitCmd extends Command {
|
||||
public static examples = [
|
||||
'$ balena device init',
|
||||
'$ balena device init -f myorg/myfleet',
|
||||
'$ balena device init --fleet myFleet --os-version 2.101.7 --drive /dev/disk5 --config config.json --yes',
|
||||
'$ balena device init --fleet myFleet --os-version 2.83.21+rev1.prod --drive /dev/disk5 --config config.json --yes',
|
||||
];
|
||||
|
||||
|
@ -46,6 +46,7 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena device os-update 23c73a1',
|
||||
'$ balena device os-update 23c73a1 --version 2.101.7',
|
||||
'$ balena device os-update 23c73a1 --version 2.31.0+rev1.prod',
|
||||
];
|
||||
|
||||
|
103
lib/commands/device/pin.ts
Normal file
103
lib/commands/device/pin.ts
Normal file
@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import type { IArg } from '@oclif/parser/lib/args';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
uuid: string;
|
||||
releaseToPinTo?: string;
|
||||
}
|
||||
|
||||
export default class DevicePinCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Pin a device to a release.
|
||||
|
||||
Pin a device to a release.
|
||||
|
||||
Note, if the commit is omitted, the currently pinned release will be printed, with instructions for how to see a list of releases
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena device pin 7cf02a6',
|
||||
'$ balena device pin 7cf02a6 91165e5',
|
||||
];
|
||||
|
||||
public static args: Array<IArg<any>> = [
|
||||
{
|
||||
name: 'uuid',
|
||||
description: 'the uuid of the device to pin to a release',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'releaseToPinTo',
|
||||
description: 'the commit of the release for the device to get pinned to',
|
||||
},
|
||||
];
|
||||
|
||||
public static usage = 'device pin <uuid> [releaseToPinTo]';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(DevicePinCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const device = await balena.models.device.get(params.uuid, {
|
||||
$expand: {
|
||||
should_be_running__release: {
|
||||
$select: 'commit',
|
||||
},
|
||||
belongs_to__application: {
|
||||
$select: 'slug',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const pinnedRelease = getExpandedProp(
|
||||
device.should_be_running__release,
|
||||
'commit',
|
||||
);
|
||||
const appSlug = getExpandedProp(device.belongs_to__application, 'slug');
|
||||
|
||||
const releaseToPinTo = params.releaseToPinTo;
|
||||
|
||||
if (!releaseToPinTo) {
|
||||
console.log(
|
||||
`${
|
||||
pinnedRelease
|
||||
? `This device is currently pinned to ${pinnedRelease}.`
|
||||
: 'This device is not currently pinned to any release.'
|
||||
} \n\nTo see a list of all releases this device can be pinned to, run \`balena releases ${appSlug}\`.`,
|
||||
);
|
||||
} else {
|
||||
await balena.models.device.pinToRelease(params.uuid, releaseToPinTo);
|
||||
}
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@ import { applicationIdInfo } from '../../utils/messages';
|
||||
|
||||
interface FlagsDef {
|
||||
uuid?: string;
|
||||
deviceType?: string;
|
||||
help: void;
|
||||
}
|
||||
|
||||
@ -47,6 +48,7 @@ export default class DeviceRegisterCmd extends Command {
|
||||
'$ balena device register MyFleet',
|
||||
'$ balena device register MyFleet --uuid <uuid>',
|
||||
'$ balena device register myorg/myfleet --uuid <uuid>',
|
||||
'$ balena device register myorg/myfleet --uuid <uuid> --deviceType <deviceTypeSlug>',
|
||||
];
|
||||
|
||||
public static args: Array<IArg<any>> = [ca.fleetRequired];
|
||||
@ -58,6 +60,10 @@ export default class DeviceRegisterCmd extends Command {
|
||||
description: 'custom uuid',
|
||||
char: 'u',
|
||||
}),
|
||||
deviceType: flags.string({
|
||||
description:
|
||||
"device type slug (run 'balena devices supported' for possible values)",
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
@ -77,7 +83,11 @@ export default class DeviceRegisterCmd extends Command {
|
||||
|
||||
console.info(`Registering to ${application.slug}: ${uuid}`);
|
||||
|
||||
const result = await balena.models.device.register(application.id, uuid);
|
||||
const result = await balena.models.device.register(
|
||||
application.id,
|
||||
uuid,
|
||||
options.deviceType,
|
||||
);
|
||||
|
||||
return result && result.uuid;
|
||||
}
|
||||
|
93
lib/commands/device/services.ts
Normal file
93
lib/commands/device/services.ts
Normal file
@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import type { IArg } from '@oclif/parser/lib/args';
|
||||
import { ImageInstall } from 'balena-sdk';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
interface AugmentedImageInstall extends ImageInstall {
|
||||
name?: string;
|
||||
release?: string;
|
||||
}
|
||||
|
||||
export default class DeviceServicesCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Show info about a device's services.
|
||||
|
||||
Show info about a device's services.
|
||||
`;
|
||||
public static examples = ['$ balena device services 23c73a1'];
|
||||
|
||||
public static args: Array<IArg<any>> = [
|
||||
{
|
||||
name: 'uuid',
|
||||
description: 'the uuid of the device whose services to show info about',
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
public static usage = 'device services <uuid>';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(DeviceServicesCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
try {
|
||||
const device = await balena.models.device.getWithServiceDetails(
|
||||
params.uuid,
|
||||
);
|
||||
console.log(
|
||||
getVisuals().table.horizontal(
|
||||
device.image_install?.map((imageInstall) => {
|
||||
const newImageInstall: AugmentedImageInstall = { ...imageInstall };
|
||||
newImageInstall.name = getExpandedProp(
|
||||
getExpandedProp(imageInstall.image, 'is_a_build_of__service')!,
|
||||
'service_name',
|
||||
);
|
||||
newImageInstall.release = getExpandedProp(
|
||||
imageInstall.is_provided_by__release,
|
||||
'commit',
|
||||
);
|
||||
return newImageInstall;
|
||||
}),
|
||||
['name', 'status', 'release', 'id'],
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
63
lib/commands/device/track-fleet.ts
Normal file
63
lib/commands/device/track-fleet.ts
Normal file
@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import type { IArg } from '@oclif/parser/lib/args';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
export default class DeviceTrackFleetCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Make a device track the fleet's pinned release.
|
||||
|
||||
Make a device track the fleet's pinned release.
|
||||
`;
|
||||
public static examples = ['$ balena device track-fleet 7cf02a6'];
|
||||
|
||||
public static args: Array<IArg<any>> = [
|
||||
{
|
||||
name: 'uuid',
|
||||
description: "the uuid of the device to make track the fleet's release",
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
public static usage = 'device track-fleet <uuid>';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(DeviceTrackFleetCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
await balena.models.device.trackApplicationRelease(params.uuid);
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { flags } from '@oclif/command';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import * as _ from 'lodash';
|
||||
import Command from '../../command';
|
||||
|
||||
@ -59,36 +60,38 @@ export default class DevicesSupportedCmd extends Command {
|
||||
|
||||
public async run() {
|
||||
const { flags: options } = this.parse<FlagsDef, {}>(DevicesSupportedCmd);
|
||||
const [dts, configDTs] = await Promise.all([
|
||||
getBalenaSdk().models.deviceType.getAllSupported({
|
||||
$expand: { is_of__cpu_architecture: { $select: 'slug' } },
|
||||
$select: ['slug', 'name'],
|
||||
}),
|
||||
getBalenaSdk().models.config.getDeviceTypes(),
|
||||
]);
|
||||
const dtsBySlug = _.keyBy(dts, (dt) => dt.slug);
|
||||
const configDTsBySlug = _.keyBy(configDTs, (dt) => dt.slug);
|
||||
const pineOptions = {
|
||||
$select: (['slug', 'name'] as const).slice(),
|
||||
$expand: {
|
||||
is_of__cpu_architecture: { $select: 'slug' },
|
||||
device_type_alias: {
|
||||
$select: 'is_referenced_by__alias',
|
||||
$orderby: 'is_referenced_by__alias asc',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
const dts = (await getBalenaSdk().models.deviceType.getAllSupported(
|
||||
pineOptions,
|
||||
)) as Array<
|
||||
BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>
|
||||
>;
|
||||
interface DT {
|
||||
slug: string;
|
||||
aliases: string[];
|
||||
arch: string;
|
||||
name: string;
|
||||
}
|
||||
let deviceTypes: DT[] = [];
|
||||
for (const slug of Object.keys(dtsBySlug)) {
|
||||
const configDT: Partial<typeof configDTs[0]> =
|
||||
configDTsBySlug[slug] || {};
|
||||
const aliases = (configDT.aliases || []).filter(
|
||||
(alias) => alias !== slug,
|
||||
);
|
||||
const dt: Partial<typeof dts[0]> = dtsBySlug[slug] || {};
|
||||
deviceTypes.push({
|
||||
slug,
|
||||
let deviceTypes = dts.map((dt): DT => {
|
||||
const aliases = dt.device_type_alias
|
||||
.map((dta) => dta.is_referenced_by__alias)
|
||||
.filter((alias) => alias !== dt.slug);
|
||||
return {
|
||||
slug: dt.slug,
|
||||
aliases: options.json ? aliases : [aliases.join(', ')],
|
||||
arch: (dt.is_of__cpu_architecture as any)?.[0]?.slug || 'n/a',
|
||||
arch: dt.is_of__cpu_architecture[0]?.slug || 'n/a',
|
||||
name: dt.name || 'N/A',
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
const fields = ['slug', 'aliases', 'arch', 'name'];
|
||||
deviceTypes = _.sortBy(deviceTypes, fields);
|
||||
if (options.json) {
|
||||
|
100
lib/commands/fleet/pin.ts
Normal file
100
lib/commands/fleet/pin.ts
Normal file
@ -0,0 +1,100 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import type { IArg } from '@oclif/parser/lib/args';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
slug: string;
|
||||
releaseToPinTo?: string;
|
||||
}
|
||||
|
||||
export default class FleetPinCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Pin a fleet to a release.
|
||||
|
||||
Pin a fleet to a release.
|
||||
|
||||
Note, if the commit is omitted, the currently pinned release will be printed, with instructions for how to see a list of releases
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena fleet pin myfleet',
|
||||
'$ balena fleet pin myorg/myfleet 91165e5',
|
||||
];
|
||||
|
||||
public static args: Array<IArg<any>> = [
|
||||
{
|
||||
name: 'slug',
|
||||
description: 'the slug of the fleet to pin to a release',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'releaseToPinTo',
|
||||
description: 'the commit of the release for the fleet to get pinned to',
|
||||
},
|
||||
];
|
||||
|
||||
public static usage = 'fleet pin <slug> [releaseToPinTo]';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(FleetPinCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const fleet = await balena.models.application.get(params.slug, {
|
||||
$expand: {
|
||||
should_be_running__release: {
|
||||
$select: 'commit',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const pinnedRelease = getExpandedProp(
|
||||
fleet.should_be_running__release,
|
||||
'commit',
|
||||
);
|
||||
|
||||
const releaseToPinTo = params.releaseToPinTo;
|
||||
const slug = params.slug;
|
||||
|
||||
if (!releaseToPinTo) {
|
||||
console.log(
|
||||
`${
|
||||
pinnedRelease
|
||||
? `This fleet is currently pinned to ${pinnedRelease}.`
|
||||
: 'This fleet is not currently pinned to any release.'
|
||||
} \n\nTo see a list of all releases this fleet can be pinned to, run \`balena releases ${slug}\`.`,
|
||||
);
|
||||
} else {
|
||||
await balena.models.application.pinToRelease(slug, releaseToPinTo);
|
||||
}
|
||||
}
|
||||
}
|
66
lib/commands/fleet/track-latest.ts
Normal file
66
lib/commands/fleet/track-latest.ts
Normal file
@ -0,0 +1,66 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import type { IArg } from '@oclif/parser/lib/args';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
slug: string;
|
||||
}
|
||||
|
||||
export default class FleetTrackLatestCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Make this fleet track the latest release.
|
||||
|
||||
Make this fleet track the latest release.
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena fleet track-latest myorg/myfleet',
|
||||
'$ balena fleet track-latest myfleet',
|
||||
];
|
||||
|
||||
public static args: Array<IArg<any>> = [
|
||||
{
|
||||
name: 'slug',
|
||||
description: 'the slug of the fleet to make track the latest release',
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
public static usage = 'fleet track-latest <slug>';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(FleetTrackLatestCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
await balena.models.application.trackLatestRelease(params.slug);
|
||||
}
|
||||
}
|
@ -215,7 +215,7 @@ export default class OsConfigureCmd extends Command {
|
||||
is_for__device_type: { $select: 'slug' },
|
||||
},
|
||||
})) as ApplicationWithDeviceType;
|
||||
await checkDeviceTypeCompatibility(balena, options, app);
|
||||
await checkDeviceTypeCompatibility(options, app);
|
||||
deviceTypeSlug =
|
||||
options['device-type'] || app.is_for__device_type[0].slug;
|
||||
}
|
||||
@ -361,17 +361,17 @@ async function getOsVersionFromImage(
|
||||
* @param app Balena SDK Application model object
|
||||
*/
|
||||
async function checkDeviceTypeCompatibility(
|
||||
sdk: BalenaSdk.BalenaSDK,
|
||||
options: FlagsDef,
|
||||
app: ApplicationWithDeviceType,
|
||||
) {
|
||||
if (options['device-type']) {
|
||||
const [appDeviceType, optionDeviceType] = await Promise.all([
|
||||
sdk.models.device.getManifestBySlug(app.is_for__device_type[0].slug),
|
||||
sdk.models.device.getManifestBySlug(options['device-type']),
|
||||
]);
|
||||
const helpers = await import('../../utils/helpers');
|
||||
if (!helpers.areDeviceTypesCompatible(appDeviceType, optionDeviceType)) {
|
||||
if (
|
||||
!(await helpers.areDeviceTypesCompatible(
|
||||
app.is_for__device_type[0].slug,
|
||||
options['device-type'],
|
||||
))
|
||||
) {
|
||||
throw new ExpectedError(
|
||||
`Device type ${options['device-type']} is incompatible with fleet ${options.fleet}`,
|
||||
);
|
||||
|
@ -53,9 +53,11 @@ export default class OsDownloadCmd extends Command {
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.101.7',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2022.7.0',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^2.90.0',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.60.1+rev1',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2.60.1+rev1.dev',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^2.60.0',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 2021.10.2.prod',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version latest',
|
||||
'$ balena os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version default',
|
||||
|
@ -42,7 +42,9 @@ export default class OsInitializeCmd extends Command {
|
||||
Initialize an os image for a device.
|
||||
|
||||
Initialize an os image for a device with a previously
|
||||
configured operating system image.
|
||||
configured operating system image and flash the
|
||||
an external storage drive or the device's storage
|
||||
medium depending on the device type.
|
||||
${INIT_WARNING_MESSAGE}
|
||||
`;
|
||||
|
||||
|
83
lib/commands/release/invalidate.ts
Normal file
83
lib/commands/release/invalidate.ts
Normal file
@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { tryAsInteger } from '../../utils/validation';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
commitOrId: string | number;
|
||||
}
|
||||
|
||||
export default class ReleaseInvalidateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Invalidate a release.
|
||||
|
||||
Invalidate a release.
|
||||
|
||||
Invalid releases are not automatically deployed to devices tracking the latest
|
||||
release. For an invalid release to be deployed to a device, the device should be
|
||||
explicity pinned to that release.
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena release invalidate a777f7345fe3d655c1c981aa642e5555',
|
||||
'$ balena release invalidate 1234567',
|
||||
];
|
||||
|
||||
public static usage = 'release invalidate <commitOrId>';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = [
|
||||
{
|
||||
name: 'commitOrId',
|
||||
description: 'the commit or ID of the release to invalidate',
|
||||
required: true,
|
||||
parse: (commitOrId: string) => tryAsInteger(commitOrId),
|
||||
},
|
||||
];
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(
|
||||
ReleaseInvalidateCmd,
|
||||
);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const release = await balena.models.release.get(params.commitOrId, {
|
||||
$select: ['id', 'is_invalidated'],
|
||||
});
|
||||
|
||||
if (release.is_invalidated) {
|
||||
console.log(`Release ${params.commitOrId} is already invalidated!`);
|
||||
return;
|
||||
}
|
||||
|
||||
await balena.models.release.setIsInvalidated(release.id, true);
|
||||
console.log(`Release ${params.commitOrId} invalidated`);
|
||||
}
|
||||
}
|
80
lib/commands/release/validate.ts
Normal file
80
lib/commands/release/validate.ts
Normal file
@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-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 { flags } from '@oclif/command';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { tryAsInteger } from '../../utils/validation';
|
||||
|
||||
interface FlagsDef {
|
||||
help: void;
|
||||
}
|
||||
|
||||
interface ArgsDef {
|
||||
commitOrId: string | number;
|
||||
}
|
||||
|
||||
export default class ReleaseValidateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Validate a release.
|
||||
|
||||
Validate a release.
|
||||
|
||||
Valid releases are automatically deployed to devices tracking the latest
|
||||
release if they are finalized.
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena release validate a777f7345fe3d655c1c981aa642e5555',
|
||||
'$ balena release validate 1234567',
|
||||
];
|
||||
|
||||
public static usage = 'release validate <commitOrId>';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = [
|
||||
{
|
||||
name: 'commitOrId',
|
||||
description: 'the commit or ID of the release to validate',
|
||||
required: true,
|
||||
parse: (commitOrId: string) => tryAsInteger(commitOrId),
|
||||
},
|
||||
];
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params } = this.parse<FlagsDef, ArgsDef>(ReleaseValidateCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const release = await balena.models.release.get(params.commitOrId, {
|
||||
$select: ['id', 'is_invalidated'],
|
||||
});
|
||||
|
||||
if (!release.is_invalidated) {
|
||||
console.log(`Release ${params.commitOrId} is already validated!`);
|
||||
return;
|
||||
}
|
||||
|
||||
await balena.models.release.setIsInvalidated(release.id, false);
|
||||
console.log(`Release ${params.commitOrId} validated`);
|
||||
}
|
||||
}
|
@ -177,7 +177,16 @@ const messages: {
|
||||
Looks like the session token has expired.
|
||||
Try logging in again with the "balena login" command.`,
|
||||
|
||||
BalenaInvalidDeviceType: (error: Error & { deviceTypeSlug?: string }) => {
|
||||
BalenaInvalidDeviceType: (
|
||||
error: Error & { deviceTypeSlug?: string; type?: string },
|
||||
) => {
|
||||
// TODO: The SDK should be throwing a different Error for this case.
|
||||
if (
|
||||
typeof error.type === 'string' &&
|
||||
error.type.startsWith('Incompatible ')
|
||||
) {
|
||||
return error.type;
|
||||
}
|
||||
const slug = error.deviceTypeSlug ? `"${error.deviceTypeSlug}"` : 'slug';
|
||||
return stripIndent`
|
||||
Device type ${slug} not recognized. Perhaps misspelled?
|
||||
|
@ -73,38 +73,52 @@ export async function trackCommand(commandSignature: string) {
|
||||
}
|
||||
}
|
||||
|
||||
const TIMEOUT = 4000;
|
||||
|
||||
/**
|
||||
* Make the event tracking HTTPS request to balenaCloud's '/mixpanel' endpoint.
|
||||
*/
|
||||
async function sendEvent(balenaUrl: string, event: string, username?: string) {
|
||||
const { default: got } = await import('got');
|
||||
const trackData = {
|
||||
event,
|
||||
properties: {
|
||||
arch: process.arch,
|
||||
balenaUrl, // e.g. 'balena-cloud.com' or 'balena-staging.com'
|
||||
distinct_id: username,
|
||||
mp_lib: 'node',
|
||||
node: process.version,
|
||||
platform: process.platform,
|
||||
token: 'balena-main',
|
||||
version: packageJSON.version,
|
||||
},
|
||||
};
|
||||
const url = `https://api.${balenaUrl}/mixpanel/track`;
|
||||
const searchParams = {
|
||||
ip: 0,
|
||||
verbose: 0,
|
||||
data: Buffer.from(JSON.stringify(trackData)).toString('base64'),
|
||||
api_key: 'balena-main',
|
||||
events: [
|
||||
{
|
||||
event_type: event,
|
||||
user_id: username,
|
||||
version_name: packageJSON.version,
|
||||
event_properties: {
|
||||
balenaUrl, // e.g. 'balena-cloud.com' or 'balena-staging.com'
|
||||
arch: process.arch,
|
||||
platform: process.platform,
|
||||
node: process.version,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const url = `https://data.${balenaUrl}/amplitude/2/httpapi`;
|
||||
|
||||
try {
|
||||
await got(url, { searchParams, retry: 0, timeout: 4000 });
|
||||
await got.post(url, {
|
||||
json: trackData,
|
||||
retry: 0,
|
||||
timeout: {
|
||||
// Starts when the request is initiated.
|
||||
request: TIMEOUT,
|
||||
// Starts when request has been flushed.
|
||||
// Exits the request as soon as it's sent.
|
||||
response: 0,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
if (process.env.DEBUG) {
|
||||
console.error(`[debug] Event tracking error: ${e.message || e}`);
|
||||
}
|
||||
|
||||
if (e instanceof got.TimeoutError) {
|
||||
if (
|
||||
e instanceof got.TimeoutError &&
|
||||
TIMEOUT < (e.timings.phases.total ?? 0)
|
||||
) {
|
||||
console.error(stripIndent`
|
||||
Timeout submitting analytics event to balenaCloud/openBalena.
|
||||
If you are using the balena CLI in an air-gapped environment with a filtered
|
||||
|
@ -107,16 +107,6 @@ export const getDeviceAndMaybeAppFromUUID = _.memoize(
|
||||
(_sdk, deviceUUID) => deviceUUID,
|
||||
);
|
||||
|
||||
/** Given a device type alias like 'nuc', return the actual slug like 'intel-nuc'. */
|
||||
export const unaliasDeviceType = _.memoize(async function (
|
||||
sdk: SDK.BalenaSDK,
|
||||
deviceType: string,
|
||||
): Promise<string> {
|
||||
return (
|
||||
(await sdk.models.device.getManifestBySlug(deviceType)).slug || deviceType
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Download balenaOS image for the specified `deviceType`.
|
||||
* `OSVersion` may be one of:
|
||||
@ -255,8 +245,8 @@ export async function getOsVersions(
|
||||
);
|
||||
// if slug is an alias, fetch the real slug
|
||||
if (!versions.length) {
|
||||
// unaliasDeviceType() produces a nice error msg if slug is invalid
|
||||
slug = await unaliasDeviceType(sdk, slug);
|
||||
// unalias device type slug
|
||||
slug = (await sdk.models.deviceType.get(slug, { $select: 'slug' })).slug;
|
||||
if (slug !== deviceType) {
|
||||
versions = await sdk.models.os.getAvailableOsVersions(slug);
|
||||
}
|
||||
|
@ -107,21 +107,50 @@ export async function getManifest(
|
||||
deviceType: string,
|
||||
): Promise<BalenaSdk.DeviceTypeJson.DeviceType> {
|
||||
const init = await import('balena-device-init');
|
||||
const sdk = getBalenaSdk();
|
||||
const manifest = await init.getImageManifest(image);
|
||||
if (manifest != null) {
|
||||
return manifest;
|
||||
if (
|
||||
manifest != null &&
|
||||
manifest.slug !== deviceType &&
|
||||
manifest.slug !== (await sdk.models.deviceType.get(deviceType)).slug
|
||||
) {
|
||||
const { ExpectedError } = await import('../errors');
|
||||
throw new ExpectedError(
|
||||
`The device type of the provided OS image ${manifest.slug}, does not match the expected device type ${deviceType}`,
|
||||
);
|
||||
}
|
||||
return getBalenaSdk().models.device.getManifestBySlug(deviceType);
|
||||
return manifest ?? (await sdk.models.device.getManifestBySlug(deviceType));
|
||||
}
|
||||
|
||||
export const areDeviceTypesCompatible = (
|
||||
appDeviceType: BalenaSdk.DeviceTypeJson.DeviceType,
|
||||
osDeviceType: BalenaSdk.DeviceTypeJson.DeviceType,
|
||||
) =>
|
||||
getBalenaSdk().models.os.isArchitectureCompatibleWith(
|
||||
osDeviceType.arch,
|
||||
appDeviceType.arch,
|
||||
) && !!appDeviceType.isDependent === !!osDeviceType.isDependent;
|
||||
export const areDeviceTypesCompatible = async (
|
||||
appDeviceTypeSlug: string,
|
||||
osDeviceTypeSlug: string,
|
||||
) => {
|
||||
if (appDeviceTypeSlug === osDeviceTypeSlug) {
|
||||
return true;
|
||||
}
|
||||
const sdk = getBalenaSdk();
|
||||
const pineOptions = {
|
||||
$select: 'is_of__cpu_architecture',
|
||||
$expand: {
|
||||
is_of__cpu_architecture: {
|
||||
$select: 'slug',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
const [appDeviceType, osDeviceType] = await Promise.all(
|
||||
[appDeviceTypeSlug, osDeviceTypeSlug].map(
|
||||
(dtSlug) =>
|
||||
sdk.models.deviceType.get(dtSlug, pineOptions) as Promise<
|
||||
BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>
|
||||
>,
|
||||
),
|
||||
);
|
||||
return sdk.models.os.isArchitectureCompatibleWith(
|
||||
osDeviceType.is_of__cpu_architecture[0].slug,
|
||||
appDeviceType.is_of__cpu_architecture[0].slug,
|
||||
);
|
||||
};
|
||||
|
||||
export async function osProgressHandler(step: InitializeEmitter) {
|
||||
step.on('stdout', process.stdout.write.bind(process.stdout));
|
||||
|
@ -198,31 +198,37 @@ async function selectAppFromList(
|
||||
|
||||
async function getOrSelectApplication(
|
||||
sdk: BalenaSdk.BalenaSDK,
|
||||
deviceType: string,
|
||||
deviceTypeSlug: string,
|
||||
appName?: string,
|
||||
): Promise<ApplicationWithDeviceType> {
|
||||
const _ = await import('lodash');
|
||||
const pineOptions = {
|
||||
$select: 'slug',
|
||||
$expand: {
|
||||
is_of__cpu_architecture: {
|
||||
$select: 'slug',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
const [deviceType, allDeviceTypes] = await Promise.all([
|
||||
sdk.models.deviceType.get(deviceTypeSlug, pineOptions) as Promise<
|
||||
BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>
|
||||
>,
|
||||
sdk.models.deviceType.getAllSupported(pineOptions) as Promise<
|
||||
Array<BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>>
|
||||
>,
|
||||
]);
|
||||
|
||||
const allDeviceTypes = await sdk.models.config.getDeviceTypes();
|
||||
const deviceTypeManifest = _.find(allDeviceTypes, { slug: deviceType });
|
||||
if (!deviceTypeManifest) {
|
||||
throw new ExpectedError(`"${deviceType}" is not a valid device type`);
|
||||
}
|
||||
const compatibleDeviceTypes = _(allDeviceTypes)
|
||||
.filter(
|
||||
(dt) =>
|
||||
sdk.models.os.isArchitectureCompatibleWith(
|
||||
deviceTypeManifest.arch,
|
||||
dt.arch,
|
||||
) &&
|
||||
!!dt.isDependent === !!deviceTypeManifest.isDependent &&
|
||||
dt.state !== 'DISCONTINUED',
|
||||
const compatibleDeviceTypes = allDeviceTypes
|
||||
.filter((dt) =>
|
||||
sdk.models.os.isArchitectureCompatibleWith(
|
||||
deviceType.is_of__cpu_architecture[0].slug,
|
||||
dt.is_of__cpu_architecture[0].slug,
|
||||
),
|
||||
)
|
||||
.map((type) => type.slug)
|
||||
.value();
|
||||
.map((type) => type.slug);
|
||||
|
||||
if (!appName) {
|
||||
return createOrSelectApp(sdk, compatibleDeviceTypes, deviceType);
|
||||
return createOrSelectApp(sdk, compatibleDeviceTypes, deviceTypeSlug);
|
||||
}
|
||||
|
||||
const options: BalenaSdk.PineOptions<BalenaSdk.Application> = {
|
||||
@ -257,13 +263,13 @@ async function getOrSelectApplication(
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
return await createApplication(sdk, deviceType, name);
|
||||
return await createApplication(sdk, deviceTypeSlug, name);
|
||||
}
|
||||
|
||||
// We've found at least one fleet with the given name.
|
||||
// Filter out fleets for non-matching device types and see what we're left with.
|
||||
const validApplications = applications.filter((app) =>
|
||||
_.includes(compatibleDeviceTypes, app.is_for__device_type[0].slug),
|
||||
compatibleDeviceTypes.includes(app.is_for__device_type[0].slug),
|
||||
);
|
||||
|
||||
if (validApplications.length === 0) {
|
||||
|
65
npm-shrinkwrap.json
generated
65
npm-shrinkwrap.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "14.0.0",
|
||||
"version": "14.5.15",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -4000,9 +4000,9 @@
|
||||
}
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "16.22.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.22.0.tgz",
|
||||
"integrity": "sha512-HTEC8fYD0SZDlqgn0gcQ7EWliL9XIiGQ/P3f6xxvs4Nj0mG5wYtFrqK8dC6NAR0VQQxzWJtvM6iDFhshLIes7A==",
|
||||
"version": "16.28.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.28.0.tgz",
|
||||
"integrity": "sha512-pbpFavnCRxhWuXazKiJd9nKXi+ZbCEx87zbvCtgOxcSxf9ZkV1ypDUNSWsIjwjfp7Svyl/67OWYoQDwpMve1tg==",
|
||||
"requires": {
|
||||
"@balena/es-version": "^1.0.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
@ -4011,13 +4011,13 @@
|
||||
"balena-auth": "^4.1.0",
|
||||
"balena-errors": "^4.7.1",
|
||||
"balena-hup-action-utils": "~4.1.0",
|
||||
"balena-register-device": "^7.1.0",
|
||||
"balena-register-device": "^8.0.0",
|
||||
"balena-request": "^11.5.5",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^4.0.6",
|
||||
"date-fns": "^2.29.3",
|
||||
"lodash": "^4.17.21",
|
||||
"memoizee": "^0.4.15",
|
||||
"moment": "^2.29.1",
|
||||
"ndjson": "^2.0.0",
|
||||
"pinejs-client-core": "^6.9.6",
|
||||
"tslib": "^2.1.0"
|
||||
@ -4029,18 +4029,29 @@
|
||||
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
|
||||
},
|
||||
"balena-hup-action-utils": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.1.tgz",
|
||||
"integrity": "sha512-VpyH3py5NPMBJe1fwj5NFUeq58i2V5VaXU1EMa0ja/kUCUwTM1HL5nfNNOU3bd66V+VGqCw49iO7Wppccg3pPg==",
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz",
|
||||
"integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==",
|
||||
"requires": {
|
||||
"balena-semver": "^2.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"balena-register-device": {
|
||||
"version": "8.0.4",
|
||||
"resolved": "https://registry.npmjs.org/balena-register-device/-/balena-register-device-8.0.4.tgz",
|
||||
"integrity": "sha512-4ziyefKEkdrzerwrrdEGq3hvY8wbzm+0iH3F+ZJAIVgxpYELfudNXQj8GJXHWzclUNbdBun7G5yiYpmdLs5G+g==",
|
||||
"requires": {
|
||||
"@types/uuid": "^8.3.0",
|
||||
"tslib": "^2.2.0",
|
||||
"typed-error": "^3.2.1",
|
||||
"uuid": "^9.0.0"
|
||||
}
|
||||
},
|
||||
"balena-request": {
|
||||
"version": "11.5.5",
|
||||
"resolved": "https://registry.npmjs.org/balena-request/-/balena-request-11.5.5.tgz",
|
||||
"integrity": "sha512-sQG+OBAUKOW4KENPRGqit/34l3kWZqoT+aUdpitIG8QdKUrRjKQkjkCmDzprDEDJuXfWoCToKdleN9tYwRCXEw==",
|
||||
"version": "11.5.9",
|
||||
"resolved": "https://registry.npmjs.org/balena-request/-/balena-request-11.5.9.tgz",
|
||||
"integrity": "sha512-SOnqpdySUdFNO6MLv187Q64EgJjytLxfkpst8amiPYt6EA591U0DQiZwwkUwNl+cg+YvkytEBWRYcWOhoTFcrg==",
|
||||
"requires": {
|
||||
"@balena/node-web-streams": "^0.2.3",
|
||||
"balena-errors": "^4.7.1",
|
||||
@ -4051,10 +4062,20 @@
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"date-fns": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz",
|
||||
"integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA=="
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
|
||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
||||
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -12868,9 +12889,9 @@
|
||||
}
|
||||
},
|
||||
"parse-link-header": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz",
|
||||
"integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-2.0.0.tgz",
|
||||
"integrity": "sha512-xjU87V0VyHZybn2RrCX5TIFGxTVZE6zqqZWMPlIKiSKuWh/X5WZdt+w1Ki1nXB+8L/KtL+nZ4iq+sfI6MrhhMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"xtend": "~4.0.1"
|
||||
@ -15143,20 +15164,20 @@
|
||||
}
|
||||
},
|
||||
"simple-git": {
|
||||
"version": "2.48.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.48.0.tgz",
|
||||
"integrity": "sha512-z4qtrRuaAFJS4PUd0g+xy7aN4y+RvEt/QTJpR184lhJguBA1S/LsVlvE/CM95RsYMOFJG3NGGDjqFCzKU19S/A==",
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.14.1.tgz",
|
||||
"integrity": "sha512-1ThF4PamK9wBORVGMK9HK5si4zoGS2GpRO7tkAFObA4FZv6dKaCVHLQT+8zlgiBm6K2h+wEU9yOaFCu/SR3OyA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@kwsites/file-exists": "^1.1.1",
|
||||
"@kwsites/promise-deferred": "^1.1.1",
|
||||
"debug": "^4.3.2"
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
|
17
package.json
17
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "14.0.0",
|
||||
"version": "14.5.15",
|
||||
"description": "The official balena Command Line Interface",
|
||||
"main": "./build/app.js",
|
||||
"homepage": "https://github.com/balena-io/balena-cli",
|
||||
@ -90,12 +90,11 @@
|
||||
"author": "Balena Inc. (https://balena.io/)",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=12.8.0 <13.0.0",
|
||||
"npm": "<7.0.0"
|
||||
"node": ">=12 <16"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "node automation/check-npm-version.js && node automation/check-doc.js"
|
||||
"pre-commit": "node automation/check-npm-version.js && ts-node automation/check-doc.ts"
|
||||
}
|
||||
},
|
||||
"oclif": {
|
||||
@ -184,11 +183,11 @@
|
||||
"mocha": "^8.4.0",
|
||||
"mock-require": "^3.0.3",
|
||||
"nock": "^13.2.1",
|
||||
"parse-link-header": "^1.0.1",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"pkg": "^5.5.1",
|
||||
"publish-release": "^1.6.1",
|
||||
"rewire": "^5.0.0",
|
||||
"simple-git": "^2.48.0",
|
||||
"simple-git": "^3.14.1",
|
||||
"sinon": "^11.1.2",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "^4.6.4"
|
||||
@ -208,8 +207,8 @@
|
||||
"balena-errors": "^4.7.1",
|
||||
"balena-image-fs": "^7.0.6",
|
||||
"balena-image-manager": "^8.0.0",
|
||||
"balena-preload": "^12.1.0",
|
||||
"balena-sdk": "^16.22.0",
|
||||
"balena-preload": "^12.2.0",
|
||||
"balena-sdk": "^16.28.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^4.0.7",
|
||||
"balena-settings-storage": "^7.0.0",
|
||||
@ -285,6 +284,6 @@
|
||||
"windosu": "^0.3.0"
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2022-08-01T22:20:08.524Z"
|
||||
"publishedAt": "2022-12-12T13:41:12.779Z"
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ describe('balena devices supported', function () {
|
||||
|
||||
it('should list currently supported devices, with correct filtering', async () => {
|
||||
api.expectGetDeviceTypes();
|
||||
api.expectGetConfigDeviceTypes();
|
||||
|
||||
const { out, err } = await runCommand('devices supported');
|
||||
|
||||
@ -54,7 +53,7 @@ describe('balena devices supported', function () {
|
||||
expect(lines).to.have.lengthOf.at.least(2);
|
||||
expect(lines).to.contain('intel-nuc nuc amd64 Intel NUC');
|
||||
expect(lines).to.contain(
|
||||
'odroid-xu4 odroid-ux3, odroid-u3+ armv7hf ODROID-XU4',
|
||||
'odroid-xu4 odroid-u3+, odroid-ux3 armv7hf ODROID-XU4',
|
||||
);
|
||||
expect(err).to.eql([]);
|
||||
});
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user