Compare commits

...

30 Commits

Author SHA1 Message Date
61c7ee6239 wip 2024-03-08 18:10:28 -03:00
5371fea588 v18.0.2 2024-03-07 19:40:27 +00:00
bacb55a1ea Merge pull request #2735 from balena-io/removes-patches-windows
Removes no longer needed patch
2024-03-07 19:39:38 +00:00
ecfd4a260e Remove no longer needed windows oclif patches
Change-type: patch
2024-03-07 15:51:00 -03:00
1525822239 v18.0.1 2024-03-07 16:30:17 +00:00
1614d9b2c8 Merge pull request #2733 from balena-io/fix-windows-signing
Fix windows signing
2024-03-07 16:29:07 +00:00
2e061845ae Fix windows signing
Change-type: patch
2024-03-07 13:01:08 -03:00
9e4dd3fce2 v18.0.0 2024-02-06 12:19:41 +00:00
b2590136fc Merge pull request #2720 from balena-io/bump-node-20
Update to Node 20
2024-02-06 12:18:34 +00:00
bf5e61a61c Update to Node 20
Change-type: major
2024-02-05 18:29:02 -03:00
f550d0c596 v17.5.1 2024-01-31 01:05:23 +00:00
54302669b8 Merge pull request #2725 from balena-io/livepush-fix
Fix target state construction with livepush
2024-01-30 20:04:28 -05:00
a4a4e33d7b Dedupe dependencies 2024-01-30 11:17:21 -03:00
8d6a621bfb Fix target state construction with livepush
When constructing the target state after a reported change from livepush, the
handler function would not pass all build tasks to the function that
constructs the target state, causing a TypeError when trying to obtain
the target image name for each service. This updates the handler to pass
all build tasks, ensuring the information is available to construct the
target state.

Relates-to: #2724
Change-type: patch
2024-01-30 11:03:37 -03:00
4b2602676b v17.5.0 2024-01-23 15:52:54 +00:00
b0810c0f85 Merge pull request #2722 from balena-io/draft-hup
device os-update: Enable updates to pre-release versions of higher base semver
2024-01-23 17:51:54 +02:00
97a6013537 Deduplicate dependencies 2024-01-23 16:55:36 +02:00
1ba8db1459 os versions: Add the --include-draft option
Change-type: minor
2024-01-23 16:55:36 +02:00
cdada0aec8 device os-update: Add option for including pre-release versions in the list
Change-type: minor
2024-01-23 16:55:36 +02:00
1166533482 device os-update: Enable updates to pre-release versions of higher base semver
Change-type: minor
Depends-on: https://github.com/balena-io/balena-sdk/pull/1398
See: https://balena.fibery.io/Work/Task/cli-Enable-OS-Updates-to-pre-release-OS-versions-1751
2024-01-23 16:55:36 +02:00
01538728cd Update balena-sdk to 19.4.0
Update balena-sdk from 19.0.1 to 19.4.0

Change-type: minor
2024-01-23 16:55:36 +02:00
3a7f6d78b0 v17.4.12 2024-01-18 10:55:53 +00:00
dce48c90e9 Merge pull request #2719 from balena-io/revert_dockerode
Revert upgrade to dockerode to avoid regression
2024-01-18 05:54:22 -05:00
fe70d164c1 Deduplicate dependencies 2024-01-15 22:38:12 +00:00
09e2550b32 Regression described in GitHub Issue 2715; balena push hangs in
local mode.

Change-type: patch
Signed-off-by: Ken Bannister <kb2ma@runbox.com>
2024-01-15 22:05:05 +00:00
07854c3d42 v17.4.11 2024-01-05 23:01:11 +00:00
858a455501 Merge pull request #2717 from balena-io/update-oclif-patch
Mark the oclif package patch as a dev only one
2024-01-05 23:00:17 +00:00
4e5eb4bcee Exclude the oclif package patch from the published files
Change-type: patch
2024-01-06 00:25:56 +02:00
696bad3ed6 Update the @oclif/core patch
Change-type: patch
2024-01-06 00:25:34 +02:00
9a9d0f02ef Deduplicate dependencies 2024-01-06 00:25:34 +02:00
27 changed files with 4385 additions and 3475 deletions

View File

@ -18,7 +18,7 @@ inputs:
default: 'accounts+apple@balena.io'
NODE_VERSION:
type: string
default: '18.x'
default: '20.x'
VERBOSE:
type: string
default: 'true'
@ -69,18 +69,11 @@ runs:
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
Set-Content -Path ${{ runner.temp }}/certificate.base64 -Value $env:SM_CLIENT_CERT_FILE_B64
certutil -decode ${{ runner.temp }}/certificate.base64 ${{ runner.temp }}/Certificate_pkcs12.p12
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 }}
SM_CLIENT_CERT_FILE_B64: ${{ fromJSON(inputs.secrets).SM_CLIENT_CERT_FILE_B64 }}
# https://github.com/product-os/scripts/tree/master/shared
# https://github.com/product-os/balena-concourse/blob/master/pipelines/github-events/template.yml
@ -100,12 +93,21 @@ runs:
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'
SM_HOST=${{ fromJSON(inputs.secrets).SM_HOST }}
SM_API_KEY=${{ fromJSON(inputs.secrets).SM_API_KEY }}
SM_CLIENT_CERT_FILE='${{ runner.temp }}\Certificate_pkcs12.p12'
SM_CLIENT_CERT_PASSWORD=${{ fromJSON(inputs.secrets).SM_CLIENT_CERT_PASSWORD }}
SM_CODE_SIGNING_CERT_SHA1_HASH=${{ fromJSON(inputs.secrets).SM_CODE_SIGNING_CERT_SHA1_HASH }}
# patches/all/oclif.patch
MSYSSHELLPATH="$(which bash)"
MSYSTEM=MSYS
curl --silent --retry 3 --fail https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download \
-H "x-api-key:$SM_API_KEY" \
-o smtools-windows-x64.msi
msiexec -i smtools-windows-x64.msi -qn
PATH="/c/Program Files/DigiCert/DigiCert One Signing Manager Tools:${PATH}"
smksp_registrar.exe list
smctl.exe keypair ls
/c/Windows/System32/certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
smksp_cert_sync.exe
# (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}"
@ -119,8 +121,8 @@ runs:
# 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
# https://docs.digicert.com/es/software-trust-manager/ci-cd-integrations/plugins/github-custom-action-for-keypair-signing.html
TIMESTAMP_SERVER: http://timestamp.digicert.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 }}

View File

@ -15,7 +15,7 @@ inputs:
# --- custom environment
NODE_VERSION:
type: string
default: '18.x'
default: '20.x'
VERBOSE:
type: string
default: "true"

View File

@ -1,3 +1,370 @@
- commits:
- subject: Remove no longer needed windows oclif patches
hash: ecfd4a260e4734c768480b98d05cee08f366a672
body: ""
footer:
Change-type: patch
change-type: patch
author: Otavio Jacobi
nested: []
version: 18.0.2
title: ""
date: 2024-03-07T19:40:22.571Z
- commits:
- subject: Fix windows signing
hash: 2e061845ae01fd6d3aa10c97bf8a68a8dba5dfd9
body: ""
footer:
Change-type: patch
change-type: patch
author: Otavio Jacobi
nested: []
version: 18.0.1
title: ""
date: 2024-03-07T16:30:09.344Z
- commits:
- subject: Update to Node 20
hash: bf5e61a61c542f0c0a57ae49bb9a9998588d6851
body: ""
footer:
Change-type: major
change-type: major
author: Otávio Jacobi
nested: []
version: 18.0.0
title: ""
date: 2024-02-06T12:19:35.139Z
- commits:
- subject: Fix target state construction with livepush
hash: 8d6a621bfb62147ed0a88f58057e38211e82f841
body: >
When constructing the target state after a reported change from
livepush, the
handler function would not pass all build tasks to the function that
constructs the target state, causing a TypeError when trying to obtain
the target image name for each service. This updates the handler to pass
all build tasks, ensuring the information is available to construct the
target state.
footer:
Relates-to: "#2724"
relates-to: "#2724"
Change-type: patch
change-type: patch
author: Felipe Lalanne
nested: []
version: 17.5.1
title: ""
date: 2024-01-31T01:05:17.796Z
- commits:
- subject: "os versions: Add the --include-draft option"
hash: 1ba8db1459355f6a5887f9106876318bd81f7f02
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
- subject: "device os-update: Add option for including pre-release versions in the
list"
hash: cdada0aec8e8f7a6c72d629dfa7a36f5d56b1b0d
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
- subject: "device os-update: Enable updates to pre-release versions of higher
base semver"
hash: 116653348219f9ce8fd896428d690940350f2597
body: ""
footer:
Change-type: minor
change-type: minor
Depends-on: https://github.com/balena-io/balena-sdk/pull/1398
depends-on: https://github.com/balena-io/balena-sdk/pull/1398
See: https://balena.fibery.io/Work/Task/cli-Enable-OS-Updates-to-pre-release-OS-versions-1751
see: https://balena.fibery.io/Work/Task/cli-Enable-OS-Updates-to-pre-release-OS-versions-1751
author: Thodoris Greasidis
nested: []
- subject: Update balena-sdk to 19.4.0
hash: 01538728cd4a0ad512b45c062b4d45f6d1f664e7
body: |
Update balena-sdk from 19.0.1 to 19.4.0
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested:
- commits:
- subject: Update the deviceType.getInstructions tests
hash: 3fd5f7d88c6fd335e8ada5c9efd64ddd14c9a992
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: "os.getSupportedOsUpdateVersions: Add the option to include draft
releases"
hash: 87b3187274a5f417ab82855029f517dc99a2f503
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
- subject: Enable OS Updates to pre-release versions of higher base semver
hash: 38360a84d29f316d3619d3b899538ccdf71635fc
body: |
Update balena-hup-action-utils from 5.0.0 to 6.1.0
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested:
- commits:
- subject: Enable OS Updates to pre-release versions of higher base semver
hash: 1b3e83b9519157be1ca9ba7756bba87a08bea04a
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
version: balena-hup-action-utils-6.1.0
title: ""
date: 2024-01-04T13:32:14.391Z
- commits:
- subject: Drop support for TypeScript < 5.3.3
hash: 7c3430280b47ea9a17f7bb94df068f2a46bfa975
body: ""
footer:
Change-type: major
change-type: major
author: Thodoris Greasidis
nested: []
- subject: Drop support for node < v18
hash: b1eb6844578bff03c05c19bbf6436526a69a8b30
body: ""
footer:
Change-type: major
change-type: major
author: Thodoris Greasidis
nested: []
- subject: Update dependencies
hash: 7413837d3aed9aa54ec5d1e218647f543308b298
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: Move the build step from prepare to prepack
hash: c4480c214c79f4e07cf3b65944b83d11c9c2e267
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: balena-hup-action-utils-6.0.0
title: ""
date: 2023-12-20T13:33:03.867Z
- commits:
- subject: "patch: Update flowzone.yml"
hash: 41a90775219e1b7b144069aea545f8f2141c88f7
body: ""
footer: {}
author: Kyle Harding
nested: []
version: balena-hup-action-utils-5.0.1
title: ""
date: 2023-07-13T19:00:55.217Z
- subject: "os.getAvailableOsVersions: Add the option to include draft releases"
hash: b8e795ac01e2e05c6484cfd492ea9dfd5f16f142
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.4.0
title: ""
date: 2024-01-23T14:37:21.759Z
- commits:
- subject: Update date-fns to v3
hash: f027a467b4fe45884650d2d8c56ce3a361842a6b
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.3.5
title: ""
date: 2023-12-21T13:16:48.448Z
- commits:
- subject: "types/Device: Deprecate the non-existent vpn_address property"
hash: 0a9d79b71f7c97813831649d18a4bc1703d71307
body: ""
footer:
Change-type: patch
change-type: patch
author: Otávio Jacobi
nested: []
version: balena-sdk-19.3.4
title: ""
date: 2023-12-15T13:34:05.193Z
- commits:
- subject: "types/Device: Deprecate the non-existent state & status_sort_index
properties"
hash: 7013d15352906ae815f5cd630086222f5c9853df
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.3.3
title: ""
date: 2023-12-15T12:02:22.609Z
- commits:
- subject: "test:fast: Run the tests ignoring any linting errors"
hash: 59811c2f19a2044b4a1a0d1068ba90ee1587f9a3
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: "tests: Re-enable the explicit error checks for non-tarball DWB
requests"
hash: cb7c1a2d842e53255975a91457da00bd7070d8f7
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.3.2
title: ""
date: 2023-12-08T15:49:54.842Z
- commits:
- subject: Update TypeScript to 5.3.2
hash: d66ee5c290df275e18bbdcf8bd5cf9475e6db768
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.3.1
title: ""
date: 2023-11-30T15:10:55.747Z
- commits:
- subject: "tests: Remove the explicit error checks for non-tarball DWB requests"
hash: 0ca96b7440af76a1b7c52899d880dc817cf69278
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: "tests: Properly cleanup the test orgs"
hash: 431acbfa773b271b614c619595abc61f3c6e791c
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: "tests: Reduce the request batching chunk size to speed up tests"
hash: d3397cb6fdf6fd7edb4247d0d5980086e9338c1d
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: Add option for configuring the request batching chunk size
hash: 94e5d7816ac813e9b8468b73e3d365f735182f4b
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.3.0
title: ""
date: 2023-11-30T13:54:32.874Z
- commits:
- subject: Add organization logo to organization
hash: 251e835ad6fe778024bbe358fa70aa73c8e250b8
body: ""
footer:
Change-type: minor
change-type: minor
author: Otávio Jacobi
nested: []
version: balena-sdk-19.2.0
title: ""
date: 2023-11-13T11:20:58.418Z
- commits:
- subject: Add the retryRateLimitedRequests sdk option for retrying after HTTP
429s
hash: 25e83b67f6f7c3f20982c97d4e561dd81c37a672
body: ""
footer:
Change-type: minor
change-type: minor
author: Thodoris Greasidis
nested: []
version: balena-sdk-19.1.0
title: ""
date: 2023-11-06T13:49:10.660Z
version: 17.5.0
title: ""
date: 2024-01-23T15:52:49.156Z
- commits:
- subject: Regression described in GitHub Issue 2715; balena push hangs in local
mode.
hash: 09e2550b32f628f8e5b5cb8be0cafe4b40c7ce10
body: ""
footer:
Change-type: patch
change-type: patch
Signed-off-by: Ken Bannister <kb2ma@runbox.com>
signed-off-by: Ken Bannister <kb2ma@runbox.com>
author: Ken Bannister
nested: []
version: 17.4.12
title: ""
date: 2024-01-18T10:55:45.599Z
- commits:
- subject: Exclude the oclif package patch from the published files
hash: 4e5eb4bcee8e33a1aac337401c0180817e152b69
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
- subject: Update the @oclif/core patch
hash: 696bad3ed6f27832bf10f096c088367a57902920
body: ""
footer:
Change-type: patch
change-type: patch
author: Thodoris Greasidis
nested: []
version: 17.4.11
title: ""
date: 2024-01-05T23:01:07.859Z
- commits:
- subject: Normalize v prefixes in the --version parameter of all commands
hash: b7b01ecd5314bddae73b7b062f9d034b3661bcef
@ -706,9 +1073,11 @@
Bumps [lint-staged](https://github.com/okonet/lint-staged) from
13.3.0 to 14.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Release
notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
-
[Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
---
@ -1048,9 +1417,11 @@
[lint-staged](https://github.com/okonet/lint-staged)
from 13.3.0 to 14.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Release
notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
-
[Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
---
@ -1425,9 +1796,11 @@
[lint-staged](https://github.com/okonet/lint-staged)
from 13.3.0 to 14.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Release
notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
-
[Commits](https://github.com/okonet/lint-staged/compare/v13.3.0...v14.0.0)
---
@ -2626,7 +2999,8 @@
Be more lenient with decoding compressed
responses, since (very rarely)
servers send slightly invalid gzip responses that are still accepted
servers send slightly invalid gzip responses
that are still accepted
by common browsers.
@ -2646,7 +3020,8 @@
body: >
The only breaking change is dropping support
for node v8 but we have already done that in v11.
for node v8 but we have already done that in
v11.
footer:
Change-type: minor
change-type: minor
@ -2675,7 +3050,8 @@
body: >
Otherwise request from the browser could end up
on the domain of the current url. For the dashboard
on the domain of the current url. For the
dashboard
this would mean the UI nginx would respond with
@ -3953,7 +4329,8 @@
Be more lenient with decoding compressed
responses, since (very rarely)
servers send slightly invalid gzip responses that are still accepted
servers send slightly invalid gzip responses
that are still accepted
by common browsers.
@ -3973,7 +4350,8 @@
body: >
The only breaking change is dropping support
for node v8 but we have already done that in v11.
for node v8 but we have already done that in
v11.
footer:
Change-type: minor
change-type: minor
@ -4002,7 +4380,8 @@
body: >
Otherwise request from the browser could end up
on the domain of the current url. For the dashboard
on the domain of the current url. For the
dashboard
this would mean the UI nginx would respond with
@ -5223,7 +5602,8 @@
Be more lenient with decoding compressed responses,
since (very rarely)
servers send slightly invalid gzip responses that are still accepted
servers send slightly invalid gzip responses that are
still accepted
by common browsers.
@ -7059,7 +7439,9 @@
```
Error: Could not detect abi for version 16.13.0 and runtime node. Updating "node-abi" might help solve this issue if it is a new release of node
Error: Could not detect abi for version 16.13.0 and runtime
node. Updating "node-abi" might help solve this issue if it is a new
release of node
```
footer:
@ -7195,7 +7577,8 @@
- getAllByApplication
Changelog-entry: Enable audit logging and reviewing device changes. The SDK defaults to fetch last 7 days of history
Changelog-entry: Enable audit logging and reviewing device
changes. The SDK defaults to fetch last 7 days of history
footer:
Change-type: minor
change-type: minor
@ -7393,7 +7776,8 @@
This is part of the work for enabling the creation of
configuration
variables with a colon character as a means to allow Raspberry PI users
variables with a colon character as a means to allow Raspberry
PI users
to enable the second HDMI port on RPI4 and others.
footer:
@ -7553,11 +7937,14 @@
[catch-uncommitted](https://github.com/resin-io-modules/catch-uncommitted)
from 1.6.2 to 2.0.0.
- [Release notes](https://github.com/resin-io-modules/catch-uncommitted/releases)
- [Release
notes](https://github.com/resin-io-modules/catch-uncommitted/releases)
- [Changelog](https://github.com/balena-io-modules/catch-uncommitted/blob/master/CHANGELOG.md)
-
[Changelog](https://github.com/balena-io-modules/catch-uncommitted/blob/master/CHANGELOG.md)
- [Commits](https://github.com/resin-io-modules/catch-uncommitted/compare/v1.6.2...v2.0.0)
-
[Commits](https://github.com/resin-io-modules/catch-uncommitted/compare/v1.6.2...v2.0.0)
---
@ -8428,9 +8815,11 @@
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)
- [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)
-
[Commits](https://github.com/thlorenz/parse-link-header/compare/v1.0.1...v2.0.0)
---
@ -9380,11 +9769,14 @@
Bumps [browserify](https://github.com/browserify/browserify)
from 14.5.0 to 17.0.0.
- [Release notes](https://github.com/browserify/browserify/releases)
- [Release
notes](https://github.com/browserify/browserify/releases)
- [Changelog](https://github.com/browserify/browserify/blob/master/changelog.markdown)
-
[Changelog](https://github.com/browserify/browserify/blob/master/changelog.markdown)
- [Commits](https://github.com/browserify/browserify/compare/14.5.0...v17.0.0)
-
[Commits](https://github.com/browserify/browserify/compare/14.5.0...v17.0.0)
---
@ -9412,9 +9804,11 @@
- [Release notes](https://github.com/raszi/node-tmp/releases)
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
-
[Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.0.31...v0.2.1)
-
[Commits](https://github.com/raszi/node-tmp/compare/v0.0.31...v0.2.1)
---
@ -9496,9 +9890,11 @@
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
-
[Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v3.5.3...v10.0.0)
-
[Commits](https://github.com/mochajs/mocha/compare/v3.5.3...v10.0.0)
---
@ -9538,9 +9934,11 @@
Bumps [mockttp](https://github.com/httptoolkit/mockttp) from
0.9.1 to 2.7.0.
- [Release notes](https://github.com/httptoolkit/mockttp/releases)
- [Release
notes](https://github.com/httptoolkit/mockttp/releases)
- [Commits](https://github.com/httptoolkit/mockttp/compare/v0.9.1...v2.7.0)
-
[Commits](https://github.com/httptoolkit/mockttp/compare/v0.9.1...v2.7.0)
---
@ -9612,9 +10010,11 @@
Bumps [superagent](https://github.com/visionmedia/superagent)
from 3.8.3 to 7.1.2.
- [Release notes](https://github.com/visionmedia/superagent/releases)
- [Release
notes](https://github.com/visionmedia/superagent/releases)
- [Changelog](https://github.com/visionmedia/superagent/blob/master/HISTORY.md)
-
[Changelog](https://github.com/visionmedia/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/visionmedia/superagent/commits)
@ -9644,9 +10044,11 @@
- [Release notes](https://github.com/motdotla/dotenv/releases)
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
-
[Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v4.0.0...v16.0.0)
-
[Commits](https://github.com/motdotla/dotenv/compare/v4.0.0...v16.0.0)
---
@ -10241,9 +10643,11 @@
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
atomic way. This commit adds the `DockerProgres.build()` method
to
build an image from a remote (or local) source and track the progress of
build an image from a remote (or local) source and track the
progress of
the build.
footer:
@ -10274,7 +10678,8 @@
body: >
Starting in balenaOS v2.93.0 the supervisor images are tagged
as balena_supervisor after being pulled from the balena registry.
as balena_supervisor after being pulled from the balena
registry.
footer:
Change-type: patch
change-type: patch
@ -11331,7 +11736,8 @@
Be more lenient with decoding compressed
responses, since (very rarely)
servers send slightly invalid gzip responses that are still accepted
servers send slightly invalid gzip responses
that are still accepted
by common browsers.
@ -13005,7 +13411,8 @@
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.
`klaw` to `recursive-fs` and not running `lstat` on files that are
ignored.
Whilst testing with the Jellyfish repository, which contains a number of
@ -13030,9 +13437,11 @@
Fixes #2394
When pushing to a device in local mode, if a service is not external, and uses
When pushing to a device in local mode, if a service is not external,
and uses
an `image` field, that value should be used for tags and target state, otherwise
an `image` field, that value should be used for tags and target state,
otherwise
it won't match the image name generated on the device by balenaEngine.
footer:
@ -13210,7 +13619,11 @@
https://github.com/compose-spec/compose-spec/blob/43f6537b2c8f01b6d3f0e184d13a0f3cb93d38d7/spec.md#fragments
Removing the FAILSAFE_SCHEMA flag is not expected to break existing project files, since the default behaviour is more liberal, or cause problems down the road given we perform validation immediately after. Docs for the flag: https://github.com/nodeca/js-yaml#load-string---options-
Removing the FAILSAFE_SCHEMA flag is not expected to break existing
project files, since the default behaviour is more liberal, or cause
problems down the road given we perform validation immediately after.
Docs for the flag:
https://github.com/nodeca/js-yaml#load-string---options-
footer:
Change-type: minor
change-type: minor
@ -13517,7 +13930,8 @@
Be more lenient with decoding compressed responses,
since (very rarely)
servers send slightly invalid gzip responses that are still accepted
servers send slightly invalid gzip responses that are
still accepted
by common browsers.
@ -13816,7 +14230,8 @@
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.
and is part of the larger feature to use the builder as part of a CI/CD
pipeline.
footer:
Change-type: minor
change-type: minor
@ -14267,7 +14682,8 @@
body: >
This change will allow to build releases as draft and have them being
set as final at a later stage. This change is part of a larger feature towards
set as final at a later stage. This change is part of a larger feature
towards
using the builder as part of CI/CD pipelines.
footer:
@ -14748,7 +15164,8 @@
body: >
When using deploy to create a release for a multi-container project one
needs to follow this to avoid triggering a build. Relevant for CI/CD scenarios
needs to follow this to avoid triggering a build. Relevant for CI/CD
scenarios
with their own build pipeline.
footer:
@ -14790,7 +15207,8 @@
users to configure the image with system connection settings.
This change affects both the `balena local configure` and `balena os configure` commands.
This change affects both the `balena local configure` and `balena os
configure` commands.
footer:
Change-type: patch
change-type: patch
@ -15187,10 +15605,12 @@
The `local` logging driver captures output from containers
stdout/stderr
and writes them to an internal storage that is optimized for performance and disk use.
and writes them to an internal storage that is optimized for performance
and disk use.
We also want to capture these logs on startup to wait for success/failure.
We also want to capture these logs on startup to wait for
success/failure.
Advise the use of `--privileged` when running Docker-in-Docker to avoid
@ -15629,7 +16049,8 @@
body: >
10.4.0 improves image size estimation
10.4.1 prevents running out of space while pulling images because of temporary files
10.4.1 prevents running out of space while pulling images because of
temporary files
footer:
Change-type: patch
change-type: patch
@ -24008,7 +24429,8 @@
This fixes a build error caused by a recent version bump of
'patch-package':
"Patch file found for package execa which is not present at node_modules/qqjs/node_modules/execa"
"Patch file found for package execa which is not present at
node_modules/qqjs/node_modules/execa"
footer:
Change-type: patch
change-type: patch
@ -24293,7 +24715,8 @@
any balenaOS devices' message - if the OS is Windows.
Also updated the INSTALL instructions with details of the dependency on Bonjour.
Also updated the INSTALL instructions with details of the dependency on
Bonjour.
footer:
Change-type: patch
change-type: patch
@ -25179,11 +25602,17 @@
body: >
The full warning output was:
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 drain listeners added. Use emitter.setMaxListeners()
to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners()
to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 close listeners added. Use emitter.setMaxListeners()
to increase limit
footer:
Change-type: patch
change-type: patch
@ -25285,13 +25714,17 @@
E.g. "balena build -e -h <IP> -p 2375" with the CLI running on a Mac
laptop,
using balenaEngine on an Intel NUC device, building an image for the RPi (ARM
using balenaEngine on an Intel NUC device, building an image for the RPi
(ARM
image arch). Previously, QEMU setup by the CLI assumed that docker ran on the
image arch). Previously, QEMU setup by the CLI assumed that docker ran
on the
same OS as the CLI (Docker for Mac has built-in binfmt_misc support and does
same OS as the CLI (Docker for Mac has built-in binfmt_misc support and
does
not require additional setup, but balenaEngine on Linux requires explicit QEMU
not require additional setup, but balenaEngine on Linux requires
explicit QEMU
setup.)
footer:
@ -25382,7 +25815,8 @@
Fixes #1380
Argument parsing of "env rm" command was improved by migrating it to oclif
Argument parsing of "env rm" command was improved by migrating it to
oclif
footer:
Change-type: patch
change-type: patch
@ -25410,16 +25844,24 @@
```
lib/actions-oclif/env/add.ts(73,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags'. This is likely not portable. A type annotation is necessary.
lib/actions-oclif/env/add.ts(73,16): error TS2742: The inferred type of
'flags' cannot be named without a reference to
'../../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags'.
This is likely not portable. A type annotation is necessary.
lib/actions-oclif/version.ts(42,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags.js'. This is likely not portable. A type annotation is necessary.
lib/actions-oclif/version.ts(42,16): error TS2742: The inferred type of
'flags' cannot be named without a reference to
'../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags.js'.
This is likely not portable. A type annotation is necessary.
```
This appears to be reported on the Typescript repo here https://github.com/microsoft/TypeScript/issues/29221
This appears to be reported on the Typescript repo here
https://github.com/microsoft/TypeScript/issues/29221
The suggested workaround is to explicitly set the type of the `flags` static
The suggested workaround is to explicitly set the type of the `flags`
static
property.
footer:
@ -26474,7 +26916,8 @@
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/
Task changes as described at
https://fettblog.eu/gulp-4-parallel-and-series/
footers:
change-type: patch
signed-off-by: Gergely Imreh <gergely@balena.io>
@ -27381,7 +27824,11 @@
for is to determine whether the command should issue a legacy user API
key or a provisioning key.
This makes version optional but tries to figure it out by itself by reading os-release from the image's boot partition. This is not foul-proof however, and while it'll work with most recent images it won't work with all and in that case it'll bail out and only then warn the user to specify it via the --version argument.
This makes version optional but tries to figure it out by itself by
reading os-release from the image's boot partition. This is not
foul-proof however, and while it'll work with most recent images it
won't work with all and in that case it'll bail out and only then warn
the user to specify it via the --version argument.
footers:
change-type: minor
hash: 8291c96e69407a4c691a35c27ff3cd406794e946
@ -28021,9 +28468,21 @@
compatibility merely by looking for the `os-config` executable in the
device, and bail out if its 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 theyre not logged in already without exiting the wizard.
`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 theyre not
logged in already without exiting the wizard.
`resin-sync` (that's used internally to discover local devices) requires admin privileges. If no device has been specified as an argument, the commands will launch the device scanning process in a privileged subprocess via two new internal commands: `internal sudo` and `internal scanDevices`. This avoids having the user to invoke the commands with sudo and only request escalation if truly needed. This commit also removes the dependency to “president”, implementing “sudo” functionality within the CLI.
`resin-sync` (that's used internally to discover local devices) requires
admin privileges. If no device has been specified as an argument, the
commands will launch the device scanning process in a privileged
subprocess via two new internal commands: `internal sudo` and `internal
scanDevices`. This avoids having the user to invoke the commands with
sudo and only request escalation if truly needed. This commit also
removes the dependency to “president”, implementing “sudo” functionality
within the CLI.
footers:
change-type: minor
hash: 5cbe1c410f7081ff78b41e8a6d9c0f06ad92934e
@ -28492,7 +28951,8 @@
image tars via the builder. Its needed for users to avoid having to
switch between CLI versions in order to push to legacy apps as well.
Note: this pins resin-sdk to 9.0.0-beta14 as I couldnt get it to install otherwise — npm would always install 9.0.0-beta9 instead.
Note: this pins resin-sdk to 9.0.0-beta14 as I couldnt get it to
install otherwise — npm would always install 9.0.0-beta9 instead.
footers:
change-type: minor
hash: 62f006b89ab0fa8a1575f213579910f732f17c0f
@ -28622,7 +29082,8 @@
* all 'resin-sdk' requires replaced with 'resin-sdk-preconfigured'
* resin-sdk-preconfigured TS typings are copy pasted from the current resin-sdk master
* resin-sdk-preconfigured TS typings are copy pasted from the current
resin-sdk master
The idea is to progressively replace all 'resin-sdk-preconfigured'
@ -28672,7 +29133,10 @@
body: >-
New version is 3.1.0.
The updated version is not backwards compatible as it removes all *Async methods that are in wide use in the CLI. The workaround for now is to manually promisify the client and replace all `new Docker()` calls with a shared function that returns a promisified client.
The updated version is not backwards compatible as it removes all *Async
methods that are in wide use in the CLI. The workaround for now is to
manually promisify the client and replace all `new Docker()` calls with
a shared function that returns a promisified client.
hash: 299bc0db132e5b04894b6b955aa469666a66ce8c
subject: Update docker-toolbelt
- author: Akis Kesoglou
@ -28697,9 +29161,11 @@
- Adds a utility file to retrieve the CLI version and its parts
- Adds a helper that can be used to manipulate display on capable clients
- Adds a helper that can be used to manipulate display on capable
clients
- Declares several new dependencies. Most are already indirectly installed via some dependency
- Declares several new dependencies. Most are already indirectly
installed via some dependency
footers:
change-type: minor
hash: 14a3f51b730b12ad66462342888fb2b4bcf1f1ea

View File

@ -4,6 +4,107 @@ 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/).
## 18.0.2 - 2024-03-07
* Remove no longer needed windows oclif patches [Otavio Jacobi]
## 18.0.1 - 2024-03-07
* Fix windows signing [Otavio Jacobi]
## 18.0.0 - 2024-02-06
* Update to Node 20 [Otávio Jacobi]
## 17.5.1 - 2024-01-31
* Fix target state construction with livepush [Felipe Lalanne]
## 17.5.0 - 2024-01-23
* os versions: Add the --include-draft option [Thodoris Greasidis]
* device os-update: Add option for including pre-release versions in the list [Thodoris Greasidis]
* device os-update: Enable updates to pre-release versions of higher base semver [Thodoris Greasidis]
<details>
<summary> Update balena-sdk to 19.4.0 [Thodoris Greasidis] </summary>
> ### balena-sdk-19.4.0 - 2024-01-23
>
> * Update the deviceType.getInstructions tests [Thodoris Greasidis]
> * os.getSupportedOsUpdateVersions: Add the option to include draft releases [Thodoris Greasidis]
>
> <details>
> <summary> Enable OS Updates to pre-release versions of higher base semver [Thodoris Greasidis] </summary>
>
>> #### balena-hup-action-utils-6.1.0 - 2024-01-04
>>
>> * Enable OS Updates to pre-release versions of higher base semver [Thodoris Greasidis]
>>
>> #### balena-hup-action-utils-6.0.0 - 2023-12-20
>>
>> * Drop support for TypeScript < 5.3.3 [Thodoris Greasidis]
>> * Drop support for node < v18 [Thodoris Greasidis]
>> * Update dependencies [Thodoris Greasidis]
>> * Move the build step from prepare to prepack [Thodoris Greasidis]
>>
>> #### balena-hup-action-utils-5.0.1 - 2023-07-13
>>
>> * patch: Update flowzone.yml [Kyle Harding]
>>
>
> </details>
>
> * os.getAvailableOsVersions: Add the option to include draft releases [Thodoris Greasidis]
>
> ### balena-sdk-19.3.5 - 2023-12-21
>
> * Update date-fns to v3 [Thodoris Greasidis]
>
> ### balena-sdk-19.3.4 - 2023-12-15
>
> * types/Device: Deprecate the non-existent vpn_address property [Otávio Jacobi]
>
> ### balena-sdk-19.3.3 - 2023-12-15
>
> * types/Device: Deprecate the non-existent state & status_sort_index properties [Thodoris Greasidis]
>
> ### balena-sdk-19.3.2 - 2023-12-08
>
> * test:fast: Run the tests ignoring any linting errors [Thodoris Greasidis]
> * tests: Re-enable the explicit error checks for non-tarball DWB requests [Thodoris Greasidis]
>
> ### balena-sdk-19.3.1 - Invalid date
>
> * Update TypeScript to 5.3.2 [Thodoris Greasidis]
>
> ### balena-sdk-19.3.0 - Invalid date
>
> * tests: Remove the explicit error checks for non-tarball DWB requests [Thodoris Greasidis]
> * tests: Properly cleanup the test orgs [Thodoris Greasidis]
> * tests: Reduce the request batching chunk size to speed up tests [Thodoris Greasidis]
> * Add option for configuring the request batching chunk size [Thodoris Greasidis]
>
> ### balena-sdk-19.2.0 - 2023-11-13
>
> * Add organization logo to organization [Otávio Jacobi]
>
> ### balena-sdk-19.1.0 - 2023-11-06
>
> * Add the retryRateLimitedRequests sdk option for retrying after HTTP 429s [Thodoris Greasidis]
>
</details>
## 17.4.12 - 2024-01-18
* Regression described in GitHub Issue 2715; balena push hangs in local mode. [Ken Bannister]
## 17.4.11 - 2024-01-05
* Exclude the oclif package patch from the published files [Thodoris Greasidis]
* Update the @oclif/core patch [Thodoris Greasidis]
## 17.4.10 - 2024-01-02
* Normalize v prefixes in the --version parameter of all commands [Thodoris Greasidis]

View File

@ -78,8 +78,8 @@ If you are a Node.js developer, you may wish to install the balena CLI via [npm]
The npm installation involves building native (platform-specific) binary modules, which require
some development tools to be installed first, as follows.
> **The balena CLI currently requires Node.js version 18.**
> **Versions 19 and later are not yet fully supported.**
> **The balena CLI currently requires Node.js version 20.**
> **Versions 21 and later are not yet fully supported.**
### Install development tools
@ -89,7 +89,7 @@ some development tools to be installed first, as follows.
$ sudo apt-get update && sudo apt-get -y install curl python3 git make g++
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 18
$ nvm install 20
```
The `curl` command line above uses
@ -106,7 +106,7 @@ recommended.
```sh
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 18
$ nvm install 20
```
#### **Windows** (not WSL)
@ -114,7 +114,7 @@ $ nvm install 18
Install:
* If you'd like the ability to switch between Node.js versions, install
- Node.js v18 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
- Node.js v20 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
[nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows)
instead.
* The [MSYS2 shell](https://www.msys2.org/), which provides `git`, `make`, `g++` and more:

View File

@ -155,7 +155,7 @@ ${sep}
* messages (stdout and stderr) in order to call diffPkgOutput().
*/
async function execPkg(...args: any[]) {
const { exec: pkgExec } = await import('pkg');
const { exec: pkgExec } = await import('@yao-pkg/pkg');
const outTap = new StdOutTap(true);
try {
outTap.tap();
@ -435,18 +435,20 @@ async function renameInstallerFiles() {
* https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
*/
async function signWindowsInstaller() {
if (process.env.CSC_LINK && process.env.CSC_KEY_PASSWORD) {
if (process.env.SM_CODE_SIGNING_CERT_SHA1_HASH) {
const exeName = renamedOclifInstallers[process.platform];
console.log(`Signing installer "${exeName}"`);
// trust ...
await execFileAsync('signtool.exe', [
'sign',
'-t',
'-sha1',
process.env.SM_CODE_SIGNING_CERT_SHA1_HASH,
'-tr',
process.env.TIMESTAMP_SERVER || 'http://timestamp.comodoca.com',
'-f',
process.env.CSC_LINK,
'-p',
process.env.CSC_KEY_PASSWORD,
'-td',
'SHA256',
'-fd',
'SHA256',
'-d',
`balena-cli ${version}`,
exeName,

View File

@ -1454,6 +1454,7 @@ 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
$ balena device os-update 23c73a1 --include-draft
### Arguments
@ -1467,6 +1468,10 @@ the uuid of the device to update
a balenaOS version
#### --include-draft
include pre-release balenaOS versions
#### -y, --yes
answer "yes" to all questions (non interactive use)
@ -2723,6 +2728,10 @@ device type
select balenaOS ESR versions
#### --include-draft
include pre-release balenaOS versions
## os download &#60;type&#62;
Download an unconfigured OS image for the specified device type.

View File

@ -37,6 +37,7 @@ export default class DeviceOsUpdateCmd extends Command {
'$ 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',
'$ balena device os-update 23c73a1 --include-draft',
];
public static args = {
@ -51,6 +52,12 @@ export default class DeviceOsUpdateCmd extends Command {
public static flags = {
version: Flags.string({
description: 'a balenaOS version',
exclusive: ['include-draft'],
}),
'include-draft': Flags.boolean({
description: 'include pre-release balenaOS versions',
default: false,
exclusive: ['version'],
}),
yes: cf.yes,
help: cf.help,
@ -86,10 +93,25 @@ export default class DeviceOsUpdateCmd extends Command {
);
}
let includeDraft = options['include-draft'];
if (!includeDraft && options.version != null) {
const bSemver = await import('balena-semver');
const parsedVersion = bSemver.parse(options.version);
// When the user provides a draft version, we need to pass `includeDraft`
// to the os.getSupportedOsUpdateVersions() since w/o it the results
// will for sure not include the user provided version and the command
// would return a "not in the Host OS update targets" error.
includeDraft =
parsedVersion != null && parsedVersion.prerelease.length > 0;
}
// Get supported OS update versions
const hupVersionInfo = await sdk.models.os.getSupportedOsUpdateVersions(
is_of__device_type[0].slug,
currentOsVersion,
{
includeDraft,
},
);
if (hupVersionInfo.versions.length === 0) {
throw new ExpectedError(

View File

@ -1,74 +0,0 @@
/**
* @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 { Args } from '@oclif/core';
import Command from '../../command';
import { stripIndent } from '../../utils/lazy';
import { CommandHelp } from '../../utils/oclif-utils';
// 'Internal' commands are called during the execution of other commands.
// `osinit` is called during `os initialize`
// TODO: These should be refactored to modules/functions, and removed
// See previous `internal sudo` refactor:
// - https://github.com/balena-io/balena-cli/pull/1455/files
// - https://github.com/balena-io/balena-cli/pull/1455#discussion_r334308357
// - https://github.com/balena-io/balena-cli/pull/1455#discussion_r334308526
export default class OsinitCmd extends Command {
public static description = stripIndent`
Do actual init of the device with the preconfigured os image.
Don't use this command directly!
Use \`balena os initialize <image>\` instead.
`;
public static args = {
image: Args.string({
required: true,
}),
type: Args.string({
required: true,
}),
config: Args.string({
required: true,
}),
};
public static usage = (
'internal osinit ' +
new CommandHelp({ args: OsinitCmd.args }).defaultUsage()
).trim();
public static hidden = true;
public static root = true;
public static offlineCompatible = true;
public async run() {
const { args: params } = await this.parse(OsinitCmd);
const config = JSON.parse(params.config);
const { getManifest, osProgressHandler } = await import(
'../../utils/helpers'
);
const manifest = await getManifest(params.image, params.type);
const { initialize } = await import('balena-device-init');
const initializeEmitter = await initialize(params.image, manifest, config);
await osProgressHandler(initializeEmitter);
}
}

View File

@ -29,9 +29,20 @@ import {
devModeInfo,
secureBootInfo,
} from '../../utils/messages';
import { ImgConfig } from '../../utils/config';
const CONNECTIONS_FOLDER = '/system-connections';
type DeviceConfigDefinition = {
partition: number | { logical: number, primary: number },
image?: string,
path?: string
};
type Manifest = BalenaSdk.DeviceTypeJson.DeviceType & {
configuration?: { config?: DeviceConfigDefinition }
};
type FlagsDef = Interfaces.InferredFlags<typeof OsConfigureCmd.flags>;
interface Answers {
@ -172,7 +183,6 @@ export default class OsConfigureCmd extends Command {
await validateOptions(options);
const devInit = await import('balena-device-init');
const { promises: fs } = await import('fs');
const { generateDeviceConfig, generateApplicationConfig } = await import(
'../../utils/config'
@ -219,11 +229,10 @@ export default class OsConfigureCmd extends Command {
const { normalizeOsVersion } = await import('../../utils/normalization');
const osVersion = normalizeOsVersion(
options.version ||
(await getOsVersionFromImage(
params.image,
deviceTypeManifest,
devInit,
)),
(await getOsVersionFromImage(
params.image,
deviceTypeManifest,
)),
);
const { validateDevOptionAndWarn } = await import('../../utils/config');
@ -270,13 +279,11 @@ export default class OsConfigureCmd extends Command {
console.info('Configuring operating system image');
const image = params.image;
await helpers.osProgressHandler(
await devInit.configure(
image,
deviceTypeManifest,
configJson || {},
answers,
),
await addConfigurationToImage(
image,
deviceTypeManifest,
configJson || {},
answers,
);
if (options['system-connection']) {
@ -312,6 +319,21 @@ export default class OsConfigureCmd extends Command {
}
}
async function addConfigurationToImage(
image: string,
manifest: Manifest,
config: ImgConfig | object,
answers: Answers,
) {
// TODO: check if manifest.yocto.image check is needed...
const osVersion = await getOsVersionFromImage(image, manifest);
const bSemver = await import('balena-semver');
const major = bSemver.major(osVersion);
convertFilePathDefinition(manifest.configuration?.config);
console.log(image, manifest, config, answers);
}
async function validateOptions(options: FlagsDef) {
// The 'device' and 'application' options are declared "exclusive" in the oclif
// flag definitions above, so oclif will enforce that they are not both used together.
@ -329,6 +351,29 @@ async function validateOptions(options: FlagsDef) {
await Command.checkLoggedIn();
}
async function definitionForImage(imagePath: string, configDefinition: DeviceConfigDefinition) {
const definition = _.cloneDeep(configDefinition)
if (configDefinition.image != null) {
const path = await import('path');
definition.image = path.join(imagePath, configDefinition.image);
} else {
definition.image = imagePath;
}
return definition;
};
function convertFilePathDefinition(configDefinition: DeviceConfigDefinition) {
const definition = _.cloneDeep(configDefinition);
if (_.isObject(definition.partition)) {
if (definition.partition.logical != null) {
definition.partition = definition.partition.logical + 4;
} else {
definition.partition = definition.partition.primary;
}
}
return definition;
}
/**
* Wrapper around balena-device-init.getImageOsVersion(). Throws ExpectedError
* if the OS image could not be read or the OS version could not be extracted
@ -338,13 +383,38 @@ async function validateOptions(options: FlagsDef) {
*/
async function getOsVersionFromImage(
imagePath: string,
deviceTypeManifest: BalenaSdk.DeviceTypeJson.DeviceType,
devInit: typeof import('balena-device-init'),
deviceTypeManifest: Manifest,
): Promise<string> {
const osVersion = await devInit.getImageOsVersion(
imagePath,
deviceTypeManifest,
);
// TODO: check if all this is needed or if we can just assume { patition: 1 } for all
const config = deviceTypeManifest?.configuration?.config ?? { partition: 1 };
const definition = convertFilePathDefinition(await definitionForImage(imagePath, config));
definition.path = '/os-release';
const imagefs = await import('balena-image-fs');
const osReleaseString = await imagefs.interact(definition.image as string, definition.partition as number, (fs) => {
return promisify(fs.readFile)(definition.path as string, { encoding: 'utf8' });
});
const parsedOsRelease = _(osReleaseString)
.split('\n')
.map((line) => {
const match = line.match(/(.*)=(.*)/);
if (match) {
return [
match[1],
match[2].replace(/^"(.*)"$/, '$1').replace(/^'(.*)'$/, '$1')
]
} else {
return false;
}
})
.filter()
.fromPairs()
.value();
const osVersion = parsedOsRelease.NAME !== 'Resin OS' && parsedOsRelease.NAME !== 'balenaOS' ? null : parsedOsRelease.VERSION;
if (!osVersion) {
throw new ExpectedError(stripIndent`
Could not read OS version from the image. Please specify the balenaOS

View File

@ -1,102 +0,0 @@
/**
* @license
* Copyright 2016-2021 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Args } from '@oclif/core';
import Command from '../../command';
import * as cf from '../../utils/common-flags';
import { getCliForm, stripIndent } from '../../utils/lazy';
const INIT_WARNING_MESSAGE = `
Note: Initializing the device may ask for administrative permissions
because we need to access the raw devices directly.\
`;
export default class OsInitializeCmd extends Command {
public static description = stripIndent`
Initialize an os image for a device.
Initialize an os image for a device with a previously
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}
`;
public static examples = [
'$ balena os initialize ../path/rpi.img --type raspberry-pi',
];
public static args = {
image: Args.string({
description: 'path to OS image',
required: true,
}),
};
public static usage = 'os initialize <image>';
public static flags = {
type: cf.deviceType,
drive: cf.drive,
yes: cf.yes,
help: cf.help,
};
public static authenticated = true;
public async run() {
const { args: params, flags: options } = await this.parse(OsInitializeCmd);
const { getManifest, sudo } = await import('../../utils/helpers');
console.info(`Initializing device ${INIT_WARNING_MESSAGE}`);
const manifest = await getManifest(params.image, options.type);
const answers = await getCliForm().run(manifest.initialization?.options, {
override: {
drive: options.drive,
},
});
if (answers.drive != null) {
const { confirm } = await import('../../utils/patterns');
await confirm(
options.yes,
`This will erase ${answers.drive}. Are you sure?`,
`Going to erase ${answers.drive}.`,
);
const { safeUmount } = await import('../../utils/umount');
await safeUmount(answers.drive);
}
await sudo([
'internal',
'osinit',
params.image,
options.type,
JSON.stringify(answers),
]);
if (answers.drive != null) {
const { safeUmount } = await import('../../utils/umount');
await safeUmount(answers.drive);
console.info(`You can safely remove ${answers.drive} now`);
}
}
}

View File

@ -48,15 +48,33 @@ export default class OsVersionsCmd extends Command {
description: 'select balenaOS ESR versions',
default: false,
}),
'include-draft': Flags.boolean({
description: 'include pre-release balenaOS versions',
default: false,
}),
};
public async run() {
const { args: params, flags: options } = await this.parse(OsVersionsCmd);
if (options['include-draft']) {
const { warnify } = await import('../../utils/messages');
console.error(
warnify(stripIndent`
Using pre-release balenaOS versions is only supported for OS updates
and not for OS image downloads.
`),
);
}
const { formatOsVersion, getOsVersions } = await import(
'../../utils/cloud'
);
const vs = await getOsVersions(params.type, !!options.esr);
const vs = await getOsVersions(
params.type,
!!options.esr,
options['include-draft'],
);
console.log(vs.map((v) => formatOsVersion(v)).join('\n'));
}

View File

@ -200,7 +200,11 @@ async function resolveOSVersion(
version: string,
): Promise<string> {
if (['menu', 'menu-esr'].includes(version)) {
return await selectOSVersionFromMenu(deviceType, version === 'menu-esr');
return await selectOSVersionFromMenu(
deviceType,
version === 'menu-esr',
false,
);
}
const { normalizeOsVersion } = await import('./normalization');
version = normalizeOsVersion(version);
@ -210,8 +214,9 @@ async function resolveOSVersion(
async function selectOSVersionFromMenu(
deviceType: string,
esr: boolean,
includeDraft: boolean,
): Promise<string> {
const vs = await getOsVersions(deviceType, esr);
const vs = await getOsVersions(deviceType, esr, includeDraft);
const choices = vs.map((v) => ({
value: v.raw_version,
@ -233,17 +238,22 @@ async function selectOSVersionFromMenu(
export async function getOsVersions(
deviceType: string,
esr: boolean,
includeDraft: boolean,
): Promise<SDK.OsVersion[]> {
const sdk = getBalenaSdk();
let slug = deviceType;
let versions: SDK.OsVersion[] =
await sdk.models.os.getAvailableOsVersions(slug);
let versions: SDK.OsVersion[] = await sdk.models.os.getAvailableOsVersions(
slug,
{ includeDraft },
);
// if slug is an alias, fetch the real slug
if (!versions.length) {
// unalias device type slug
slug = (await sdk.models.deviceType.get(slug, { $select: 'slug' })).slug;
if (slug !== deviceType) {
versions = await sdk.models.os.getAvailableOsVersions(slug);
versions = await sdk.models.os.getAvailableOsVersions(slug, {
includeDraft,
});
}
}
versions = versions.filter(

View File

@ -627,17 +627,10 @@ export function generateTargetState(
};
opts.environment = _.merge(opts.environment, env[name]);
// This function can be called with a subset of the
// build tasks, when a single dockerfile has changed
// when livepushing, so check the build task exists for
// this composition entry (everything else in this
// function comes from the composition which doesn't
// change)
let contract;
if (name in keyedBuildTasks) {
contract = keyedBuildTasks[name].contract;
}
// This function should always be called with all the build tasks
// so we can construct the correct target state so we don't really need
// to check that the key exists on the `keyedBuildTasks` object
const contract = keyedBuildTasks[name].contract;
const task = keyedBuildTasks[name];
services[idx] = {

View File

@ -423,7 +423,12 @@ export class LivepushManager {
// If we re-apply the target state, the supervisor
// should recreate the container
await this.api.setTargetState(
generateTargetState(currentState, this.composition, [buildTask], {}),
generateTargetState(
currentState,
this.composition,
this.buildTasks,
{},
),
);
await this.awaitDeviceStateSettle();

View File

@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import type { InitializeEmitter, OperationState } from 'balena-device-init';
import type * as BalenaSdk from 'balena-sdk';
import * as _ from 'lodash';
import * as os from 'node:os';
import { promisify } from 'util';
import { getBalenaSdk, getChalk, getVisuals } from './lazy';
import { getBalenaSdk } from './lazy';
export function getGroupDefaults(group: {
options: Array<{ name: string; default: string | number }>;
@ -32,25 +32,6 @@ export function getGroupDefaults(group: {
.value();
}
export function stateToString(state: OperationState) {
const percentage = _.padStart(`${state.percentage}`, 3, '0');
const chalk = getChalk();
const result = `${chalk.blue(percentage + '%')} ${chalk.cyan(
state.operation.command,
)}`;
switch (state.operation.command) {
case 'copy':
return `${result} ${state.operation.from.path} -> ${state.operation.to.path}`;
case 'replace':
return `${result} ${state.operation.file.path}, ${state.operation.copy} -> ${state.operation.replace}`;
case 'run-script':
return `${result} ${state.operation.script}`;
default:
throw new Error(`Unsupported operation: ${state.operation.command}`);
}
}
/**
* Execute a child process with admin / superuser privileges, prompting the user for
* elevation as needed, and taking care of shell-escaping arguments in a suitable way
@ -107,9 +88,17 @@ export async function getManifest(
image: string,
deviceType: string,
): Promise<BalenaSdk.DeviceTypeJson.DeviceType> {
const init = await import('balena-device-init');
const sdk = getBalenaSdk();
const manifest = await init.getImageManifest(image);
const imagefs = await import ('balena-image-fs');
const manifest = await imagefs.interact(image, 1, async (fs) => {
const readFileAsync = promisify(fs.readFile);
const manifest = await readFileAsync('/device-type.json', {
encoding: 'utf8',
});
return JSON.parse(manifest) as BalenaSdk.DeviceTypeJson.DeviceType;
});
if (
manifest != null &&
manifest.slug !== deviceType &&
@ -126,6 +115,13 @@ export async function getManifest(
);
}
export function getOperatingSystem():
| Exclude<NodeJS.Platform, 'darwin'>
| 'osx' {
const platform = os.platform();
return platform === 'darwin' ? 'osx' : platform;
}
export const areDeviceTypesCompatible = async (
appDeviceTypeSlug: string,
osDeviceTypeSlug: string,
@ -156,31 +152,6 @@ export const areDeviceTypesCompatible = async (
);
};
export async function osProgressHandler(step: InitializeEmitter) {
step.on('stdout', process.stdout.write.bind(process.stdout));
step.on('stderr', process.stderr.write.bind(process.stderr));
step.on('state', function (state) {
if (state.operation.command === 'burn') {
return;
}
console.log(exports.stateToString(state));
});
const visuals = getVisuals();
const progressBars = {
write: new visuals.Progress('Writing Device OS'),
check: new visuals.Progress('Validating Device OS'),
};
step.on('burn', (state) => progressBars[state.type].update(state));
await new Promise((resolve, reject) => {
step.on('error', reject);
step.on('end' as any, resolve);
});
}
export async function getAppWithArch(applicationName: string) {
const { getApplication } = await import('./sdk');
const balena = getBalenaSdk();

5982
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "balena-cli",
"version": "17.4.10",
"version": "18.0.2",
"description": "The official balena Command Line Interface",
"main": "./build/app.js",
"homepage": "https://github.com/balena-io/balena-cli",
@ -16,6 +16,7 @@
"doc/",
"lib/",
"patches/",
"!patches/**/**.dev.patch",
"*.md",
"npm-shrinkwrap.json",
"oclif.manifest.json"
@ -39,6 +40,7 @@
"node_modules/open/xdg-open",
"node_modules/windosu/*.bat",
"node_modules/windosu/*.cmd",
"node_modules/axios/**/*",
"npm-shrinkwrap.json",
"oclif.manifest.json"
]
@ -89,7 +91,7 @@
"author": "Balena Inc. (https://balena.io/)",
"license": "Apache-2.0",
"engines": {
"node": ">=18 <20"
"node": ">=20 <21"
},
"husky": {
"hooks": {
@ -146,7 +148,7 @@
"@types/ndjson": "^2.0.1",
"@types/net-keepalive": "^0.4.1",
"@types/nock": "^11.1.0",
"@types/node": "^18.17.6",
"@types/node": "^20.0.0",
"@types/node-cleanup": "^2.1.2",
"@types/parse-link-header": "^1.0.1",
"@types/prettyjson": "^0.0.30",
@ -185,7 +187,6 @@
"nock": "^13.2.1",
"oclif": "^3.17.1",
"parse-link-header": "^2.0.0",
"pkg": "^5.8.1",
"publish-release": "^1.6.1",
"rewire": "^5.0.0",
"simple-git": "^3.14.1",
@ -203,13 +204,13 @@
"@sentry/node": "^6.16.1",
"@types/fast-levenshtein": "0.0.1",
"@types/update-notifier": "^4.1.1",
"@yao-pkg/pkg": "^5.11.1",
"balena-config-json": "^4.2.0",
"balena-device-init": "^6.0.0",
"balena-errors": "^4.7.3",
"balena-image-fs": "^7.0.6",
"balena-image-fs": "^7.2.2",
"balena-image-manager": "^10.0.1",
"balena-preload": "^15.0.1",
"balena-sdk": "^19.0.0",
"balena-sdk": "^19.4.0",
"balena-semver": "^2.3.0",
"balena-settings-client": "^5.0.2",
"balena-settings-storage": "^8.1.0",
@ -224,9 +225,9 @@
"denymount": "^2.3.0",
"docker-modem": "3.0.0",
"docker-progress": "^5.1.3",
"dockerode": "3.3.5",
"dockerode": "3.3.3",
"ejs": "^3.1.6",
"etcher-sdk": "^8.7.0",
"etcher-sdk": "9.0.6",
"event-stream": "3.3.4",
"express": "^4.17.2",
"fast-boot2": "^1.1.0",
@ -284,6 +285,6 @@
"windosu": "^0.3.0"
},
"versionist": {
"publishedAt": "2024-01-02T12:41:39.852Z"
"publishedAt": "2024-03-07T19:40:23.419Z"
}
}

View File

@ -12,7 +12,7 @@ index 607d8dc..07ba1f2 100644
return lines.join('\n');
}
diff --git a/node_modules/@oclif/core/lib/help/command.js b/node_modules/@oclif/core/lib/help/command.js
index 0753040..c1b0f67 100644
index 63c0545..7caad4a 100644
--- a/node_modules/@oclif/core/lib/help/command.js
+++ b/node_modules/@oclif/core/lib/help/command.js
@@ -58,7 +58,7 @@ class CommandHelp extends formatter_1.HelpFormatter {
@ -25,7 +25,7 @@ index 0753040..c1b0f67 100644
if (a.default)
description = `${(0, theme_1.colorize)(this.config?.theme?.flagDefaultValue, `[default: ${a.default}]`)} ${description}`;
@@ -153,14 +153,12 @@ class CommandHelp extends formatter_1.HelpFormatter {
label = labels.join((0, theme_1.colorize)(this.config?.theme?.flagSeparator, flag.char ? ', ' : ' '));
label = labels.join(flag.char ? (0, theme_1.colorize)(this.config?.theme?.flagSeparator, ', ') : ' ');
}
if (flag.type === 'option') {
- let value = flag.helpValue || (this.opts.showFlagNameInTitle ? flag.name : '<value>');
@ -40,7 +40,7 @@ index 0753040..c1b0f67 100644
+ value += ' ...';
label += `=${value}`;
}
return label;
return (0, theme_1.colorize)(this.config.theme?.flag, label);
diff --git a/node_modules/@oclif/core/lib/help/index.js b/node_modules/@oclif/core/lib/help/index.js
index 242538a..efde8ac 100644
--- a/node_modules/@oclif/core/lib/help/index.js

View File

@ -13,7 +13,7 @@ index d06d0b3..c571fe3 100644
const arches = _.uniq(buildConfig.targets
.filter(t => t.platform === 'darwin')
diff --git a/node_modules/oclif/lib/commands/pack/win.js b/node_modules/oclif/lib/commands/pack/win.js
index c0926bd..a37cd6e 100644
index c0926bd..e4f645c 100644
--- a/node_modules/oclif/lib/commands/pack/win.js
+++ b/node_modules/oclif/lib/commands/pack/win.js
@@ -59,6 +59,12 @@ InstallDir "\$PROGRAMFILES${arch === 'x64' ? '64' : ''}\\${config.dirname}"
@ -29,18 +29,8 @@ index c0926bd..a37cd6e 100644
SetOutPath $INSTDIR
File /r bin
File /r client
@@ -226,7 +232,8 @@ class PackWin extends core_1.Command {
fs.writeFile(path.join(installerBase, 'bin', `${flags['additional-cli']}`), scripts.sh({ bin: flags['additional-cli'] })),
] : []));
await fs.move(buildConfig.workspace({ platform: 'win32', arch }), path.join(installerBase, 'client'));
- await exec(`makensis ${installerBase}/${config.bin}.nsi | grep -v "\\[compress\\]" | grep -v "^File: Descending to"`);
+ const { msysExec, toMsysPath } = require("../../util");
+ await msysExec(`makensis ${toMsysPath(installerBase)}/${config.bin}.nsi | grep -v "\\[compress\\]" | grep -v "^File: Descending to"`);
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
const o = buildConfig.dist(`win32/${templateKey}`);
await fs.move(path.join(installerBase, 'installer.exe'), o);
diff --git a/node_modules/oclif/lib/tarballs/build.js b/node_modules/oclif/lib/tarballs/build.js
index 384ea4b..602daa4 100644
index 384ea4b..72ad66f 100644
--- a/node_modules/oclif/lib/tarballs/build.js
+++ b/node_modules/oclif/lib/tarballs/build.js
@@ -21,7 +21,8 @@ const pack = async (from, to) => {
@ -53,17 +43,18 @@ index 384ea4b..602daa4 100644
const packCLI = async () => {
const { stdout } = await exec('npm pack --unsafe-perm', { cwd: c.root });
return path.join(c.root, stdout.trim().split('\n').pop());
@@ -30,7 +31,8 @@ async function build(c, options = {}) {
@@ -30,7 +31,9 @@ async function build(c, options = {}) {
await fs.emptyDir(c.workspace());
const tarballNewLocation = path.join(c.workspace(), path.basename(tarball));
await fs.move(tarball, tarballNewLocation);
- await exec(`tar -xzf "${tarballNewLocation}"`, { cwd: c.workspace() });
+ const { msysExec, toMsysPath } = require("../util");
+ await msysExec(`tar -xzf ${toMsysPath(tarballNewLocation)}`, { cwd: c.workspace() });
+ let tarCmd = `tar -xzf "${tarballNewLocation}"`;
+ if (process.platform === 'win32') tarCmd += ' --force-local';
+ await exec(tarCmd, { cwd: c.workspace() });
await Promise.all((await fs.promises.readdir(path.join(c.workspace(), 'package'), { withFileTypes: true }))
.map(i => fs.move(path.join(c.workspace(), 'package', i.name), path.join(c.workspace(), i.name))));
await Promise.all([
@@ -38,6 +40,13 @@ async function build(c, options = {}) {
@@ -38,6 +41,13 @@ async function build(c, options = {}) {
fs.promises.rm(path.join(c.workspace(), path.basename(tarball)), { recursive: true }),
fs.remove(path.join(c.workspace(), 'bin', 'run.cmd')),
]);
@ -77,7 +68,7 @@ index 384ea4b..602daa4 100644
};
const updatePJSON = async () => {
const pjsonPath = path.join(c.workspace(), 'package.json');
@@ -49,35 +58,20 @@ async function build(c, options = {}) {
@@ -49,35 +59,20 @@ async function build(c, options = {}) {
await fs.writeJSON(pjsonPath, pjson, { spaces: 2 });
};
const addDependencies = async () => {
@ -126,7 +117,7 @@ index 384ea4b..602daa4 100644
};
const pretarball = async () => {
const pjson = await fs.readJSON(path.join(c.workspace(), 'package.json'));
@@ -115,7 +109,8 @@ async function build(c, options = {}) {
@@ -115,7 +110,8 @@ async function build(c, options = {}) {
output: path.join(workspace, 'bin', 'node'),
platform: target.platform,
arch: target.arch,
@ -136,7 +127,7 @@ index 384ea4b..602daa4 100644
});
if (options.pack === false)
return;
@@ -158,6 +153,7 @@ async function build(c, options = {}) {
@@ -158,6 +154,7 @@ async function build(c, options = {}) {
await fs.writeJSON(manifestFilepath, manifest, { spaces: 2 });
};
(0, log_1.log)(`gathering workspace for ${config.bin} to ${c.workspace()}`);
@ -169,40 +160,6 @@ index 216759d..cab0e6e 100644
if (target && target.platform)
return path.join(base, [target.platform, target.arch].join('-'), (0, upload_util_1.templateShortKey)('baseDir', { bin: config.bin }));
return path.join(base, (0, upload_util_1.templateShortKey)('baseDir', { bin: config.bin }));
diff --git a/node_modules/oclif/lib/tarballs/node.js b/node_modules/oclif/lib/tarballs/node.js
index 35f1d0c..5349eaa 100644
--- a/node_modules/oclif/lib/tarballs/node.js
+++ b/node_modules/oclif/lib/tarballs/node.js
@@ -12,6 +12,7 @@ const retry = require("async-retry");
const util_2 = require("../util");
const pipeline = (0, util_1.promisify)(stream_1.pipeline);
const exec = (0, util_1.promisify)(child_process_1.exec);
+const { isMSYS2, msysExec, toMsysPath } = require("../util");
const RETRY_TIMEOUT_MS = 1000;
async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
if (arch === 'arm')
@@ -42,8 +43,10 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
const basedir = path.dirname(tarball);
await fs.promises.mkdir(basedir, { recursive: true });
await pipeline(got_1.default.stream(url), fs.createWriteStream(tarball));
- if (platform !== 'win32')
- await exec(`grep "${path.basename(tarball)}" "${shasums}" | shasum -a 256 -c -`, { cwd: basedir });
+ if (platform !== 'win32') {
+ const shaCmd = isMSYS2 ? 'sha256sum -c -' : 'shasum -a 256 -c -';
+ await msysExec(`grep ${path.basename(tarball)} ${toMsysPath(shasums)} | ${shaCmd}`, { cwd: basedir });
+ }
};
const extract = async () => {
(0, log_1.log)(`extracting ${nodeBase}`);
@@ -51,7 +54,7 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
await fs.promises.mkdir(nodeTmp, { recursive: true });
await fs.promises.mkdir(path.dirname(cache), { recursive: true });
if (platform === 'win32') {
- await exec(`7z x -bd -y "${tarball}"`, { cwd: nodeTmp });
+ await msysExec(`7z x -bd -y ${toMsysPath(tarball)} > /dev/null`, { cwd: nodeTmp });
await fs.move(path.join(nodeTmp, nodeBase, 'node.exe'), path.join(cache, 'node.exe'));
}
else {
diff --git a/node_modules/oclif/lib/upload-util.js b/node_modules/oclif/lib/upload-util.js
index 6963e4d..430472d 100644
--- a/node_modules/oclif/lib/upload-util.js
@ -222,64 +179,3 @@ index 6963e4d..430472d 100644
deb: '<%- bin %>_<%- versionShaRevision %>_<%- arch %>.deb',
};
return _.template(templates[type])(Object.assign({}, options));
diff --git a/node_modules/oclif/lib/util.js b/node_modules/oclif/lib/util.js
index 816c71b..1384aa6 100644
--- a/node_modules/oclif/lib/util.js
+++ b/node_modules/oclif/lib/util.js
@@ -95,9 +95,10 @@ const hash = async (algo, fp) => {
});
};
exports.hash = hash;
+
async function checkFor7Zip() {
try {
- await exec('7z');
+ await msysExec('7z', { stdio: [0, null, 2] });
}
catch (error) {
if (error.code === 127)
@@ -107,3 +108,44 @@ async function checkFor7Zip() {
}
}
exports.checkFor7Zip = checkFor7Zip;
+
+// OSTYPE is 'msys' for MSYS 1.0 and for MSYS2, or 'cygwin' for Cygwin
+// but note that OSTYPE is not "exported" by default, so run: export OSTYPE=$OSTYPE
+// MSYSTEM is 'MINGW32' for MSYS 1.0, 'MSYS' for MSYS2, and undefined for Cygwin
+const isCygwin = process.env.OSTYPE === 'cygwin';
+const isMinGW = process.env.MSYSTEM && process.env.MSYSTEM.startsWith('MINGW');
+const isMSYS2 = process.env.MSYSTEM && process.env.MSYSTEM.startsWith('MSYS');
+const MSYSSHELLPATH = process.env.MSYSSHELLPATH ||
+ (isMSYS2 ? 'C:\\msys64\\usr\\bin\\bash.exe' :
+ (isMinGW ? 'C:\\MinGW\\msys\\1.0\\bin\\bash.exe' :
+ (isCygwin ? 'C:\\cygwin64\\bin\\bash.exe' : '/bin/sh')));
+
+exports.isCygwin = isCygwin;
+exports.isMinGW = isMinGW;
+exports.isMSYS2 = isMSYS2;
+console.error(`[debug] oclif MSYSSHELLPATH=${MSYSSHELLPATH} MSYSTEM=${process.env.MSYSTEM} OSTYPE=${process.env.OSTYPE} isMSYS2=${isMSYS2} isMingGW=${isMinGW} isCygwin=${isCygwin}`);
+
+/* Convert a Windows path like 'C:\tmp' to a MSYS path like '/c/tmp' */
+function toMsysPath(windowsPath) {
+ // 'c:\myfolder' -> '/c/myfolder' or '/cygdrive/c/myfolder'
+ let msysPath = windowsPath.replace(/\\/g, '/');
+ if (isMSYS2 || isMinGW) {
+ msysPath = msysPath.replace(/^([a-zA-Z]):/, '/$1');
+ } else if (isCygwin) {
+ msysPath = msysPath.replace(/^([a-zA-Z]):/, '/cygdrive/$1');
+ }
+ console.error(`[debug] oclif toMsysPath before="${windowsPath}" after="${msysPath}"`);
+ return msysPath;
+}
+exports.toMsysPath = toMsysPath;
+
+async function msysExec(cmd, options = {}) {
+ if (process.platform !== 'win32') {
+ return exec(cmd, options);
+ }
+ const sh = MSYSSHELLPATH;
+ const args = ['-c', cmd];
+ console.error(`[debug] oclif msysExec sh="${sh}" args=${JSON.stringify(args)} options=${JSON.stringify(options)}`);
+ return exec(`"${sh}" "${args.join('" "')}"`, options);
+}
+exports.msysExec = msysExec;

View File

@ -76,13 +76,96 @@
The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/adapters.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/http.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/xhr.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/CancelToken.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/CanceledError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/isCancel.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/Axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/AxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/AxiosHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/InterceptorManager.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/buildFullPath.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/dispatchRequest.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/mergeConfig.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/settle.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/transformData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/defaults/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/defaults/transitional.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/env/data.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/AxiosTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/AxiosURLSearchParams.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/HttpStatusCode.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/bind.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/buildURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/callbackify.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/combineURLs.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/cookies.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/formDataToJSON.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/formDataToStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/fromDataURI.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isAbsoluteURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isAxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isURLSameOrigin.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/parseHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/parseProtocol.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/readBlob.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/speedometer.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/spread.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/throttle.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/toFormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/toURLEncodedForm.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/validator.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/common/utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/classes/FormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/classes/URLSearchParams.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=darwin)

View File

@ -76,12 +76,95 @@
The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
> Warning Failed to make bytecode node18-arm64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node18-arm64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node18-arm64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
> Warning Failed to make bytecode node18-arm64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node18-arm64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/axios.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/utils.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/adapters/adapters.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/adapters/http.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/adapters/xhr.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/cancel/CancelToken.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/cancel/CanceledError.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/cancel/isCancel.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/Axios.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/AxiosError.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/AxiosHeaders.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/InterceptorManager.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/buildFullPath.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/dispatchRequest.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/mergeConfig.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/settle.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/core/transformData.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/defaults/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/defaults/transitional.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/env/data.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/AxiosTransformStream.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/AxiosURLSearchParams.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/HttpStatusCode.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/bind.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/buildURL.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/callbackify.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/combineURLs.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/cookies.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/formDataToJSON.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/formDataToStream.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/fromDataURI.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/isAbsoluteURL.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/isAxiosError.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/isURLSameOrigin.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/parseHeaders.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/parseProtocol.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/readBlob.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/speedometer.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/spread.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/throttle.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/toFormData.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/toURLEncodedForm.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/helpers/validator.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/platform/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/platform/common/utils.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/platform/node/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/platform/node/classes/FormData.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/axios/lib/platform/node/classes/URLSearchParams.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=arm64 libc= platform=linux)
> Warning Failed to make bytecode node20-arm64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=arm64 libc= platform=linux)
> Warning Failed to make bytecode node20-arm64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node20-arm64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=arm64 libc= platform=linux)

View File

@ -76,12 +76,95 @@
The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node18-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/build/Release/drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules/resin-cli-visuals/node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/adapters.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/http.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/adapters/xhr.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/CancelToken.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/CanceledError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/cancel/isCancel.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/Axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/AxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/AxiosHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/InterceptorManager.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/buildFullPath.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/dispatchRequest.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/mergeConfig.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/settle.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/core/transformData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/defaults/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/defaults/transitional.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/env/data.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/AxiosTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/AxiosURLSearchParams.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/HttpStatusCode.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/bind.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/buildURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/callbackify.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/combineURLs.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/cookies.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/formDataToJSON.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/formDataToStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/fromDataURI.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isAbsoluteURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isAxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/isURLSameOrigin.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/parseHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/parseProtocol.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/readBlob.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/speedometer.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/spread.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/throttle.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/toFormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/toURLEncodedForm.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/helpers/validator.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/common/utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/classes/FormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules/axios/lib/platform/node/classes/URLSearchParams.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=linux)
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/string-width/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=linux)
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
> Warning Failed to make bytecode node20-x64 for file node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js
prebuild-install warn install No prebuilt binaries found (target=v20.10.0 runtime=node arch=x64 libc= platform=linux)

View File

@ -76,8 +76,90 @@
The file must be distributed with executable as %2.
%1: node_modules\drivelist\scripts\win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Failed to make bytecode node18-x64 for file node_modules\@isaacs\cliui\node_modules\string-width\index.js
> Warning Failed to make bytecode node18-x64 for file node_modules\@isaacs\cliui\node_modules\strip-ansi\index.js
> Warning Failed to make bytecode node18-x64 for file node_modules\@isaacs\cliui\node_modules\wrap-ansi\index.js
> Warning Failed to make bytecode node18-x64 for file node_modules\@isaacs\cliui\node_modules\ansi-regex\index.js
> Warning Failed to make bytecode node18-x64 for file node_modules\@isaacs\cliui\node_modules\ansi-styles\index.js
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\build\Release\drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\build\Release\drivelist.node
%2: path-to-executable/drivelist.node
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\darwin.sh
%2: path-to-executable/drivelist/darwin.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\linux.sh
%2: path-to-executable/drivelist/linux.sh
> Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2.
%1: node_modules\resin-cli-visuals\node_modules\drivelist\scripts\win32.bat
%2: path-to-executable/drivelist/win32.bat
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\adapters\adapters.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\adapters\http.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\adapters\xhr.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\cancel\CanceledError.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\cancel\CancelToken.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\cancel\isCancel.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\Axios.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\AxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\AxiosHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\buildFullPath.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\dispatchRequest.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\InterceptorManager.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\mergeConfig.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\settle.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\core\transformData.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\defaults\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\defaults\transitional.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\env\data.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\AxiosTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\AxiosURLSearchParams.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\bind.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\buildURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\callbackify.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\combineURLs.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\cookies.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\formDataToJSON.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\formDataToStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\fromDataURI.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\HttpStatusCode.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\isAbsoluteURL.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\isAxiosError.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\isURLSameOrigin.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\parseHeaders.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\parseProtocol.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\readBlob.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\speedometer.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\spread.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\throttle.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\toFormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\toURLEncodedForm.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\validator.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\helpers\ZlibHeaderTransformStream.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\platform\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\platform\common\utils.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\platform\node\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\platform\node\classes\FormData.js
> Warning Failed to make bytecode node20-x64 for file node_modules\axios\lib\platform\node\classes\URLSearchParams.js
> Warning Failed to make bytecode node20-x64 for file node_modules\@isaacs\cliui\node_modules\string-width\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\@isaacs\cliui\node_modules\strip-ansi\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\@isaacs\cliui\node_modules\wrap-ansi\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\@isaacs\cliui\node_modules\ansi-regex\index.js
> Warning Failed to make bytecode node20-x64 for file node_modules\@isaacs\cliui\node_modules\ansi-styles\index.js

View File

@ -66,7 +66,6 @@ describe('detectEncoding() function', function () {
'mountutils/build/Release/MountUtils.node',
];
const sampleText = [
'node_modules/.bin/etcher-image-write',
'node_modules/.bin/mocha',
'node_modules/.bin/rimraf',
'node_modules/.bin/tsc',

View File

@ -1,102 +0,0 @@
/**
* @license
* Copyright 2019 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare module 'balena-device-init' {
import { DeviceTypeJson } from 'balena-sdk';
import * as Bluebird from 'bluebird';
interface OperationState {
operation:
| CopyOperation
| ReplaceOperation
| RunScriptOperation
| BurnOperation;
percentage: number;
}
interface Operation {
command: string;
}
interface CopyOperation extends Operation {
command: 'copy';
from: { path: string };
to: { path: string };
}
interface ReplaceOperation extends Operation {
command: 'replace';
copy: string;
replace: string;
file: {
path: string;
};
}
interface RunScriptOperation extends Operation {
command: 'run-script';
script: string;
arguments?: string[];
}
interface BurnOperation extends Operation {
command: 'burn';
image?: string;
}
interface BurnProgress {
type: 'write' | 'check';
percentage: number;
transferred: number;
length: number;
remaining: number;
eta: number;
runtime: number;
delta: number;
speed: number;
}
interface InitializeEmitter {
on(event: 'stdout' | 'stderr', callback: (msg: string) => void): void;
on(event: 'state', callback: (state: OperationState) => void): void;
on(event: 'burn', callback: (state: BurnProgress) => void): void;
on(event: 'end', callback: () => void): void;
on(event: 'error', callback: (error: Error) => void): void;
}
export function configure(
image: string,
manifest: BalenaSdk.DeviceTypeJson.DeviceType.DeviceType,
config: object,
options?: object,
): Bluebird<InitializeEmitter>;
export function initialize(
image: string,
manifest: BalenaSdk.DeviceTypeJson.DeviceType.DeviceType,
config: object,
): Bluebird<InitializeEmitter>;
export function getImageOsVersion(
image: string,
manifest: BalenaSdk.DeviceTypeJson.DeviceType.DeviceType,
): Bluebird<string | null>;
export function getImageManifest(
image: string,
): Bluebird<BalenaSdk.DeviceTypeJson.DeviceType.DeviceType | null>;
}

View File

@ -21,7 +21,3 @@ declare namespace NodeJS {
pkg?: boolean;
}
}
declare module 'pkg' {
export function exec(args: string[]): Promise<void>;
}