mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-24 18:45:07 +00:00
Compare commits
71 Commits
v18.2.23
...
example-mo
Author | SHA1 | Date | |
---|---|---|---|
357866e345 | |||
629ac9e5e9 | |||
2f03b24bcf | |||
233ee990f9 | |||
facc66e9f9 | |||
6efd24489f | |||
0339160a0b | |||
0591f5edbd | |||
c30dd323f1 | |||
1640bd6457 | |||
da2ffde483 | |||
5c9e3ad8f6 | |||
7515d4b710 | |||
fae5af6b75 | |||
45aa1adacb | |||
b34ea14413 | |||
90eae06017 | |||
41da8f6f6f | |||
8d706a7d81 | |||
d67952024c | |||
8895fc485c | |||
c2dbcaaaf4 | |||
52cb951e49 | |||
2a357a438f | |||
a9a202281d | |||
b74979fb9e | |||
4760866c77 | |||
2b044348e0 | |||
c9fa10b9c6 | |||
63674c8201 | |||
a08ac447a3 | |||
12a338fb21 | |||
1d70e6b4b4 | |||
d3458379e6 | |||
544f615ca0 | |||
245c51d974 | |||
03f0f11f8b | |||
2c0c1f8fd1 | |||
d4d7fce2c1 | |||
0f23318367 | |||
003d537433 | |||
46d3497663 | |||
a39a772c9e | |||
efa0d67f0a | |||
232b9678bc | |||
a8ce14b0e8 | |||
838a36758a | |||
4e101e2fd9 | |||
9f9fd97795 | |||
1b36dc84fc | |||
5d6ee707ff | |||
3c64e13fb3 | |||
7e41fda8d4 | |||
5df316e9cb | |||
79fcd95491 | |||
33199acbe8 | |||
4633c2456d | |||
f8bc081228 | |||
1702f8ba59 | |||
60b0c7e346 | |||
e95ef8b3b4 | |||
1bc0f7447f | |||
f65215e144 | |||
97abc5cf1c | |||
e64a09d2f4 | |||
b1073ca549 | |||
e659e3577a | |||
f7233c5d42 | |||
4ae2ff1740 | |||
19a60bb0ab | |||
d1a6f7560c |
8
.github/workflows/flowzone.yml
vendored
8
.github/workflows/flowzone.yml
vendored
@ -24,8 +24,8 @@ jobs:
|
||||
custom_test_matrix: >
|
||||
{
|
||||
"os": [
|
||||
["actuated-4cpu-8gb"],
|
||||
["actuated-arm64-4cpu-8gb"],
|
||||
["self-hosted", "X64"],
|
||||
["self-hosted", "ARM64"],
|
||||
["macos-12"],
|
||||
["windows-2019"],
|
||||
["macos-latest-xlarge"]
|
||||
@ -34,8 +34,8 @@ jobs:
|
||||
custom_publish_matrix: >
|
||||
{
|
||||
"os": [
|
||||
["actuated-4cpu-8gb"],
|
||||
["actuated-arm64-4cpu-8gb"],
|
||||
["self-hosted", "X64"],
|
||||
["self-hosted", "ARM64"],
|
||||
["macos-12"],
|
||||
["windows-2019"],
|
||||
["macos-latest-xlarge"]
|
||||
|
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@ -0,0 +1 @@
|
||||
node automation/check-npm-version.js && ts-node automation/check-doc.ts
|
@ -1,3 +1,826 @@
|
||||
- commits:
|
||||
- subject: Reduce use of CJS require() on automation files
|
||||
hash: facc66e9f97d075610d4383efa92dceb5b4f7acf
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Remove the use of CJS require() on test files
|
||||
hash: 6efd24489ffa10dc616cd0224d4de889b2029709
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Remove not necessary 'import = require' syntax for js-yaml
|
||||
hash: 0339160a0b625a3e05e6dcdd3c4c642599cbab4e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 19.0.3
|
||||
title: ""
|
||||
date: 2024-09-05T12:34:08.897Z
|
||||
- commits:
|
||||
- subject: Update devDependency patch-package to v8.0.0
|
||||
hash: 1640bd645774bf9b2021cd38b3e9b9550d859f00
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency mkdirp to v3.0.1
|
||||
hash: da2ffde4835884352f280fc861757ca571dc8100
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency fs-extra(to v11) and @types/fs-extra(to v11)
|
||||
hash: 5c9e3ad8f6de0285d9805fc84a0f6f8884e01647
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency @types/parse-link-header to v2.0.3
|
||||
hash: 7515d4b7108948554ec008e426eef04ac9f63a0e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Remove unused devDependency @types/nock
|
||||
hash: fae5af6b757a535ab27e3e90255f01ba6f460a52
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency klaw(to v4) and @types/klaw(to v3.0.6)
|
||||
hash: 45aa1adacb758083e455939c05752c51e0e09216
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update husky to v9.1.5
|
||||
hash: b34ea14413ea467b3ee996a5a7357c4a3e6c7e7e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency @types/jsonwebtoken to v9.0.6
|
||||
hash: 90eae06017f3aa9fd5e8c823c34551e1eca81ee6
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency archiver(to v7) and @types/archiver(to v6)
|
||||
hash: 41da8f6f6f9606544526faa6805470c2449aaadf
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Removes unused devDependency @types/net-keepalive
|
||||
hash: 8d706a7d8168998e0a2db797d8404bd7e844becb
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency rewire(to v7) and @types/rewire(to v2.5.30)
|
||||
hash: d67952024cbf093710a0d2ab50f57e5d51d73d2a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update devDependency sinon(to v18) and @types/sinon(to v17)
|
||||
hash: 8895fc485c9e730df7f8a0bb7e6bb0db63bae28e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 19.0.2
|
||||
title: ""
|
||||
date: 2024-09-03T14:56:13.341Z
|
||||
- commits:
|
||||
- subject: Bump @oclif/core from 3.27.0 to 4.0.18
|
||||
hash: 2a357a438f896ffc4932eda90336944294237a8a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 19.0.1
|
||||
title: ""
|
||||
date: 2024-09-02T13:21:54.739Z
|
||||
- commits:
|
||||
- subject: Update all references of lib to src
|
||||
hash: 4760866c7782b2651c1c319ae1a757f0ab21f1b3
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Rename the lib folder to src
|
||||
hash: 2b044348e0f5dbb40ae4a5a48a4dcf9eff0d4659
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Update @balena/compose to 4.0.1 Update @balena/compose from 3.2.1 to
|
||||
4.0.1
|
||||
hash: c9fa10b9c640cd245312bbc6981e850628d8a6b9
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Use standard visuals table component for fleet/s
|
||||
hash: 63674c8201b2cbd2fe529a47ed3f5069e398c08a
|
||||
body: >
|
||||
This effectively removes the ability to filter/sort/customize the output
|
||||
table.
|
||||
|
||||
The cli cannot properly handle this operations on all models and this
|
||||
one was inconsistent.
|
||||
|
||||
For now we recommend that users that require parsing the CLI output use
|
||||
the output json format and do any kind of necessary parsing on it.
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 19.0.0
|
||||
title: ""
|
||||
date: 2024-08-22T17:43:30.658Z
|
||||
- commits:
|
||||
- subject: Run npm dedupe commands
|
||||
hash: 1d70e6b4b4b2d1c4c8f619988bbe0e17bcf12f63
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Kyle Harding <kyle@balena.io>
|
||||
signed-off-by: Kyle Harding <kyle@balena.io>
|
||||
author: Kyle Harding
|
||||
nested: []
|
||||
- subject: Switch to self-hosted
|
||||
hash: d3458379e614955d3def576ba07f3864ab81732a
|
||||
body: ""
|
||||
footer:
|
||||
change-type: patch
|
||||
author: Anton Belodedenko
|
||||
nested: []
|
||||
version: 18.2.34
|
||||
title: ""
|
||||
date: 2024-07-29T11:08:34.464Z
|
||||
- commits:
|
||||
- subject: Improve discover balena os across different networks
|
||||
hash: 03f0f11f8b4c9fa4b5b4a9612fa9550b08d4bdd7
|
||||
body: >
|
||||
This is an improvement over the scan, join and leave commands removing
|
||||
flakiness when searching over different networks. In short, instead of
|
||||
leaving bonjour to search across all interfaces, we forcebly conduct a
|
||||
search on each interface, this requires mDNS binding any ipv4 interface
|
||||
(0.0.0.0), otherwise it would bind over the interface itself, which is
|
||||
not desired as it causes services to only be able to receive information
|
||||
over that interface, see
|
||||
[mafintosh/multicast-dns#53](https://github.com/mafintosh/multicast-dns/issues/53).
|
||||
This targeted approach enhances the reliability and accuracy of network
|
||||
searches, reducing instances of missed connections or network errors
|
||||
typically caused by flakiness when relying on bonjour's default
|
||||
behavior.
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.33
|
||||
title: ""
|
||||
date: 2024-07-17T07:46:23.084Z
|
||||
- commits:
|
||||
- subject: Remove unused code
|
||||
hash: 0f23318367f0f14e7df52740282c75d0ac3fc6b5
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.32
|
||||
title: ""
|
||||
date: 2024-07-16T13:10:02.704Z
|
||||
- commits:
|
||||
- subject: "deploy: Use the sdk's pine instance with balena-compose"
|
||||
hash: efa0d67f0ad3968fe1a52f929ae475a2caf08567
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update balena-sdk to 19.7.3
|
||||
hash: 232b9678bcac65b20c9006f749e1f8c9dcd49abd
|
||||
body: |
|
||||
Update balena-sdk from 19.7.2 to 19.7.3
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: "pinejs-client-core: Add some missing methods to the custom typings"
|
||||
hash: f052451b60e479124e8a9f494fd9855dcddb4677
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.7.3
|
||||
title: ""
|
||||
date: 2024-07-12T20:52:36.803Z
|
||||
version: 18.2.31
|
||||
title: ""
|
||||
date: 2024-07-15T21:17:39.152Z
|
||||
- commits:
|
||||
- subject: Omit unicode control character escapes from test logs
|
||||
hash: 4e101e2fd9151a9e0a41f8284feba30b32e1a77a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 18.2.30
|
||||
title: ""
|
||||
date: 2024-07-15T11:30:37.408Z
|
||||
- commits:
|
||||
- subject: Update balena-preload from 15.0.5 to 15.0.6
|
||||
hash: 3c64e13fb3f06f557b105f80650615f772809d65
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.29
|
||||
title: ""
|
||||
date: 2024-07-12T14:54:58.781Z
|
||||
- commits:
|
||||
- subject: Downgrade pinejs-client-request to 7.4.2 to unblock the sdk update
|
||||
hash: 79fcd95491c151ddc136cecc7e309aaabb47ef2d
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update balena-sdk to 19.7.2
|
||||
hash: 33199acbe8d2b98f9fe34dd462f7d4d313e13fd5
|
||||
body: |
|
||||
Update balena-sdk from 19.5.5 to 19.7.2
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Update balena-request from 13.3.1 to 13.3.2
|
||||
hash: c971b26e942dfbf65a87f3d0f680ef03b08dedd4
|
||||
body: |
|
||||
Update balena-request from 13.3.1 to 13.3.2
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Fix always following redirects when followRedirect = false
|
||||
hash: 34db7e138eabfcfcfd822133b391c738d01de323
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-request-13.3.2
|
||||
title: ""
|
||||
date: 2024-07-12T09:16:13.529Z
|
||||
version: balena-sdk-19.7.2
|
||||
title: ""
|
||||
date: 2024-07-12T09:52:37.233Z
|
||||
- commits:
|
||||
- subject: Limit pinejs-client-core to ~6.14.0, to fix errors in older TypeScript
|
||||
hash: 75e3cc19a323718d2a97c260d732b51541a029e1
|
||||
body: |
|
||||
Update pinejs-client-core from 6.12.0 to 6.14.0
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Respect the Retry-After header when clients define the
|
||||
getRetryAfterHeader option
|
||||
hash: 04f146bbe2127f4bc140ce7c7e9d9d78f62e00dd
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: pinejs-client-js-6.14.0
|
||||
title: ""
|
||||
date: 2023-12-05T13:05:12.092Z
|
||||
- commits:
|
||||
- subject: Add support for $duration
|
||||
hash: 05edeeea86147ac49dd864ae6e0b46ffc73f6fc4
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: pinejs-client-js-6.13.0
|
||||
title: ""
|
||||
date: 2023-07-11T13:16:05.245Z
|
||||
- commits:
|
||||
- subject: Avoid an unnecessary function creation on each get() call
|
||||
hash: 782e43ef40a22fa4c8e0f3d64917b03e07c77522
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: pinejs-client-js-6.12.4
|
||||
title: ""
|
||||
date: 2023-05-09T13:11:13.136Z
|
||||
- commits:
|
||||
- subject: "CI: Convert tests to TypeScript"
|
||||
hash: 683efba924728fc57cbb9a43b7b65f124903661e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Josh Bowling
|
||||
nested: []
|
||||
version: pinejs-client-js-6.12.3
|
||||
title: ""
|
||||
date: 2022-12-28T09:32:01.282Z
|
||||
- commits:
|
||||
- subject: "Fix `$orderby: { a: { $count: ... }, $dir: 'asc' }` typings"
|
||||
hash: c62fb38c7cafa840aa799e112d96a7448e02a824
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: pinejs-client-js-6.12.2
|
||||
title: ""
|
||||
date: 2022-11-18T10:22:54.685Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to 4.9.3
|
||||
hash: e41e987dd08a02f8805f345fa6c3e50c71f9d517
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: pinejs-client-js-6.12.1
|
||||
title: ""
|
||||
date: 2022-11-15T22:41:19.258Z
|
||||
- subject: Fix the TypeScript incompatibility test
|
||||
hash: 0932c3229d566cefc27480a7ebc1e10e669007e3
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.7.1
|
||||
title: ""
|
||||
date: 2024-07-08T09:46:28.959Z
|
||||
- commits:
|
||||
- subject: Add identity provider & saml account model typing
|
||||
hash: b62bf0543af2fb93888f6e10754791bf29405835
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: balena-sdk-19.7.0
|
||||
title: ""
|
||||
date: 2024-07-05T20:36:20.020Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to 5.5.2
|
||||
hash: ff4e969971edff98f6b8201c6e2729698093bf2a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.6.1
|
||||
title: ""
|
||||
date: 2024-06-20T22:20:08.200Z
|
||||
- commits:
|
||||
- subject: Add the application.getAllByOrganization() method
|
||||
hash: 134132bc40136aee44eef597e3f1669ea498bca3
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Deprecate the application.getAppByOwner() method
|
||||
hash: 85048417e3280434ad7f33008ed147cb3ae766c6
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.6.0
|
||||
title: ""
|
||||
date: 2024-06-20T21:05:52.683Z
|
||||
- commits:
|
||||
- subject: "tests: Make the cleanups more precise"
|
||||
hash: 05f8575d8789c1ebd7a590749909e01f8f536438
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.11
|
||||
title: ""
|
||||
date: 2024-05-28T07:07:52.253Z
|
||||
- commits:
|
||||
- subject: Drop the toWritable helper in favor of TypeScript's satisfies
|
||||
hash: 4463a5c1afa9afed0189a40ddf0cdb6037bf7ba7
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.10
|
||||
title: ""
|
||||
date: 2024-03-29T16:05:02.584Z
|
||||
- commits:
|
||||
- subject: "os: Update the comments on why we still need to be using the
|
||||
release_tags"
|
||||
hash: 31cf598ff28f6502d10c0faef01e10330c616956
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.9
|
||||
title: ""
|
||||
date: 2024-03-29T10:47:28.067Z
|
||||
- commits:
|
||||
- subject: Fix `application.create` method being wrongly marked as deprecated
|
||||
hash: 166ffa8a3de0a002996bdd30c559a5e6b405d21c
|
||||
body: The intention was to mark `options.applicationType` as deprecated
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: myarmolinsky
|
||||
nested: []
|
||||
version: balena-sdk-19.5.8
|
||||
title: ""
|
||||
date: 2024-03-18T12:32:38.508Z
|
||||
- commits:
|
||||
- subject: Fix missing underscore to describes__device property
|
||||
hash: 4aa0829ceaae348803d4fa2712b145df0195e901
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Andrea Rosci
|
||||
nested: []
|
||||
version: balena-sdk-19.5.7
|
||||
title: ""
|
||||
date: 2024-03-08T12:46:33.611Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to 5.4.2
|
||||
hash: 8fdad04e57436f8315e5607dd6ea6b35fcfad9ce
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: "device-type.getInstructions: Convert etcher link to HTTPS"
|
||||
hash: 6a07d9114fb66f376134860118e8ca48aadf9396
|
||||
body: |
|
||||
device-type.getInstructions: Convert etcher link to HTTPS
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
|
||||
signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
|
||||
author: Vipul Gupta (@vipulgupta2048)
|
||||
nested: []
|
||||
version: balena-sdk-19.5.6
|
||||
title: ""
|
||||
date: 2024-03-07T09:23:31.348Z
|
||||
version: 18.2.28
|
||||
title: ""
|
||||
date: 2024-07-12T13:29:19.959Z
|
||||
- commits:
|
||||
- subject: Update balena-sdk to 19.5.5
|
||||
hash: 1702f8ba59a15d0934556038a988567de659dcb6
|
||||
body: |
|
||||
Update balena-sdk from 19.4.0 to 19.5.5
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Update balena-auth to 6.0.1
|
||||
hash: ab5c3baf00a0bdec0db8120f129f158dbcb10fb1
|
||||
body: |
|
||||
Update balena-auth from 5.1.0 to 6.0.1
|
||||
Update balena-request from 13.3.0 to 13.3.1
|
||||
Update balena-register-device from 9.0.1 to 9.0.2
|
||||
footer:
|
||||
Depends-on: https://github.com/balena-io-modules/balena-request/pull/183
|
||||
depends-on: https://github.com/balena-io-modules/balena-request/pull/183
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested:
|
||||
- commits:
|
||||
- subject: Update jwt-decode to v3
|
||||
hash: 8179bdfc955741da8e3064d18ce415c6c4220f00
|
||||
body: |
|
||||
This also removes the @types/jwt-decode
|
||||
which were incorrectly marked as prod deps
|
||||
and which could pollute the typings of
|
||||
consumer projects.
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-auth-6.0.1
|
||||
title: ""
|
||||
date: 2024-02-23T10:40:43.355Z
|
||||
- commits:
|
||||
- subject: Update typescript to 5.3.3
|
||||
hash: cfeecc8af7afda08e673cc6bde658cfa20879c82
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Move the sources from lib to src
|
||||
hash: 7609bea85a91817eacd6e5783dd2fb0c47954f08
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update @balena/lint to v7
|
||||
hash: 315ee2b36e6567181c2bd05d1cbcf64b6840d743
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Stop publishing the lib folder
|
||||
hash: bc65b3930232f50b49ae071d1adc108774c681eb
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Drop support for nodejs < 18
|
||||
hash: 70698a30f3b915ef8fc4ffb5b1ba7ec8ee9ccabb
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: major
|
||||
change-type: major
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Drop no longer used appveyor.yml
|
||||
hash: a47c2e7ce94c0b99d75697562e109fd87dbd641a
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-auth-6.0.0
|
||||
title: ""
|
||||
date: 2024-02-23T10:32:49.610Z
|
||||
- commits:
|
||||
- subject: Update @balena/lint to v7
|
||||
hash: 9613c8e65e75470358ed4a435356d8856e371546
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
- subject: Update balena-request to 13.3.0
|
||||
hash: 08093a1c040ae5af58233b0529ce76b7e6246f5e
|
||||
body: |
|
||||
Update balena-request from 13.0.0 to 13.3.0
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-register-device-9.0.2
|
||||
title: ""
|
||||
date: 2024-02-23T11:25:44.648Z
|
||||
- commits:
|
||||
- subject: Update balena-auth to 6.0.1
|
||||
hash: 1d3cd469288f2dd0e1ed70a292778b70bd518528
|
||||
body: |
|
||||
Update balena-auth from 5.1.0 to 6.0.1
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-request-13.3.1
|
||||
title: ""
|
||||
date: 2024-02-23T10:50:39.931Z
|
||||
version: balena-sdk-19.5.5
|
||||
title: ""
|
||||
date: 2024-02-26T11:06:36.476Z
|
||||
- commits:
|
||||
- subject: Bump balena-request Update balena-request from 13.2.0 to 13.3.0
|
||||
hash: 1330818adde0bc9e9a8e4c4ac9c50548ce5b1d12
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otávio Jacobi
|
||||
nested: []
|
||||
version: balena-sdk-19.5.4
|
||||
title: ""
|
||||
date: 2024-02-14T22:05:55.194Z
|
||||
- commits:
|
||||
- subject: Replace deprecated flowzone input tests_run_on
|
||||
hash: 4b5e586420965a47f9357749a42b4dd9155eb8b4
|
||||
body: |
|
||||
The custom_runs_on array supports multiple runner labels
|
||||
so we need to inspect the first element for our custom action.
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
Signed-off-by: Kyle Harding <kyle@balena.io>
|
||||
signed-off-by: Kyle Harding <kyle@balena.io>
|
||||
author: Kyle Harding
|
||||
nested: []
|
||||
version: balena-sdk-19.5.3
|
||||
title: ""
|
||||
date: 2024-02-14T19:15:23.474Z
|
||||
- commits:
|
||||
- subject: "tests: Reformat describe & it calls to have curly braces"
|
||||
hash: a56364484bb17bc80990a1c070c7a414ba22430f
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.2
|
||||
title: ""
|
||||
date: 2024-02-13T18:18:40.012Z
|
||||
- commits:
|
||||
- subject: Update @balena/lint to 7.3.0
|
||||
hash: 936402acd7c546fab9c51a92c21218bd191ed83c
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.1
|
||||
title: ""
|
||||
date: 2024-02-02T16:41:25.165Z
|
||||
- commits:
|
||||
- subject: "types: Add the `Organization.is_using__billing_version` property"
|
||||
hash: 4faf4f72da474c0ed117c96516ad2afa6c333bf8
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: minor
|
||||
change-type: minor
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: balena-sdk-19.5.0
|
||||
title: ""
|
||||
date: 2024-01-26T17:03:18.219Z
|
||||
version: 18.2.27
|
||||
title: ""
|
||||
date: 2024-07-12T12:45:10.114Z
|
||||
- commits:
|
||||
- subject: Drop unused dependencies
|
||||
hash: 1bc0f7447fc4e294b5af753c6ab45b0f4a1a457b
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Move dependencies that should be dev only as devDependencies
|
||||
hash: f65215e144a58a106e2618ea2f5a110094567882
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.26
|
||||
title: ""
|
||||
date: 2024-07-12T12:03:29.138Z
|
||||
- commits:
|
||||
- subject: Fix complete generation intermitency
|
||||
hash: b1073ca5499193da1aa320f0fd3e1992af09a85e
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Bump oclif to v4
|
||||
hash: e659e3577a4af3a14ee20344cb0fed35a683c531
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.25
|
||||
title: ""
|
||||
date: 2024-07-11T10:54:45.851Z
|
||||
- commits:
|
||||
- subject: Update mocha from 8.4.0 to 10.6.0
|
||||
hash: 19a60bb0ab1298fd09f557ed6c744aff3093f7c4
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
- subject: Override inline-source-cli with non-vulnerable dependency
|
||||
hash: d1a6f7560c4e3d773adf3add34f2f16b68f09d55
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 18.2.24
|
||||
title: ""
|
||||
date: 2024-07-10T22:06:15.314Z
|
||||
- commits:
|
||||
- subject: Replace resin-discoverable-services with bonjour-service
|
||||
hash: 7273656d07dfd02d1395b87d9270679070d8df73
|
||||
|
240
CHANGELOG.md
240
CHANGELOG.md
@ -4,6 +4,246 @@ 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/).
|
||||
|
||||
## 19.0.3 - 2024-09-05
|
||||
|
||||
* Reduce use of CJS require() on automation files [Otavio Jacobi]
|
||||
* Remove the use of CJS require() on test files [Otavio Jacobi]
|
||||
* Remove not necessary 'import = require' syntax for js-yaml [Otavio Jacobi]
|
||||
|
||||
## 19.0.2 - 2024-09-03
|
||||
|
||||
* Update devDependency patch-package to v8.0.0 [Otavio Jacobi]
|
||||
* Update devDependency mkdirp to v3.0.1 [Otavio Jacobi]
|
||||
* Update devDependency fs-extra(to v11) and @types/fs-extra(to v11) [Otavio Jacobi]
|
||||
* Update devDependency @types/parse-link-header to v2.0.3 [Otavio Jacobi]
|
||||
* Remove unused devDependency @types/nock [Otavio Jacobi]
|
||||
* Update devDependency klaw(to v4) and @types/klaw(to v3.0.6) [Otavio Jacobi]
|
||||
* Update husky to v9.1.5 [Otavio Jacobi]
|
||||
* Update devDependency @types/jsonwebtoken to v9.0.6 [Otavio Jacobi]
|
||||
* Update devDependency archiver(to v7) and @types/archiver(to v6) [Otavio Jacobi]
|
||||
* Removes unused devDependency @types/net-keepalive [Otavio Jacobi]
|
||||
* Update devDependency rewire(to v7) and @types/rewire(to v2.5.30) [Otavio Jacobi]
|
||||
* Update devDependency sinon(to v18) and @types/sinon(to v17) [Otavio Jacobi]
|
||||
|
||||
## 19.0.1 - 2024-09-02
|
||||
|
||||
* Bump @oclif/core from 3.27.0 to 4.0.18 [Otavio Jacobi]
|
||||
|
||||
## 19.0.0 - 2024-08-22
|
||||
|
||||
* Update all references of lib to src [Otavio Jacobi]
|
||||
* Rename the lib folder to src [Otavio Jacobi]
|
||||
* Update @balena/compose to 4.0.1 Update @balena/compose from 3.2.1 to 4.0.1 [Otavio Jacobi]
|
||||
* Use standard visuals table component for fleet/s [Otavio Jacobi]
|
||||
|
||||
## 18.2.34 - 2024-07-29
|
||||
|
||||
* Run npm dedupe commands [Kyle Harding]
|
||||
* Switch to self-hosted [Anton Belodedenko]
|
||||
|
||||
## 18.2.33 - 2024-07-17
|
||||
|
||||
* Improve discover balena os across different networks [Otavio Jacobi]
|
||||
|
||||
## 18.2.32 - 2024-07-16
|
||||
|
||||
* Remove unused code [Otavio Jacobi]
|
||||
|
||||
## 18.2.31 - 2024-07-15
|
||||
|
||||
* deploy: Use the sdk's pine instance with balena-compose [Thodoris Greasidis]
|
||||
|
||||
<details>
|
||||
<summary> Update balena-sdk to 19.7.3 [Thodoris Greasidis] </summary>
|
||||
|
||||
> ### balena-sdk-19.7.3 - 2024-07-12
|
||||
>
|
||||
> * pinejs-client-core: Add some missing methods to the custom typings [Thodoris Greasidis]
|
||||
>
|
||||
|
||||
</details>
|
||||
|
||||
## 18.2.30 - 2024-07-15
|
||||
|
||||
* Omit unicode control character escapes from test logs [Thodoris Greasidis]
|
||||
|
||||
## 18.2.29 - 2024-07-12
|
||||
|
||||
* Update balena-preload from 15.0.5 to 15.0.6 [Otavio Jacobi]
|
||||
|
||||
## 18.2.28 - 2024-07-12
|
||||
|
||||
* Downgrade pinejs-client-request to 7.4.2 to unblock the sdk update [Thodoris Greasidis]
|
||||
|
||||
<details>
|
||||
<summary> Update balena-sdk to 19.7.2 [Thodoris Greasidis] </summary>
|
||||
|
||||
> ### balena-sdk-19.7.2 - 2024-07-12
|
||||
>
|
||||
>
|
||||
> <details>
|
||||
> <summary> Update balena-request from 13.3.1 to 13.3.2 [Thodoris Greasidis] </summary>
|
||||
>
|
||||
>> #### balena-request-13.3.2 - 2024-07-12
|
||||
>>
|
||||
>> * Fix always following redirects when followRedirect = false [Thodoris Greasidis]
|
||||
>>
|
||||
>
|
||||
> </details>
|
||||
>
|
||||
>
|
||||
> ### balena-sdk-19.7.1 - 2024-07-08
|
||||
>
|
||||
>
|
||||
> <details>
|
||||
> <summary> Limit pinejs-client-core to ~6.14.0, to fix errors in older TypeScript [Thodoris Greasidis] </summary>
|
||||
>
|
||||
>> #### pinejs-client-js-6.14.0 - 2023-12-05
|
||||
>>
|
||||
>> * Respect the Retry-After header when clients define the getRetryAfterHeader option [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### pinejs-client-js-6.13.0 - 2023-07-11
|
||||
>>
|
||||
>> * Add support for $duration [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### pinejs-client-js-6.12.4 - 2023-05-09
|
||||
>>
|
||||
>> * Avoid an unnecessary function creation on each get() call [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### pinejs-client-js-6.12.3 - 2022-12-28
|
||||
>>
|
||||
>> * CI: Convert tests to TypeScript [Josh Bowling]
|
||||
>>
|
||||
>> #### pinejs-client-js-6.12.2 - 2022-11-18
|
||||
>>
|
||||
>> * Fix `$orderby: { a: { $count: ... }, $dir: 'asc' }` typings [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### pinejs-client-js-6.12.1 - 2022-11-15
|
||||
>>
|
||||
>> * Update TypeScript to 4.9.3 [Thodoris Greasidis]
|
||||
>>
|
||||
>
|
||||
> </details>
|
||||
>
|
||||
> * Fix the TypeScript incompatibility test [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.7.0 - 2024-07-05
|
||||
>
|
||||
> * Add identity provider & saml account model typing [Otavio Jacobi]
|
||||
>
|
||||
> ### balena-sdk-19.6.1 - 2024-06-20
|
||||
>
|
||||
> * Update TypeScript to 5.5.2 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.6.0 - 2024-06-20
|
||||
>
|
||||
> * Add the application.getAllByOrganization() method [Thodoris Greasidis]
|
||||
> * Deprecate the application.getAppByOwner() method [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.11 - 2024-05-28
|
||||
>
|
||||
> * tests: Make the cleanups more precise [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.10 - 2024-03-29
|
||||
>
|
||||
> * Drop the toWritable helper in favor of TypeScript's satisfies [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.9 - 2024-03-29
|
||||
>
|
||||
> * os: Update the comments on why we still need to be using the release_tags [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.8 - 2024-03-18
|
||||
>
|
||||
> * Fix `application.create` method being wrongly marked as deprecated [myarmolinsky]
|
||||
>
|
||||
> ### balena-sdk-19.5.7 - 2024-03-08
|
||||
>
|
||||
> * Fix missing underscore to describes__device property [Andrea Rosci]
|
||||
>
|
||||
> ### balena-sdk-19.5.6 - 2024-03-07
|
||||
>
|
||||
> * Update TypeScript to 5.4.2 [Thodoris Greasidis]
|
||||
> * device-type.getInstructions: Convert etcher link to HTTPS [Vipul Gupta (@vipulgupta2048)]
|
||||
>
|
||||
|
||||
</details>
|
||||
|
||||
## 18.2.27 - 2024-07-12
|
||||
|
||||
|
||||
<details>
|
||||
<summary> Update balena-sdk to 19.5.5 [Thodoris Greasidis] </summary>
|
||||
|
||||
> ### balena-sdk-19.5.5 - 2024-02-26
|
||||
>
|
||||
>
|
||||
> <details>
|
||||
> <summary> Update balena-auth to 6.0.1 [Thodoris Greasidis] </summary>
|
||||
>
|
||||
>> #### balena-auth-6.0.1 - 2024-02-23
|
||||
>>
|
||||
>> * Update jwt-decode to v3 [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-auth-6.0.0 - 2024-02-23
|
||||
>>
|
||||
>> * Update typescript to 5.3.3 [Thodoris Greasidis]
|
||||
>> * Move the sources from lib to src [Thodoris Greasidis]
|
||||
>> * Update @balena/lint to v7 [Thodoris Greasidis]
|
||||
>> * Stop publishing the lib folder [Thodoris Greasidis]
|
||||
>> * Drop support for nodejs < 18 [Thodoris Greasidis]
|
||||
>> * Drop no longer used appveyor.yml [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-register-device-9.0.2 - 2024-02-23
|
||||
>>
|
||||
>> * Update @balena/lint to v7 [Thodoris Greasidis]
|
||||
>> * Update balena-request to 13.3.0 [Thodoris Greasidis]
|
||||
>>
|
||||
>> #### balena-request-13.3.1 - 2024-02-23
|
||||
>>
|
||||
>> * Update balena-auth to 6.0.1 [Thodoris Greasidis]
|
||||
>>
|
||||
>
|
||||
> </details>
|
||||
>
|
||||
>
|
||||
> ### balena-sdk-19.5.4 - 2024-02-14
|
||||
>
|
||||
> * Bump balena-request Update balena-request from 13.2.0 to 13.3.0 [Otávio Jacobi]
|
||||
>
|
||||
> ### balena-sdk-19.5.3 - 2024-02-14
|
||||
>
|
||||
> * Replace deprecated flowzone input tests_run_on [Kyle Harding]
|
||||
>
|
||||
> ### balena-sdk-19.5.2 - 2024-02-13
|
||||
>
|
||||
> * tests: Reformat describe & it calls to have curly braces [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.1 - 2024-02-02
|
||||
>
|
||||
> * Update @balena/lint to 7.3.0 [Thodoris Greasidis]
|
||||
>
|
||||
> ### balena-sdk-19.5.0 - 2024-01-26
|
||||
>
|
||||
> * types: Add the `Organization.is_using__billing_version` property [Thodoris Greasidis]
|
||||
>
|
||||
|
||||
</details>
|
||||
|
||||
## 18.2.26 - 2024-07-12
|
||||
|
||||
* Drop unused dependencies [Otavio Jacobi]
|
||||
* Move dependencies that should be dev only as devDependencies [Otavio Jacobi]
|
||||
|
||||
## 18.2.25 - 2024-07-11
|
||||
|
||||
* Fix complete generation intermitency [Otavio Jacobi]
|
||||
* Bump oclif to v4 [Otavio Jacobi]
|
||||
|
||||
## 18.2.24 - 2024-07-10
|
||||
|
||||
* Update mocha from 8.4.0 to 10.6.0 [Otavio Jacobi]
|
||||
* Override inline-source-cli with non-vulnerable dependency [Otavio Jacobi]
|
||||
|
||||
## 18.2.23 - 2024-07-10
|
||||
|
||||
* Replace resin-discoverable-services with bonjour-service [Otavio Jacobi]
|
||||
|
@ -115,9 +115,9 @@ The content sources for the auto generation of `docs/balena-cli.md` are:
|
||||
* [Selected
|
||||
sections](https://github.com/balena-io/balena-cli/blob/v12.23.0/automation/capitanodoc/capitanodoc.ts#L199-L204)
|
||||
of the README file.
|
||||
* The CLI's command documentation in source code (`lib/commands/` folder), for example:
|
||||
* `lib/commands/push.ts`
|
||||
* `lib/commands/env/add.ts`
|
||||
* The CLI's command documentation in source code (`src/commands/` folder), for example:
|
||||
* `src/commands/push.ts`
|
||||
* `src/commands/env/add.ts`
|
||||
|
||||
The README file is manually edited, but subsections are automatically extracted for inclusion in
|
||||
`docs/balena-cli.md` by the `getCapitanoDoc()` function in
|
||||
@ -224,7 +224,7 @@ command, or by manually editing or copying files to the `node_modules` folder.
|
||||
|
||||
Unexpected behavior may then be observed because of the CLI's use of the
|
||||
[fast-boot2](https://www.npmjs.com/package/fast-boot2) package that caches module resolution.
|
||||
`fast-boot2` is configured in `lib/fast-boot.ts` to automatically invalidate the cache if
|
||||
`fast-boot2` is configured in `src/fast-boot.ts` to automatically invalidate the cache if
|
||||
changes are made to the `package.json` or `npm-shrinkwrap.json` files, but the cache won't
|
||||
be automatically invalidated if `npm link` is used or if manual modifications are made to the
|
||||
`node_modules` folder. In this situation:
|
||||
|
@ -40,7 +40,7 @@ By default, the CLI is installed to the following folders:
|
||||
OS | Folders
|
||||
--- | ---
|
||||
Windows: | `C:\Program Files\balena-cli\`
|
||||
macOS: | `/usr/local/lib/balena-cli/` <br> `/usr/local/bin/balena`
|
||||
macOS: | `/usr/local/src/balena-cli/` <br> `/usr/local/bin/balena`
|
||||
|
||||
## Standalone Zip Package
|
||||
|
||||
|
@ -27,7 +27,7 @@ To update the balena CLI, repeat the steps above for the new version.
|
||||
To uninstall it, run the following command on a terminal prompt:
|
||||
|
||||
```text
|
||||
sudo /usr/local/lib/balena-cli/bin/uninstall
|
||||
sudo /usr/local/src/balena-cli/bin/uninstall
|
||||
```
|
||||
|
||||
## Additional Dependencies
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { JsonVersions } from '../lib/commands/version/index';
|
||||
import type { JsonVersions } from '../src/commands/version/index';
|
||||
|
||||
import { run as oclifRun } from '@oclif/core';
|
||||
import * as archiver from 'archiver';
|
||||
|
@ -28,7 +28,7 @@ import { GlobSync } from 'glob';
|
||||
*
|
||||
* IMPORTANT
|
||||
*
|
||||
* All commands need to be stored under a folder in lib/commands to maintain uniformity
|
||||
* All commands need to be stored under a folder in src/commands to maintain uniformity
|
||||
* Generating docs will error out if directive not followed
|
||||
* To add a custom heading for command docs, add the heading next to the folder name
|
||||
* in the `commandHeadings` dictionary.
|
||||
|
@ -18,7 +18,7 @@ import * as path from 'path';
|
||||
import { getCapitanoDoc } from './capitanodoc';
|
||||
import type { Category, Document, OclifCommand } from './doc-types';
|
||||
import * as markdown from './markdown';
|
||||
import { stripIndent } from '../../lib/utils/lazy';
|
||||
import { stripIndent } from '../../src/utils/lazy';
|
||||
|
||||
/**
|
||||
* Generates the markdown document (as a string) for the CLI documentation
|
||||
@ -39,7 +39,7 @@ export async function renderMarkdown(): Promise<string> {
|
||||
};
|
||||
|
||||
for (const jsFilename of commandCategory.files) {
|
||||
category.commands.push(...importOclifCommands(jsFilename));
|
||||
category.commands.push(...(await importOclifCommands(jsFilename)));
|
||||
}
|
||||
result.categories.push(category);
|
||||
}
|
||||
@ -78,7 +78,9 @@ class FakeHelpCommand {
|
||||
};
|
||||
}
|
||||
|
||||
function importOclifCommands(jsFilename: string): OclifCommand[] {
|
||||
async function importOclifCommands(
|
||||
jsFilename: string,
|
||||
): Promise<OclifCommand[]> {
|
||||
// TODO: Currently oclif commands with no `usage` overridden will cause
|
||||
// an error when parsed. This should be improved so that `usage` does not have
|
||||
// to be overridden if not necessary.
|
||||
@ -86,7 +88,8 @@ function importOclifCommands(jsFilename: string): OclifCommand[] {
|
||||
const command: OclifCommand =
|
||||
jsFilename === 'help'
|
||||
? (new FakeHelpCommand() as unknown as OclifCommand)
|
||||
: (require(path.join(process.cwd(), jsFilename)).default as OclifCommand);
|
||||
: ((await import(path.join(process.cwd(), jsFilename)))
|
||||
.default as OclifCommand);
|
||||
|
||||
return [command];
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ import { Parser } from '@oclif/core';
|
||||
import * as ent from 'ent';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { getManualSortCompareFunction } from '../../lib/utils/helpers';
|
||||
import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils';
|
||||
import { getManualSortCompareFunction } from '../../src/utils/helpers';
|
||||
import { capitanoizeOclifUsage } from '../../src/utils/oclif-utils';
|
||||
import type { Category, Document, OclifCommand } from './doc-types';
|
||||
|
||||
function renderOclifCommand(command: OclifCommand): string[] {
|
||||
|
@ -15,41 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { OptionDefinition } from 'capitano';
|
||||
import * as ent from 'ent';
|
||||
import * as fs from 'fs';
|
||||
import * as readline from 'readline';
|
||||
|
||||
export function getOptionPrefix(signature: string) {
|
||||
if (signature.length > 1) {
|
||||
return '--';
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
export function getOptionSignature(signature: string) {
|
||||
return `${getOptionPrefix(signature)}${signature}`;
|
||||
}
|
||||
|
||||
export function parseCapitanoOption(option: OptionDefinition): string {
|
||||
let result = getOptionSignature(option.signature);
|
||||
|
||||
if (Array.isArray(option.alias)) {
|
||||
for (const alias of option.alias) {
|
||||
result += `, ${getOptionSignature(alias)}`;
|
||||
}
|
||||
} else if (typeof option.alias === 'string') {
|
||||
result += `, ${getOptionSignature(option.alias)}`;
|
||||
}
|
||||
|
||||
if (option.parameter) {
|
||||
result += ` <${option.parameter}>`;
|
||||
}
|
||||
|
||||
return ent.encode(result);
|
||||
}
|
||||
|
||||
export class MarkdownFileParser {
|
||||
constructor(public mdFilePath: string) {}
|
||||
|
||||
|
@ -43,8 +43,8 @@ async function checkBuildTimestamps() {
|
||||
...gitStatus.staged,
|
||||
...gitStatus.renamed.map((o) => o.to),
|
||||
])
|
||||
// select only staged files that start with lib/ or typings/
|
||||
.filter((f) => f.match(/^(lib|typings)[/\\]/))
|
||||
// select only staged files that start with src/ or typings/
|
||||
.filter((f) => f.match(/^(src|typings)[/\\]/))
|
||||
.map((f) => path.join(ROOT, f));
|
||||
|
||||
const fStats = await Promise.all(stagedFiles.map((f) => fs.stat(f)));
|
||||
|
@ -17,19 +17,15 @@
|
||||
|
||||
import * as _ from 'lodash';
|
||||
import * as semver from 'semver';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { throttling } from '@octokit/plugin-throttling';
|
||||
|
||||
const { GITHUB_TOKEN } = process.env;
|
||||
|
||||
/** Return a cached Octokit instance, creating a new one as needed. */
|
||||
const getOctokit = _.once(function () {
|
||||
const Octokit = (
|
||||
require('@octokit/rest') as typeof import('@octokit/rest')
|
||||
).Octokit.plugin(
|
||||
(
|
||||
require('@octokit/plugin-throttling') as typeof import('@octokit/plugin-throttling')
|
||||
).throttling,
|
||||
);
|
||||
return new Octokit({
|
||||
const OctokitConstructor = Octokit.plugin(throttling);
|
||||
return new OctokitConstructor({
|
||||
auth: GITHUB_TOKEN,
|
||||
throttle: {
|
||||
onRateLimit: (retryAfter: number, options: any) => {
|
||||
@ -65,16 +61,16 @@ const getOctokit = _.once(function () {
|
||||
* 'pages' is the total number of pages, and 'ordinal' is the ordinal number
|
||||
* (3rd, 4th, 5th...) of the first item in the current page.
|
||||
*/
|
||||
function getPageNumbers(
|
||||
async function getPageNumbers(
|
||||
response: any,
|
||||
perPageDefault: number,
|
||||
): { page: number; pages: number; ordinal: number } {
|
||||
): Promise<{ page: number; pages: number; ordinal: number }> {
|
||||
const res = { page: 1, pages: 1, ordinal: 1 };
|
||||
if (!response.headers.link) {
|
||||
return res;
|
||||
}
|
||||
const parse =
|
||||
require('parse-link-header') as typeof import('parse-link-header');
|
||||
const parse = await import('parse-link-header');
|
||||
|
||||
const parsed = parse(response.headers.link);
|
||||
if (parsed == null) {
|
||||
throw new Error(`Failed to parse link header: '${response.headers.link}'`);
|
||||
@ -84,13 +80,13 @@ function getPageNumbers(
|
||||
if (parsed.next.per_page) {
|
||||
perPage = parseInt(parsed.next.per_page, 10);
|
||||
}
|
||||
res.page = parseInt(parsed.next.page, 10) - 1;
|
||||
res.pages = parseInt(parsed.last.page, 10);
|
||||
res.page = parseInt(parsed.next.page!, 10) - 1;
|
||||
res.pages = parseInt(parsed.last!.page!, 10);
|
||||
} else {
|
||||
if (parsed.prev.per_page) {
|
||||
perPage = parseInt(parsed.prev.per_page, 10);
|
||||
if (parsed.prev!.per_page) {
|
||||
perPage = parseInt(parsed.prev!.per_page, 10);
|
||||
}
|
||||
res.page = res.pages = parseInt(parsed.prev.page, 10) + 1;
|
||||
res.page = res.pages = parseInt(parsed.prev!.page!, 10) + 1;
|
||||
}
|
||||
res.ordinal = (res.page - 1) * perPage + 1;
|
||||
return res;
|
||||
@ -129,7 +125,7 @@ async function updateGitHubReleaseDescriptions(
|
||||
page: thisPage,
|
||||
pages: totalPages,
|
||||
ordinal,
|
||||
} = getPageNumbers(response, perPage);
|
||||
} = await getPageNumbers(response, perPage);
|
||||
let i = 0;
|
||||
for (const cliRelease of response.data) {
|
||||
const prefix = `[#${ordinal + i++} pg ${thisPage}/${totalPages}]`;
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
import { spawn } from 'child_process';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { diffTrimmedLines } from 'diff';
|
||||
|
||||
export const ROOT = path.join(__dirname, '..');
|
||||
|
||||
@ -64,7 +66,6 @@ export class StdOutTap {
|
||||
* https://www.npmjs.com/package/diff
|
||||
*/
|
||||
export function diffLines(str1: string, str2: string): string {
|
||||
const { diffTrimmedLines } = require('diff');
|
||||
const diffObjs = diffTrimmedLines(str1, str2);
|
||||
const prefix = (chunk: string, char: string) =>
|
||||
chunk
|
||||
@ -84,7 +85,10 @@ export function diffLines(str1: string, str2: string): string {
|
||||
}
|
||||
|
||||
export function loadPackageJson() {
|
||||
return require(path.join(ROOT, 'package.json'));
|
||||
const packageJsonPath = path.join(ROOT, 'package.json');
|
||||
|
||||
const packageJson = fs.readFileSync(packageJsonPath, 'utf8');
|
||||
return JSON.parse(packageJson);
|
||||
}
|
||||
|
||||
/**
|
||||
|
10
bin/dev.js
10
bin/dev.js
@ -29,7 +29,7 @@ const path = require('path');
|
||||
const rootDir = path.join(__dirname, '..');
|
||||
|
||||
// Allow balena-dev to work with oclif by temporarily
|
||||
// pointing oclif config options to lib/ instead of build/
|
||||
// pointing oclif config options to src/ instead of build/
|
||||
modifyOclifPaths();
|
||||
// Undo changes on exit
|
||||
process.on('exit', function () {
|
||||
@ -57,9 +57,9 @@ require('ts-node').register({
|
||||
project: path.join(rootDir, 'tsconfig.json'),
|
||||
transpileOnly: true,
|
||||
});
|
||||
require('../lib/app').run(undefined, { dir: __dirname, development: true });
|
||||
require('../src/app').run(undefined, { dir: __dirname, development: true });
|
||||
|
||||
// Modify package.json oclif paths from build/ -> lib/, or vice versa
|
||||
// Modify package.json oclif paths from build/ -> src/, or vice versa
|
||||
function modifyOclifPaths(revert) {
|
||||
const fs = require('fs');
|
||||
const packageJsonPath = path.join(rootDir, 'package.json');
|
||||
@ -73,9 +73,9 @@ function modifyOclifPaths(revert) {
|
||||
|
||||
let oclifSectionText = JSON.stringify(packageObj.oclif);
|
||||
if (!revert) {
|
||||
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/lib/');
|
||||
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/src/');
|
||||
} else {
|
||||
oclifSectionText = oclifSectionText.replace(/\/lib\//g, '/build/');
|
||||
oclifSectionText = oclifSectionText.replace(/\/src\//g, '/build/');
|
||||
}
|
||||
|
||||
packageObj.oclif = JSON.parse(oclifSectionText);
|
||||
|
@ -8,7 +8,7 @@ _balena() {
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
# Valid top-level completions
|
||||
main_commands=( api-key api-keys app block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local login logout logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version whoami )
|
||||
main_commands=( api-key api-keys app block build config deploy device devices env envs fleet fleets internal join key keys leave local login logout logs notes orgs os preload push release releases scan settings ssh support tag tags tunnel util version whoami )
|
||||
# Sub-completions
|
||||
api_key_cmds=( generate revoke )
|
||||
app_cmds=( create )
|
||||
@ -22,7 +22,7 @@ _balena() {
|
||||
key_cmds=( add rm )
|
||||
local_cmds=( configure flash )
|
||||
os_cmds=( build-config configure download initialize versions )
|
||||
release_cmds=( finalize invalidate validate )
|
||||
release_cmds=( export finalize import invalidate validate )
|
||||
tag_cmds=( rm set )
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ _balena_complete()
|
||||
local cur prev
|
||||
|
||||
# Valid top-level completions
|
||||
main_commands="api-key api-keys app block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local login logout logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version whoami"
|
||||
main_commands="api-key api-keys app block build config deploy device devices env envs fleet fleets internal join key keys leave local login logout logs notes orgs os preload push release releases scan settings ssh support tag tags tunnel util version whoami"
|
||||
# Sub-completions
|
||||
api_key_cmds="generate revoke"
|
||||
app_cmds="create"
|
||||
@ -21,7 +21,7 @@ _balena_complete()
|
||||
key_cmds="add rm"
|
||||
local_cmds="configure flash"
|
||||
os_cmds="build-config configure download initialize versions"
|
||||
release_cmds="finalize invalidate validate"
|
||||
release_cmds="export finalize import invalidate validate"
|
||||
tag_cmds="rm set"
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ const commandsJson = JSON.parse(fs.readFileSync(commandsFilePath, 'utf8'));
|
||||
|
||||
const mainCommands = [];
|
||||
const additionalCommands = [];
|
||||
for (const key of Object.keys(commandsJson.commands)) {
|
||||
for (const key of Object.keys(commandsJson.commands).sort()) {
|
||||
const cmd = key.split(':');
|
||||
if (cmd.length > 1) {
|
||||
additionalCommands.push(cmd);
|
||||
|
@ -282,7 +282,9 @@ are encouraged to regularly update the balena CLI to the latest version.
|
||||
|
||||
- Releases
|
||||
|
||||
- [release export <commitorid>](#release-export-commitorid)
|
||||
- [release finalize <commitorid>](#release-finalize-commitorid)
|
||||
- [release import <file> <fleet>](#release-import-file-fleet)
|
||||
- [release <commitorid>](#release-commitorid)
|
||||
- [release invalidate <commitorid>](#release-invalidate-commitorid)
|
||||
- [release validate <commitorid>](#release-validate-commitorid)
|
||||
@ -2168,13 +2170,9 @@ fleet name or slug (preferred)
|
||||
|
||||
open fleet dashboard page
|
||||
|
||||
#### --fields FIELDS
|
||||
|
||||
only show provided fields (comma-separated)
|
||||
|
||||
#### -j, --json
|
||||
|
||||
output in json format
|
||||
produce JSON output instead of tabular output
|
||||
|
||||
## fleet pin <slug> [releaseToPinTo]
|
||||
|
||||
@ -2353,29 +2351,9 @@ Examples:
|
||||
|
||||
### Options
|
||||
|
||||
#### --fields FIELDS
|
||||
|
||||
only show provided fields (comma-separated)
|
||||
|
||||
#### -j, --json
|
||||
|
||||
output in json format
|
||||
|
||||
#### --filter FILTER
|
||||
|
||||
filter results by substring matching of a given field, eg: --filter field=foo
|
||||
|
||||
#### --no-header
|
||||
|
||||
hide table header from output
|
||||
|
||||
#### --no-truncate
|
||||
|
||||
do not truncate output to fit screen
|
||||
|
||||
#### --sort SORT
|
||||
|
||||
field to sort by (prepend '-' for descending order)
|
||||
produce JSON output instead of tabular output
|
||||
|
||||
# Local
|
||||
|
||||
@ -3369,6 +3347,37 @@ The notes for this release
|
||||
|
||||
# Releases
|
||||
|
||||
## release export <commitOrId>
|
||||
|
||||
Exporting a release to a file allows you to import an exact
|
||||
copy of the original release into another app.
|
||||
|
||||
If the SemVer of a release is provided using the --version option,
|
||||
the first argument is assumed to be the fleet's slug.
|
||||
|
||||
Only successful releases can be exported.
|
||||
|
||||
Examples:
|
||||
|
||||
$ balena release export a777f7345fe3d655c1c981aa642e5555 -o ../path/to/release.tar
|
||||
$ balena release export myOrg/myFleet --version 1.2.3 -o ../path/to/release.tar
|
||||
|
||||
### Arguments
|
||||
|
||||
#### COMMITORID
|
||||
|
||||
commit, ID, or version of the release to export
|
||||
|
||||
### Options
|
||||
|
||||
#### -o, --output OUTPUT
|
||||
|
||||
output path
|
||||
|
||||
#### --version VERSION
|
||||
|
||||
version of the release to export from the specified fleet
|
||||
|
||||
## release finalize <commitOrId>
|
||||
|
||||
Finalize a release. Releases can be "draft" or "final", and this command
|
||||
@ -3395,6 +3404,40 @@ the commit or ID of the release to finalize
|
||||
|
||||
### Options
|
||||
|
||||
## release import <file> <fleet>
|
||||
|
||||
is automatically omitted when importing a release. The backend will auto-increment
|
||||
the revision field of the imported release if a release exists with the same semver.
|
||||
A release will not be imported if a successful release with the same commit already
|
||||
exists.
|
||||
|
||||
To export a release to a file, use 'balena release export'.
|
||||
|
||||
Use the --override-version option to specify the version
|
||||
of the imported release, overriding the one saved in the file.
|
||||
|
||||
Examples:
|
||||
|
||||
$ balena release import ../path/to/release.tar myFleet
|
||||
$ balena release import ../path/to/release.tar myOrg/myFleet
|
||||
$ balena release import ../path/to/release.tar myOrg/myFleet --override-version 1.2.3
|
||||
|
||||
### Arguments
|
||||
|
||||
#### BUNDLE
|
||||
|
||||
path to a file, e.g. "./release.tar"
|
||||
|
||||
#### FLEET
|
||||
|
||||
fleet that the release will be imported to, e.g. "myOrg/myFleet"
|
||||
|
||||
### Options
|
||||
|
||||
#### --override-version OVERRIDE-VERSION
|
||||
|
||||
Imports this release with the specified version overriding the version in the file.
|
||||
|
||||
## release <commitOrId>
|
||||
|
||||
The --json option is recommended when scripting the output of this command,
|
||||
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Balena
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import type { DataOutputOptions, DataSetOutputOptions } from './output';
|
||||
|
||||
export { DataOutputOptions, DataSetOutputOptions };
|
@ -1,158 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Balena
|
||||
|
||||
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 { getCliUx, getChalk } from '../utils/lazy';
|
||||
|
||||
export interface DataOutputOptions {
|
||||
fields?: string;
|
||||
json?: boolean;
|
||||
}
|
||||
|
||||
export interface DataSetOutputOptions extends DataOutputOptions {
|
||||
filter?: string;
|
||||
'no-header'?: boolean;
|
||||
'no-truncate'?: boolean;
|
||||
sort?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output message to STDERR
|
||||
*/
|
||||
export function outputMessage(msg: string) {
|
||||
// Messages go to STDERR
|
||||
console.error(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Output result data to STDOUT
|
||||
* Supports:
|
||||
* - arrays of items (displayed in a tabular way),
|
||||
* - single items (displayed in a field per row format).
|
||||
*
|
||||
* @param data Array of data objects to output
|
||||
* @param fields Array of fieldnames, specifying the fields and display order
|
||||
* @param options Output options
|
||||
*/
|
||||
export async function outputData(
|
||||
data: any[] | object,
|
||||
fields: string[],
|
||||
options: DataOutputOptions | DataSetOutputOptions,
|
||||
) {
|
||||
if (Array.isArray(data)) {
|
||||
await outputDataSet(data, fields, options as DataSetOutputOptions);
|
||||
} else {
|
||||
await outputDataItem(data, fields, options as DataOutputOptions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the cli.ux table implementation, to output tabular data
|
||||
*
|
||||
* @param data Array of data objects to output
|
||||
* @param fields Array of fieldnames, specifying the fields and display order
|
||||
* @param options Output options
|
||||
*/
|
||||
async function outputDataSet(
|
||||
data: any[],
|
||||
fields: string[],
|
||||
options: DataSetOutputOptions,
|
||||
) {
|
||||
// Oclif expects fields to be specified in the format used in table headers (though lowercase)
|
||||
// By replacing underscores with spaces here, we can support both header format and actual field name
|
||||
// (e.g. as seen in json output).
|
||||
options.fields = options.fields?.replace(/_/g, ' ');
|
||||
options.filter = options.filter?.replace(/_/g, ' ');
|
||||
options.sort = options.sort?.replace(/_/g, ' ');
|
||||
|
||||
getCliUx().table(
|
||||
data,
|
||||
// Convert fields array to column object keys
|
||||
// that cli.ux expects. We can later add support
|
||||
// for both formats if beneficial
|
||||
fields.reduce((ac, a) => ({ ...ac, [a]: {} }), {}),
|
||||
{
|
||||
...options,
|
||||
...(options.json
|
||||
? {
|
||||
output: 'json',
|
||||
}
|
||||
: {}),
|
||||
columns: options.fields,
|
||||
printLine,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs a single data object (like `resin-cli-visuals table.vertical`),
|
||||
* but supporting a subset of options from `cli-ux table` (--json and --fields)
|
||||
*
|
||||
* @param data Array of data objects to output
|
||||
* @param fields Array of fieldnames, specifying the fields and display order
|
||||
* @param options Output options
|
||||
*/
|
||||
async function outputDataItem(
|
||||
data: any,
|
||||
fields: string[],
|
||||
options: DataOutputOptions,
|
||||
) {
|
||||
const outData: typeof data = {};
|
||||
|
||||
// Convert comma separated list of fields in `options.fields` to array of correct format.
|
||||
// Note, user may have specified the true field name (e.g. `some_field`),
|
||||
// or the format displayed in headers (e.g. `Some field`, case insensitive).
|
||||
const userSelectedFields = options.fields?.split(',').map((f) => {
|
||||
return f.toLowerCase().trim().replace(/ /g, '_');
|
||||
});
|
||||
|
||||
// Order and filter the fields based on `fields` parameter and `options.fields`
|
||||
(userSelectedFields || fields).forEach((fieldName) => {
|
||||
if (fields.includes(fieldName)) {
|
||||
outData[fieldName] = data[fieldName];
|
||||
}
|
||||
});
|
||||
|
||||
if (options.json) {
|
||||
printLine(JSON.stringify(outData, undefined, 2));
|
||||
} else {
|
||||
const chalk = getChalk();
|
||||
const { capitalize } = await import('lodash');
|
||||
|
||||
// Find longest key, so we can align results
|
||||
const longestKeyLength = getLongestObjectKeyLength(outData);
|
||||
|
||||
// Output one field per line
|
||||
for (const [k, v] of Object.entries(outData)) {
|
||||
const shim = ' '.repeat(longestKeyLength - k.length);
|
||||
const kDisplay = capitalize(k.replace(/_/g, ' '));
|
||||
printLine(`${chalk.bold(kDisplay) + shim} : ${v}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getLongestObjectKeyLength(o: any): number {
|
||||
return Object.keys(o).length >= 1
|
||||
? Object.keys(o).reduce((a, b) => {
|
||||
return a.length > b.length ? a : b;
|
||||
}).length
|
||||
: 0;
|
||||
}
|
||||
|
||||
function printLine(s: any) {
|
||||
// Duplicating oclif cli-ux's default implementation here,
|
||||
// but using this one explicitly for ease of testing
|
||||
process.stdout.write(s + '\n');
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
import Bonjour from 'bonjour-service';
|
||||
import type { Service } from 'bonjour-service';
|
||||
|
||||
interface LocalBalenaOsDevice {
|
||||
address: string;
|
||||
host: string;
|
||||
osVariant?: string;
|
||||
port: number;
|
||||
}
|
||||
|
||||
const avahiBalenaSshConfig = {
|
||||
type: 'ssh',
|
||||
name: '_resin-device._sub',
|
||||
protocol: 'tcp' as const,
|
||||
};
|
||||
|
||||
const avahiBalenaSshSubtype = 'resin-device';
|
||||
|
||||
export async function discoverLocalBalenaOsDevices(
|
||||
timeout = 4000,
|
||||
): Promise<LocalBalenaOsDevice[]> {
|
||||
const services = await new Promise<Service[]>((resolve) => {
|
||||
const bonjour = new Bonjour({}, async (err: string | Error) => {
|
||||
await (await import('../errors')).handleError(err);
|
||||
});
|
||||
const resinSshServices: Service[] = [];
|
||||
const browser = bonjour.find(avahiBalenaSshConfig, (service) =>
|
||||
resinSshServices.push(service),
|
||||
);
|
||||
setTimeout(() => {
|
||||
browser.stop();
|
||||
bonjour.destroy();
|
||||
resolve(resinSshServices);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
return services
|
||||
.filter(
|
||||
({ subtypes, referer }) =>
|
||||
subtypes?.includes(avahiBalenaSshSubtype) && referer != null,
|
||||
)
|
||||
.map(({ referer, host, port }) => ({
|
||||
// We ensure referer is not null on the filter above
|
||||
address: referer!.address,
|
||||
host,
|
||||
port,
|
||||
}));
|
||||
}
|
11612
npm-shrinkwrap.json
generated
11612
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
78
package.json
78
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "18.2.23",
|
||||
"version": "19.0.3",
|
||||
"description": "The official balena Command Line Interface",
|
||||
"main": "./build/app.js",
|
||||
"homepage": "https://github.com/balena-io/balena-cli",
|
||||
@ -14,7 +14,7 @@
|
||||
"bin/",
|
||||
"build/",
|
||||
"doc/",
|
||||
"lib/",
|
||||
"src/",
|
||||
"patches/",
|
||||
"!patches/**/**.dev.patch",
|
||||
"*.md",
|
||||
@ -51,7 +51,7 @@
|
||||
"build": "npm run build:src && npm run catch-uncommitted",
|
||||
"build:t": "npm run lint && npm run build:fast && npm run build:test",
|
||||
"build:src": "npm run lint && npm run build:fast && npm run build:test && npm run build:doc && npm run build:completion",
|
||||
"build:pages": "mkdirp ./build/auth/pages/&& inline-source --compress ./lib/auth/pages/error.ejs ./build/auth/pages/error.ejs && inline-source --compress ./lib/auth/pages/success.ejs ./build/auth/pages/success.ejs",
|
||||
"build:pages": "mkdirp ./build/auth/pages/&& inline-source --compress ./src/auth/pages/error.ejs ./build/auth/pages/error.ejs && inline-source --compress ./src/auth/pages/success.ejs ./build/auth/pages/success.ejs",
|
||||
"build:fast": "npm run build:pages && tsc && npx oclif manifest",
|
||||
"build:test": "tsc -P ./tsconfig.dev.json --noEmit",
|
||||
"build:doc": "ts-node --transpile-only automation/capitanodoc/index.ts > docs/balena-cli.md",
|
||||
@ -67,15 +67,16 @@
|
||||
"test:standalone": "npm run build:standalone && npm run test:standalone:fast",
|
||||
"test:standalone:fast": "cross-env BALENA_CLI_TEST_TYPE=standalone mocha --config .mocharc-standalone.js",
|
||||
"test:fast": "npm run build:fast && npm run test:source",
|
||||
"test:fast-profile": "npm run test:fast -- -- --inspect-brk=0.0.0.0",
|
||||
"test:debug": "cross-env BALENA_CLI_TEST_TYPE=source mocha --inspect-brk=0.0.0.0",
|
||||
"test:only": "npm run build:fast && cross-env BALENA_CLI_TEST_TYPE=source mocha \"tests/**/${npm_config_test}.spec.ts\"",
|
||||
"catch-uncommitted": "ts-node --transpile-only automation/run.ts catch-uncommitted",
|
||||
"ci": "npm run test && npm run catch-uncommitted",
|
||||
"lint": "npm run lint-tsconfig && npm run lint-other",
|
||||
"lint-tsconfig": "balena-lint -e ts -e js -t tsconfig.dev.json --fix automation/ lib/ tests/ typings/",
|
||||
"lint-tsconfig": "balena-lint -e ts -e js -t tsconfig.dev.json --fix automation/ src/ tests/ typings/",
|
||||
"lint-other": "balena-lint -e ts -e js --fix bin/run.js bin/dev.js completion/ .mocharc.js .mocharc-standalone.js",
|
||||
"update": "ts-node --transpile-only ./automation/update-module.ts",
|
||||
"prepare": "echo {} > bin/.fast-boot.json",
|
||||
"prepare": "echo {} > bin/.fast-boot.json && husky",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"keywords": [
|
||||
@ -92,11 +93,6 @@
|
||||
"engines": {
|
||||
"node": "^20.6.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "node automation/check-npm-version.js && ts-node automation/check-doc.ts"
|
||||
}
|
||||
},
|
||||
"oclif": {
|
||||
"bin": "balena",
|
||||
"commands": "./build/commands",
|
||||
@ -119,7 +115,7 @@
|
||||
"@electron/notarize": "^2.0.0",
|
||||
"@octokit/plugin-throttling": "^3.5.1",
|
||||
"@octokit/rest": "^18.6.7",
|
||||
"@types/archiver": "^5.1.1",
|
||||
"@types/archiver": "^6.0.2",
|
||||
"@types/bluebird": "^3.5.36",
|
||||
"@types/body-parser": "^1.19.2",
|
||||
"@types/chai": "^4.3.0",
|
||||
@ -130,7 +126,8 @@
|
||||
"@types/dockerode": "3.3.23",
|
||||
"@types/ejs": "^3.1.0",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/fast-levenshtein": "^0.0.4",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/global-agent": "^2.1.1",
|
||||
"@types/global-tunnel-ng": "^2.1.1",
|
||||
"@types/http-proxy": "^1.17.8",
|
||||
@ -138,35 +135,35 @@
|
||||
"@types/intercept-stdout": "^0.1.0",
|
||||
"@types/is-root": "^2.1.2",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/jsonwebtoken": "^8.5.6",
|
||||
"@types/klaw": "^3.0.3",
|
||||
"@types/jsonwebtoken": "^9.0.6",
|
||||
"@types/klaw": "^3.0.6",
|
||||
"@types/lodash": "^4.14.178",
|
||||
"@types/mixpanel": "^2.14.3",
|
||||
"@types/mocha": "^8.2.3",
|
||||
"@types/mocha": "^10.0.7",
|
||||
"@types/mock-require": "^2.0.1",
|
||||
"@types/moment-duration-format": "^2.2.3",
|
||||
"@types/ndjson": "^2.0.1",
|
||||
"@types/net-keepalive": "^0.4.1",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"@types/node-cleanup": "^2.1.2",
|
||||
"@types/parse-link-header": "^1.0.1",
|
||||
"@types/parse-link-header": "^2.0.3",
|
||||
"@types/prettyjson": "^0.0.33",
|
||||
"@types/progress-stream": "^2.0.2",
|
||||
"@types/request": "^2.48.7",
|
||||
"@types/rewire": "^2.5.28",
|
||||
"@types/rewire": "^2.5.30",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@types/semver": "^7.3.9",
|
||||
"@types/shell-escape": "^0.2.0",
|
||||
"@types/sinon": "^10.0.6",
|
||||
"@types/sinon": "^17.0.3",
|
||||
"@types/split": "^1.0.0",
|
||||
"@types/stream-to-promise": "^2.2.1",
|
||||
"@types/tar-stream": "^2.2.2",
|
||||
"@types/through2": "^2.0.36",
|
||||
"@types/tmp": "^0.2.3",
|
||||
"@types/update-notifier": "^4.1.1",
|
||||
"@types/which": "^2.0.1",
|
||||
"@types/window-size": "^1.1.1",
|
||||
"archiver": "^5.3.0",
|
||||
"@yao-pkg/pkg": "^5.11.1",
|
||||
"archiver": "^7.0.1",
|
||||
"catch-uncommitted": "^2.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
@ -175,43 +172,41 @@
|
||||
"diff": "^5.0.0",
|
||||
"ent": "^2.2.0",
|
||||
"filehound": "^1.17.5",
|
||||
"fs-extra": "^9.1.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"http-proxy": "^1.18.1",
|
||||
"husky": "^4.3.8",
|
||||
"husky": "^9.1.5",
|
||||
"inline-source-cli": "^2.0.0",
|
||||
"intercept-stdout": "^0.1.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"klaw": "^3.0.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
"mocha": "^8.4.0",
|
||||
"klaw": "^4.1.0",
|
||||
"mkdirp": "^3.0.1",
|
||||
"mocha": "^10.6.0",
|
||||
"mock-require": "^3.0.3",
|
||||
"nock": "^13.2.1",
|
||||
"oclif": "^3.17.1",
|
||||
"oclif": "^4.14.0",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"rewire": "^5.0.0",
|
||||
"rewire": "^7.0.0",
|
||||
"simple-git": "^3.14.1",
|
||||
"sinon": "^11.1.2",
|
||||
"sinon": "^18.0.0",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "^5.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@balena/compose": "^3.2.1",
|
||||
"@balena/compose": "^4.0.1",
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"@balena/env-parsing": "^1.1.8",
|
||||
"@balena/es-version": "^1.0.1",
|
||||
"@oclif/core": "^3.27.0",
|
||||
"@balena/release-bundle": "^0.5.2",
|
||||
"@oclif/core": "^4.0.8",
|
||||
"@resin.io/valid-email": "^0.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"@types/fast-levenshtein": "0.0.4",
|
||||
"@types/update-notifier": "^4.1.1",
|
||||
"@yao-pkg/pkg": "^5.11.1",
|
||||
"balena-config-json": "^4.2.0",
|
||||
"balena-device-init": "^7.0.1",
|
||||
"balena-errors": "^4.7.3",
|
||||
"balena-image-fs": "^7.0.6",
|
||||
"balena-image-manager": "^10.0.1",
|
||||
"balena-preload": "^15.0.5",
|
||||
"balena-sdk": "^19.4.0",
|
||||
"balena-preload": "^15.0.6",
|
||||
"balena-sdk": "^19.7.3",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^5.0.2",
|
||||
"balena-settings-storage": "^8.1.0",
|
||||
@ -222,7 +217,6 @@
|
||||
"chokidar": "^3.5.2",
|
||||
"cli-truncate": "^2.1.0",
|
||||
"color-hash": "^1.1.1",
|
||||
"columnify": "^1.5.2",
|
||||
"common-tags": "^1.7.2",
|
||||
"denymount": "^2.3.0",
|
||||
"docker-modem": "^5.0.3",
|
||||
@ -230,7 +224,6 @@
|
||||
"dockerode": "^4.0.2",
|
||||
"ejs": "^3.1.6",
|
||||
"etcher-sdk": "9.1.0",
|
||||
"event-stream": "3.3.5",
|
||||
"express": "^4.17.2",
|
||||
"fast-boot2": "^1.1.0",
|
||||
"fast-levenshtein": "^3.0.0",
|
||||
@ -254,7 +247,7 @@
|
||||
"node-cleanup": "^2.1.2",
|
||||
"node-unzip-2": "^0.2.8",
|
||||
"open": "^7.1.0",
|
||||
"patch-package": "^6.5.1",
|
||||
"patch-package": "^8.0.0",
|
||||
"prettyjson": "^1.2.5",
|
||||
"progress-stream": "^2.0.0",
|
||||
"reconfix": "^1.0.0-v0-1-0-fork-46760acff4d165f5238bfac5e464256ef1944476",
|
||||
@ -282,7 +275,12 @@
|
||||
"optionalDependencies": {
|
||||
"windosu": "^0.3.0"
|
||||
},
|
||||
"overrides": {
|
||||
"inline-source-cli": {
|
||||
"inline-source": "^8.0.3"
|
||||
}
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2024-07-10T21:05:52.453Z"
|
||||
"publishedAt": "2024-09-05T12:34:09.871Z"
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,8 @@
|
||||
diff --git a/node_modules/@oclif/core/lib/cli-ux/list.js b/node_modules/@oclif/core/lib/cli-ux/list.js
|
||||
index 607d8dc..07ba1f2 100644
|
||||
--- a/node_modules/@oclif/core/lib/cli-ux/list.js
|
||||
+++ b/node_modules/@oclif/core/lib/cli-ux/list.js
|
||||
@@ -22,7 +22,7 @@ function renderList(items) {
|
||||
}
|
||||
left = left.padEnd(maxLength);
|
||||
right = linewrap(maxLength + 2, right);
|
||||
- return `${left} ${right}`;
|
||||
+ return `${left} : ${right}`;
|
||||
});
|
||||
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 930598f..867799b 100644
|
||||
index 90922c8..6b7f417 100644
|
||||
--- a/node_modules/@oclif/core/lib/help/command.js
|
||||
+++ b/node_modules/@oclif/core/lib/help/command.js
|
||||
@@ -59,7 +59,8 @@ class CommandHelp extends formatter_1.HelpFormatter {
|
||||
@@ -58,7 +58,8 @@ class CommandHelp extends formatter_1.HelpFormatter {
|
||||
return;
|
||||
return args.map((a) => {
|
||||
// Add ellipsis to indicate that the argument takes multiple values if strict is false
|
||||
@ -26,7 +13,7 @@ index 930598f..867799b 100644
|
||||
if (a.default)
|
||||
description = `${(0, theme_1.colorize)(this.config?.theme?.flagDefaultValue, `[default: ${a.default}]`)} ${description}`;
|
||||
diff --git a/node_modules/@oclif/core/lib/help/index.js b/node_modules/@oclif/core/lib/help/index.js
|
||||
index e1859e1..756654c 100644
|
||||
index 4a34b89..d7eb6ac 100644
|
||||
--- a/node_modules/@oclif/core/lib/help/index.js
|
||||
+++ b/node_modules/@oclif/core/lib/help/index.js
|
||||
@@ -172,11 +172,12 @@ class Help extends HelpBase {
|
||||
@ -45,7 +32,7 @@ index e1859e1..756654c 100644
|
||||
const uniqueSubCommands = subCommands.filter((p) => {
|
||||
aliases.push(...p.aliases);
|
||||
diff --git a/node_modules/@oclif/core/lib/parser/errors.js b/node_modules/@oclif/core/lib/parser/errors.js
|
||||
index b37743a..6b2e5c3 100644
|
||||
index 168da99..538a880 100644
|
||||
--- a/node_modules/@oclif/core/lib/parser/errors.js
|
||||
+++ b/node_modules/@oclif/core/lib/parser/errors.js
|
||||
@@ -15,7 +15,8 @@ class CLIParseError extends errors_1.CLIError {
|
||||
@ -67,7 +54,7 @@ index b37743a..6b2e5c3 100644
|
||||
+ let message = `Missing ${args.length} required argument${args.length === 1 ? '' : 's'}`;
|
||||
const namedArgs = args.filter((a) => a.name);
|
||||
if (namedArgs.length > 0) {
|
||||
const list = (0, list_1.renderList)(namedArgs.map((a) => {
|
||||
const list = (0, list_1.default)(namedArgs.map((a) => {
|
||||
@@ -52,7 +54,7 @@ class RequiredArgsError extends CLIParseError {
|
||||
message += `\n\nNote: ${flags} allow${flagsWithMultiple.length === 1 ? 's' : ''} multiple values. Because of this you need to provide all arguments before providing ${flagsWithMultiple.length === 1 ? 'that flag' : 'those flags'}.`;
|
||||
message += '\nAlternatively, you can use "--" to signify the end of the flags and the beginning of arguments.';
|
||||
@ -77,3 +64,16 @@ index b37743a..6b2e5c3 100644
|
||||
this.args = args;
|
||||
this.showHelp = true;
|
||||
}
|
||||
diff --git a/node_modules/@oclif/core/lib/ux/list.js b/node_modules/@oclif/core/lib/ux/list.js
|
||||
index 954954c..0e507c7 100644
|
||||
--- a/node_modules/@oclif/core/lib/ux/list.js
|
||||
+++ b/node_modules/@oclif/core/lib/ux/list.js
|
||||
@@ -22,7 +22,7 @@ function renderList(items) {
|
||||
}
|
||||
left = left.padEnd(maxLength);
|
||||
right = linewrap(maxLength + 2, right);
|
||||
- return `${left} ${right}`;
|
||||
+ return `${left} : ${right}`;
|
||||
});
|
||||
return lines.join('\n');
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
diff --git a/node_modules/oclif/lib/commands/pack/win.js b/node_modules/oclif/lib/commands/pack/win.js
|
||||
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}"
|
||||
${customization}
|
||||
|
||||
Section "${config.name} CLI \${VERSION}"
|
||||
+ ; First remove any old client files.
|
||||
+ ; (Remnants of old versions were causing CLI errors)
|
||||
+ ; Initially tried running the Uninstall.exe, but was
|
||||
+ ; unable to make script wait for completion (despite using _?)
|
||||
+ DetailPrint "Removing files from previous version."
|
||||
+ RMDir /r "$INSTDIR\\client"
|
||||
SetOutPath $INSTDIR
|
||||
File /r bin
|
||||
File /r client
|
||||
diff --git a/node_modules/oclif/lib/tarballs/build.js b/node_modules/oclif/lib/tarballs/build.js
|
||||
index 384ea4b..c9607f3 100644
|
||||
--- a/node_modules/oclif/lib/tarballs/build.js
|
||||
+++ b/node_modules/oclif/lib/tarballs/build.js
|
||||
@@ -30,7 +30,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() });
|
||||
+ 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,11 @@ 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')),
|
||||
]);
|
||||
+ // The oclif installers are a production installation, while the source
|
||||
+ // `bin` folder may contain a `.fast-boot.json` file of a dev installation.
|
||||
+ // This has previously led to issues preventing the CLI from starting, so
|
||||
+ // delete `.fast-boot.json` (if any) from the destination folder.
|
||||
+ await fs.promises.rm(path.join(c.workspace(), 'bin', '.fast-boot.json'));
|
||||
};
|
||||
const updatePJSON = async () => {
|
||||
const pjsonPath = path.join(c.workspace(), 'package.json');
|
35
patches/all/oclif+4.14.0.dev.patch
Normal file
35
patches/all/oclif+4.14.0.dev.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/node_modules/oclif/lib/commands/pack/win.js b/node_modules/oclif/lib/commands/pack/win.js
|
||||
index ef7f90e..8264b7c 100644
|
||||
--- a/node_modules/oclif/lib/commands/pack/win.js
|
||||
+++ b/node_modules/oclif/lib/commands/pack/win.js
|
||||
@@ -76,6 +76,12 @@ InstallDir "\$PROGRAMFILES${arch === 'x64' ? '64' : ''}\\${config.dirname}"
|
||||
${customization}
|
||||
|
||||
Section "${config.name} CLI \${VERSION}"
|
||||
+ ; First remove any old client files.
|
||||
+ ; (Remnants of old versions were causing CLI errors)
|
||||
+ ; Initially tried running the Uninstall.exe, but was
|
||||
+ ; unable to make script wait for completion (despite using _?)
|
||||
+ DetailPrint "Removing files from previous version."
|
||||
+ RMDir /r "$INSTDIR\\client"
|
||||
SetOutPath $INSTDIR
|
||||
File /r bin
|
||||
File /r client
|
||||
diff --git a/node_modules/oclif/lib/tarballs/build.js b/node_modules/oclif/lib/tarballs/build.js
|
||||
index 14d5a6e..7b42a6f 100644
|
||||
--- a/node_modules/oclif/lib/tarballs/build.js
|
||||
+++ b/node_modules/oclif/lib/tarballs/build.js
|
||||
@@ -200,6 +200,13 @@ const extractCLI = async (tarball, c) => {
|
||||
(0, promises_1.rm)(path.join(workspace, path.basename(tarball)), { recursive: true }),
|
||||
(0, fs_extra_1.remove)(path.join(workspace, 'bin', 'run.cmd')),
|
||||
]);
|
||||
+
|
||||
+ // The oclif installers are a production installation, while the source
|
||||
+ // `bin` folder may contain a `.fast-boot.json` file of a dev installation.
|
||||
+ // This has previously led to issues preventing the CLI from starting, so
|
||||
+ // delete `.fast-boot.json` (if any) from the destination folder.
|
||||
+ await (0, fs_extra_1.remove)(path.join(workspace, 'bin', '.fast-boot.json'));
|
||||
+
|
||||
};
|
||||
const buildTarget = async (target, c, options) => {
|
||||
const workspace = c.workspace(target);
|
@ -137,7 +137,8 @@ async function oclifRun(command: string[], options: AppOptions) {
|
||||
}
|
||||
}
|
||||
if (shouldFlush) {
|
||||
await import('@oclif/core/flush');
|
||||
const { flush } = await import('@oclif/core');
|
||||
await flush();
|
||||
}
|
||||
// TODO: figure out why we need to call fast-boot stop() here, in
|
||||
// addition to calling it in the main `run()` function in this file.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@ -21,7 +21,6 @@ import {
|
||||
NotAvailableInOfflineModeError,
|
||||
} from './errors';
|
||||
import { stripIndent } from './utils/lazy';
|
||||
import * as output from './framework/output';
|
||||
|
||||
export default abstract class BalenaCommand extends Command {
|
||||
/**
|
||||
@ -168,7 +167,4 @@ export default abstract class BalenaCommand extends Command {
|
||||
await this.getStdin();
|
||||
}
|
||||
}
|
||||
|
||||
protected outputMessage = output.outputMessage;
|
||||
protected outputData = output.outputData;
|
||||
}
|
@ -364,20 +364,13 @@ ${dockerignoreHelp}
|
||||
$select: ['commit'],
|
||||
});
|
||||
} else {
|
||||
const [{ id: userId }, auth, apiEndpoint] = await Promise.all([
|
||||
sdk.auth.getUserInfo(),
|
||||
sdk.auth.getToken(),
|
||||
sdk.settings.get('apiUrl'),
|
||||
]);
|
||||
release = await $deployProject(
|
||||
docker,
|
||||
sdk,
|
||||
logger,
|
||||
project.composition,
|
||||
images,
|
||||
opts.app.id,
|
||||
userId,
|
||||
`Bearer ${auth}`,
|
||||
apiEndpoint,
|
||||
!opts.shouldUploadLogs,
|
||||
composeOpts.projectPath,
|
||||
opts.createAsDraft,
|
@ -20,7 +20,7 @@ import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
|
||||
export default class FleetCmd extends Command {
|
||||
@ -49,7 +49,7 @@ export default class FleetCmd extends Command {
|
||||
default: false,
|
||||
description: 'open fleet dashboard page',
|
||||
}),
|
||||
...cf.dataOutputFlags,
|
||||
json: cf.json,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
@ -78,16 +78,28 @@ export default class FleetCmd extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
const outputApplication = {
|
||||
...application,
|
||||
const applicationToDisplay = {
|
||||
id: application.id,
|
||||
app_name: application.app_name,
|
||||
slug: application.slug,
|
||||
device_type: application.is_for__device_type[0].slug,
|
||||
commit: application.should_be_running__release[0]?.commit,
|
||||
};
|
||||
|
||||
await this.outputData(
|
||||
outputApplication,
|
||||
['app_name', 'id', 'device_type', 'slug', 'commit'],
|
||||
options,
|
||||
if (options.json) {
|
||||
console.log(JSON.stringify(applicationToDisplay, null, 4));
|
||||
return;
|
||||
}
|
||||
|
||||
// Emulate table.vertical title output, but avoid uppercasing and inserting spaces
|
||||
console.log(`== ${applicationToDisplay.app_name}`);
|
||||
console.log(
|
||||
getVisuals().table.vertical(applicationToDisplay, [
|
||||
'id',
|
||||
'device_type',
|
||||
'slug',
|
||||
'commit',
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ import type * as BalenaSdk from 'balena-sdk';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
|
||||
interface ExtendedApplication extends ApplicationWithDeviceTypeSlug {
|
||||
device_count: number;
|
||||
@ -42,8 +42,8 @@ export default class FleetsCmd extends Command {
|
||||
public static usage = 'fleets';
|
||||
|
||||
public static flags = {
|
||||
...cf.dataSetOutputFlags,
|
||||
help: cf.help,
|
||||
json: cf.json,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
@ -77,17 +77,29 @@ export default class FleetsCmd extends Command {
|
||||
application.device_type = application.is_for__device_type[0].slug;
|
||||
});
|
||||
|
||||
await this.outputData(
|
||||
applications,
|
||||
[
|
||||
const applicationsToDisplay = applications.map((application) => ({
|
||||
id: application.id,
|
||||
app_name: application.app_name,
|
||||
slug: application.slug,
|
||||
device_type: application.device_type,
|
||||
online_devices: application.online_devices,
|
||||
device_count: application.device_count,
|
||||
}));
|
||||
|
||||
if (options.json) {
|
||||
console.log(JSON.stringify(applicationsToDisplay, null, 4));
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(
|
||||
getVisuals().table.horizontal(applicationsToDisplay, [
|
||||
'id',
|
||||
'app_name',
|
||||
'app_name => NAME',
|
||||
'slug',
|
||||
'device_type',
|
||||
'device_count',
|
||||
'online_devices',
|
||||
],
|
||||
options,
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user