mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-24 18:45:07 +00:00
Compare commits
22 Commits
example-mo
...
v19.0.10
Author | SHA1 | Date | |
---|---|---|---|
1699419788 | |||
c25591cb4a | |||
a2b4f76c94 | |||
6a1239bd52 | |||
ddf34326a4 | |||
58f480ad7c | |||
7e6589a7d7 | |||
c699bb1dbc | |||
e101e0f466 | |||
e29273142e | |||
519395cfcd | |||
314e8800d0 | |||
0bb1c892e8 | |||
5eb79f5cf0 | |||
707b249e97 | |||
2a725cd1f0 | |||
83f274cc62 | |||
9242a3493a | |||
aa46d314b4 | |||
58f7dfc894 | |||
39e1c02648 | |||
5f92bbc846 |
8
.github/actions/publish/action.yml
vendored
8
.github/actions/publish/action.yml
vendored
@ -28,7 +28,7 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Download custom source artifact
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
|
||||
path: ${{ runner.temp }}
|
||||
@ -39,7 +39,7 @@ runs:
|
||||
run: tar -xf ${{ runner.temp }}/custom.tgz
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||
with:
|
||||
node-version: ${{ inputs.NODE_VERSION }}
|
||||
cache: npm
|
||||
@ -66,7 +66,7 @@ runs:
|
||||
# https://github.com/Apple-Actions/import-codesign-certs
|
||||
- name: Import Apple code signing certificate
|
||||
if: runner.os == 'macOS'
|
||||
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071 # v1
|
||||
uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2
|
||||
with:
|
||||
p12-file-base64: ${{ fromJSON(inputs.secrets).APPLE_SIGNING }}
|
||||
p12-password: ${{ fromJSON(inputs.secrets).APPLE_SIGNING_PASSWORD }}
|
||||
@ -135,7 +135,7 @@ runs:
|
||||
XCODE_APP_LOADER_TEAM_ID: ${{ inputs.XCODE_APP_LOADER_TEAM_ID }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
||||
with:
|
||||
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ strategy.job-index }}
|
||||
path: dist
|
||||
|
4
.github/actions/test/action.yml
vendored
4
.github/actions/test/action.yml
vendored
@ -26,7 +26,7 @@ runs:
|
||||
steps:
|
||||
# https://github.com/actions/setup-node#caching-global-packages-data
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||
with:
|
||||
node-version: ${{ inputs.NODE_VERSION }}
|
||||
cache: npm
|
||||
@ -58,7 +58,7 @@ runs:
|
||||
run: tar --exclude-vcs -acf ${{ runner.temp }}/custom.tgz .
|
||||
|
||||
- name: Upload custom artifact
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
||||
with:
|
||||
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
|
||||
path: ${{ runner.temp }}/custom.tgz
|
||||
|
@ -1,3 +1,91 @@
|
||||
- commits:
|
||||
- subject: Remove package `@resin.io/valid-email`
|
||||
hash: a2b4f76c94e7fda3f122adf721e0a12d9a0e9164
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: myarmolinsky
|
||||
nested: []
|
||||
version: 19.0.10
|
||||
title: ""
|
||||
date: 2024-09-12T23:00:13.119Z
|
||||
- commits:
|
||||
- subject: Update actions/download-artifact action to v4.1.8
|
||||
hash: 58f480ad7c097952b3ff4e0a5daebc163f2ce7c1
|
||||
body: |
|
||||
Update actions/download-artifact from 4.1.7 to 4.1.8
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Self-hosted Renovate Bot
|
||||
nested: []
|
||||
version: 19.0.9
|
||||
title: ""
|
||||
date: 2024-09-12T16:12:08.049Z
|
||||
- commits:
|
||||
- subject: Update actions/upload-artifact digest to 5076954
|
||||
hash: e101e0f46663585d2999c1bd59c5335a2d012ae4
|
||||
body: |
|
||||
Update actions/upload-artifact
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Self-hosted Renovate Bot
|
||||
nested: []
|
||||
version: 19.0.8
|
||||
title: ""
|
||||
date: 2024-09-12T15:07:51.366Z
|
||||
- commits:
|
||||
- subject: Update actions/setup-node digest to 1e60f62
|
||||
hash: 314e8800d0c6dfeade2140125cb3dd996713713e
|
||||
body: |
|
||||
Update actions/setup-node
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Self-hosted Renovate Bot
|
||||
nested: []
|
||||
version: 19.0.7
|
||||
title: ""
|
||||
date: 2024-09-12T14:13:18.381Z
|
||||
- commits:
|
||||
- subject: Remove moment and moment-duration-format in favor of native time parsing
|
||||
hash: 707b249e972a6943d75014f487285c0dd8085b15
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Otavio Jacobi
|
||||
nested: []
|
||||
version: 19.0.6
|
||||
title: ""
|
||||
date: 2024-09-12T13:47:25.357Z
|
||||
- commits:
|
||||
- subject: Update apple-actions/import-codesign-certs action to v2
|
||||
hash: 9242a3493af4c518c4d1328f19ddf2d95c182af7
|
||||
body: |
|
||||
Update apple-actions/import-codesign-certs from 1 to 2
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Self-hosted Renovate Bot
|
||||
nested: []
|
||||
version: 19.0.5
|
||||
title: ""
|
||||
date: 2024-09-10T15:13:23.938Z
|
||||
- commits:
|
||||
- subject: Update TypeScript to 5.6.2
|
||||
hash: 5f92bbc846fe93cc03ebe7717baafe24f17d4e0d
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Thodoris Greasidis
|
||||
nested: []
|
||||
version: 19.0.4
|
||||
title: ""
|
||||
date: 2024-09-10T14:44:39.949Z
|
||||
- commits:
|
||||
- subject: Reduce use of CJS require() on automation files
|
||||
hash: facc66e9f97d075610d4383efa92dceb5b4f7acf
|
||||
|
28
CHANGELOG.md
28
CHANGELOG.md
@ -4,6 +4,34 @@ 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.10 - 2024-09-12
|
||||
|
||||
* Remove package `@resin.io/valid-email` [myarmolinsky]
|
||||
|
||||
## 19.0.9 - 2024-09-12
|
||||
|
||||
* Update actions/download-artifact action to v4.1.8 [Self-hosted Renovate Bot]
|
||||
|
||||
## 19.0.8 - 2024-09-12
|
||||
|
||||
* Update actions/upload-artifact digest to 5076954 [Self-hosted Renovate Bot]
|
||||
|
||||
## 19.0.7 - 2024-09-12
|
||||
|
||||
* Update actions/setup-node digest to 1e60f62 [Self-hosted Renovate Bot]
|
||||
|
||||
## 19.0.6 - 2024-09-12
|
||||
|
||||
* Remove moment and moment-duration-format in favor of native time parsing [Otavio Jacobi]
|
||||
|
||||
## 19.0.5 - 2024-09-10
|
||||
|
||||
* Update apple-actions/import-codesign-certs action to v2 [Self-hosted Renovate Bot]
|
||||
|
||||
## 19.0.4 - 2024-09-10
|
||||
|
||||
* Update TypeScript to 5.6.2 [Thodoris Greasidis]
|
||||
|
||||
## 19.0.3 - 2024-09-05
|
||||
|
||||
* Reduce use of CJS require() on automation files [Otavio Jacobi]
|
||||
|
@ -22,7 +22,7 @@ _balena() {
|
||||
key_cmds=( add rm )
|
||||
local_cmds=( configure flash )
|
||||
os_cmds=( build-config configure download initialize versions )
|
||||
release_cmds=( export finalize import invalidate validate )
|
||||
release_cmds=( finalize invalidate validate )
|
||||
tag_cmds=( rm set )
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ _balena_complete()
|
||||
key_cmds="add rm"
|
||||
local_cmds="configure flash"
|
||||
os_cmds="build-config configure download initialize versions"
|
||||
release_cmds="export finalize import invalidate validate"
|
||||
release_cmds="finalize invalidate validate"
|
||||
tag_cmds="rm set"
|
||||
|
||||
|
||||
|
@ -282,9 +282,7 @@ 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)
|
||||
@ -3347,37 +3345,6 @@ 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
|
||||
@ -3404,40 +3371,6 @@ 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,
|
||||
|
232
npm-shrinkwrap.json
generated
232
npm-shrinkwrap.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "19.0.3",
|
||||
"version": "19.0.10",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "balena-cli",
|
||||
"version": "19.0.3",
|
||||
"version": "19.0.10",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
@ -14,9 +14,7 @@
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"@balena/env-parsing": "^1.1.8",
|
||||
"@balena/es-version": "^1.0.1",
|
||||
"@balena/release-bundle": "^0.5.2",
|
||||
"@oclif/core": "^4.0.8",
|
||||
"@resin.io/valid-email": "^0.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"balena-config-json": "^4.2.0",
|
||||
"balena-device-init": "^7.0.1",
|
||||
@ -59,8 +57,6 @@
|
||||
"JSONStream": "^1.0.3",
|
||||
"livepush": "^3.5.1",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.1",
|
||||
"moment-duration-format": "^2.3.2",
|
||||
"ndjson": "^2.0.0",
|
||||
"node-cleanup": "^2.1.2",
|
||||
"node-unzip-2": "^0.2.8",
|
||||
@ -71,7 +67,7 @@
|
||||
"reconfix": "^1.0.0-v0-1-0-fork-46760acff4d165f5238bfac5e464256ef1944476",
|
||||
"request": "^2.88.2",
|
||||
"resin-cli-form": "^3.0.0",
|
||||
"resin-cli-visuals": "^2.0.0",
|
||||
"resin-cli-visuals": "^2.0.1",
|
||||
"resin-doodles": "^0.2.0",
|
||||
"resin-stream-logger": "^0.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
@ -124,7 +120,6 @@
|
||||
"@types/mixpanel": "^2.14.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/node": "^20.0.0",
|
||||
"@types/node-cleanup": "^2.1.2",
|
||||
@ -172,7 +167,7 @@
|
||||
"simple-git": "^3.14.1",
|
||||
"sinon": "^18.0.0",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "^5.5.2"
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.6.0"
|
||||
@ -1657,40 +1652,6 @@
|
||||
"web-streams-polyfill": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/release-bundle": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@balena/release-bundle/-/release-bundle-0.5.2.tgz",
|
||||
"integrity": "sha512-q2ji3Pky9RGeztApTBaoZEF2R8FSiHsFutIvvlmA0ggJKgATxNNavZd4ueYtlK/Nl53g9vUrKmiwzCVgw9rDRw==",
|
||||
"dependencies": {
|
||||
"@balena/resource-bundle": "^0.8.3",
|
||||
"balena-semver": "^2.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"balena-sdk": "^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/resource-bundle": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@balena/resource-bundle/-/resource-bundle-0.8.3.tgz",
|
||||
"integrity": "sha512-WKkeZkZIcrey1l08G1gS60EQCYtTZsOwwmnRhvmjnmWmUAcqa3Z9WqYDqM7ePbFO/pdo9Cd0JK0Xr+pgj3A8ng==",
|
||||
"dependencies": {
|
||||
"auth-header": "^1.0.0",
|
||||
"tar-stream": "^3.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/resource-bundle/node_modules/tar-stream": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",
|
||||
"integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==",
|
||||
"dependencies": {
|
||||
"b4a": "^1.6.4",
|
||||
"fast-fifo": "^1.2.0",
|
||||
"streamx": "^2.15.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/udif": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@balena/udif/-/udif-1.1.2.tgz",
|
||||
@ -2600,14 +2561,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@resin.io/types-home-or-tmp/-/types-home-or-tmp-3.0.0.tgz",
|
||||
"integrity": "sha1-PsiRM0Nv7msb7jkC8fluJgXXnU0="
|
||||
},
|
||||
"node_modules/@resin.io/valid-email": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@resin.io/valid-email/-/valid-email-0.1.0.tgz",
|
||||
"integrity": "sha1-DnUwmoQ8AUqAqhSC+WmQYvL6UV0=",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ronomon/direct-io": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ronomon/direct-io/-/direct-io-3.0.1.tgz",
|
||||
@ -3900,15 +3853,6 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/moment-duration-format": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/moment-duration-format/-/moment-duration-format-2.2.3.tgz",
|
||||
"integrity": "sha512-NQrnFOX1PTvHY8OH1aLoZntAkc2ad/1Cdl31UWIEaqBpDJ/m5SwfFBtFaX7TBLavASeLxG8DL7rm3NHKCLduaA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mute-stream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz",
|
||||
@ -5362,11 +5306,6 @@
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/auth-header": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz",
|
||||
"integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA=="
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||
@ -5905,9 +5844,9 @@
|
||||
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "1.20.2",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
|
||||
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
|
||||
"version": "1.20.3",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
||||
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"content-type": "~1.0.5",
|
||||
@ -5917,7 +5856,7 @@
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.11.0",
|
||||
"qs": "6.13.0",
|
||||
"raw-body": "2.5.2",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
@ -7783,7 +7722,7 @@
|
||||
"node_modules/encodeurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
|
||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@ -8735,36 +8674,36 @@
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.19.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
|
||||
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
|
||||
"version": "4.21.0",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz",
|
||||
"integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.2",
|
||||
"body-parser": "1.20.3",
|
||||
"content-disposition": "0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.6.0",
|
||||
"cookie-signature": "1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.2.0",
|
||||
"finalhandler": "1.3.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"merge-descriptors": "1.0.1",
|
||||
"merge-descriptors": "1.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.7",
|
||||
"path-to-regexp": "0.1.10",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.11.0",
|
||||
"qs": "6.13.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.18.0",
|
||||
"serve-static": "1.15.0",
|
||||
"send": "0.19.0",
|
||||
"serve-static": "1.16.2",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
@ -8796,6 +8735,14 @@
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/encodeurl": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
@ -9153,12 +9100,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
||||
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
@ -9177,6 +9124,14 @@
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler/node_modules/encodeurl": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
@ -12465,9 +12420,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
||||
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
@ -12761,15 +12719,11 @@
|
||||
"version": "2.30.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/moment-duration-format": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/moment-duration-format/-/moment-duration-format-2.3.2.tgz",
|
||||
"integrity": "sha512-cBMXjSW+fjOb4tyaVHuaVE/A5TqkukDWiOfxxAjY+PEqmmBQlLwn+8OzwPiG3brouXKY5Un4pBjAeB6UToXHaQ=="
|
||||
},
|
||||
"node_modules/mountutils": {
|
||||
"version": "1.3.21",
|
||||
"resolved": "https://registry.npmjs.org/mountutils/-/mountutils-1.3.21.tgz",
|
||||
@ -13077,23 +13031,26 @@
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"node_modules/nise": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nise/-/nise-6.0.0.tgz",
|
||||
"integrity": "sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nise/-/nise-6.0.1.tgz",
|
||||
"integrity": "sha512-DAyWGPQEuJVlL2eqKw6gdZKT+E/jo/ZrjEUDAslJLluCz81nWy+KSYybNp3KFm887Yvp7hv12jSM82ld8BmLxg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sinonjs/commons": "^3.0.0",
|
||||
"@sinonjs/fake-timers": "^11.2.2",
|
||||
"@sinonjs/text-encoding": "^0.7.2",
|
||||
"just-extend": "^6.2.0",
|
||||
"path-to-regexp": "^6.2.1"
|
||||
"path-to-regexp": "^8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nise/node_modules/path-to-regexp": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz",
|
||||
"integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==",
|
||||
"dev": true
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.1.0.tgz",
|
||||
"integrity": "sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/no-case": {
|
||||
"version": "3.0.4",
|
||||
@ -14425,9 +14382,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||
"version": "0.1.10",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
|
||||
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w=="
|
||||
},
|
||||
"node_modules/path-type": {
|
||||
"version": "4.0.0",
|
||||
@ -14810,9 +14767,9 @@
|
||||
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="
|
||||
},
|
||||
"node_modules/pump": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.1.tgz",
|
||||
"integrity": "sha512-2ynnAmUu45oUSq51AQbeugLkMSKaz8FqVpZ6ykTqzOVkzXe8u/ezkGsYrFJqKZx+D9cVxoDrSbR7CeAwxFa5cQ==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
|
||||
"integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
|
||||
"dependencies": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
@ -14848,11 +14805,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.11.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
||||
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.4"
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
@ -15295,9 +15252,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/resin-cli-visuals": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resin-cli-visuals/-/resin-cli-visuals-2.0.0.tgz",
|
||||
"integrity": "sha512-2iv6NydvsdBWaSxhQJBnbtP68BrEzd8nduVC9Il9NptRMiXf6zUEeWxlJY2ZHQcPAxqhLMJS/+SrdZ8gR+2XPg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/resin-cli-visuals/-/resin-cli-visuals-2.0.1.tgz",
|
||||
"integrity": "sha512-Wfhhh+p/Mmdv4n/cD+WRC8KjDOj1RmEhbmiz2mu2YMdz53Umn7/Z4mQF1zNajwmQW1LfltFfUyz7G74Rprw6yg==",
|
||||
"dependencies": {
|
||||
"bluebird": "^3.5.1",
|
||||
"chalk": "^3.0.0",
|
||||
@ -15307,8 +15264,6 @@
|
||||
"inquirer": "^7.3.3",
|
||||
"is-promise": "^4.0.0",
|
||||
"lodash": "^4.17.20",
|
||||
"moment": "^2.27.0",
|
||||
"moment-duration-format": "^2.2.2",
|
||||
"progress-bar-formatter": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
@ -15788,9 +15743,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/send": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
||||
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
||||
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
@ -15880,19 +15835,27 @@
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
||||
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
||||
"version": "1.16.2",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
||||
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
||||
"dependencies": {
|
||||
"encodeurl": "~1.0.2",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"parseurl": "~1.3.3",
|
||||
"send": "0.18.0"
|
||||
"send": "0.19.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/encodeurl": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
@ -17265,9 +17228,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.5.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
|
||||
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
|
||||
"version": "5.6.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
|
||||
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@ -17519,20 +17483,6 @@
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
||||
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ=="
|
||||
},
|
||||
"node_modules/url/node_modules/qs": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/usb": {
|
||||
"version": "2.13.0",
|
||||
"resolved": "https://registry.npmjs.org/usb/-/usb-2.13.0.tgz",
|
||||
|
13
package.json
13
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "balena-cli",
|
||||
"version": "19.0.3",
|
||||
"version": "19.0.10",
|
||||
"description": "The official balena Command Line Interface",
|
||||
"main": "./build/app.js",
|
||||
"homepage": "https://github.com/balena-io/balena-cli",
|
||||
@ -141,7 +141,6 @@
|
||||
"@types/mixpanel": "^2.14.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/node": "^20.0.0",
|
||||
"@types/node-cleanup": "^2.1.2",
|
||||
@ -189,16 +188,14 @@
|
||||
"simple-git": "^3.14.1",
|
||||
"sinon": "^18.0.0",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "^5.5.2"
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@balena/compose": "^4.0.1",
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"@balena/env-parsing": "^1.1.8",
|
||||
"@balena/es-version": "^1.0.1",
|
||||
"@balena/release-bundle": "^0.5.2",
|
||||
"@oclif/core": "^4.0.8",
|
||||
"@resin.io/valid-email": "^0.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"balena-config-json": "^4.2.0",
|
||||
"balena-device-init": "^7.0.1",
|
||||
@ -241,8 +238,6 @@
|
||||
"JSONStream": "^1.0.3",
|
||||
"livepush": "^3.5.1",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.1",
|
||||
"moment-duration-format": "^2.3.2",
|
||||
"ndjson": "^2.0.0",
|
||||
"node-cleanup": "^2.1.2",
|
||||
"node-unzip-2": "^0.2.8",
|
||||
@ -253,7 +248,7 @@
|
||||
"reconfix": "^1.0.0-v0-1-0-fork-46760acff4d165f5238bfac5e464256ef1944476",
|
||||
"request": "^2.88.2",
|
||||
"resin-cli-form": "^3.0.0",
|
||||
"resin-cli-visuals": "^2.0.0",
|
||||
"resin-cli-visuals": "^2.0.1",
|
||||
"resin-doodles": "^0.2.0",
|
||||
"resin-stream-logger": "^0.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
@ -281,6 +276,6 @@
|
||||
}
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2024-09-05T12:34:09.871Z"
|
||||
"publishedAt": "2024-09-12T23:00:14.028Z"
|
||||
}
|
||||
}
|
||||
|
@ -1,116 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-2024 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 { commitOrIdArg } from '.';
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { create } from '@balena/release-bundle';
|
||||
import * as fs from 'fs/promises';
|
||||
import * as semver from 'balena-semver';
|
||||
import { ExpectedError } from '../../errors';
|
||||
|
||||
export default class ReleaseExportCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Exports a release into a file.
|
||||
|
||||
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.
|
||||
`;
|
||||
public static examples = [
|
||||
'$ balena release export a777f7345fe3d655c1c981aa642e5555 -o ../path/to/release.tar',
|
||||
'$ balena release export myOrg/myFleet --version 1.2.3 -o ../path/to/release.tar',
|
||||
];
|
||||
|
||||
public static usage = 'release export <commitOrId>';
|
||||
|
||||
public static flags = {
|
||||
output: Flags.string({
|
||||
description: 'output path',
|
||||
char: 'o',
|
||||
required: true,
|
||||
}),
|
||||
version: Flags.string({
|
||||
description: 'version of the release to export from the specified fleet',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
commitOrId: commitOrIdArg({
|
||||
description: 'commit, ID, or version of the release to export',
|
||||
required: true,
|
||||
}),
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params, flags: options } = await this.parse(ReleaseExportCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
let release: balenaSdk.Release;
|
||||
if (typeof options.version === 'string') {
|
||||
const application = params.commitOrId;
|
||||
const parsedVersion = semver.parse(options.version);
|
||||
if (parsedVersion == null) {
|
||||
throw new ExpectedError(
|
||||
`Release of ${application} with version ${options.version} could not be exported; version must be valid SemVer.`,
|
||||
);
|
||||
} else {
|
||||
const rawVersion =
|
||||
parsedVersion.build.length === 0
|
||||
? parsedVersion.version
|
||||
: `${parsedVersion.version}+${parsedVersion.build[0]}`;
|
||||
release = await balena.models.release.get(
|
||||
{ application, rawVersion },
|
||||
{ $select: ['id'] },
|
||||
);
|
||||
}
|
||||
} else {
|
||||
release = await balena.models.release.get(params.commitOrId, {
|
||||
$select: ['id'],
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
const releaseBundle = await create({
|
||||
sdk: balena,
|
||||
releaseId: release.id,
|
||||
});
|
||||
await fs.writeFile(options.output, releaseBundle);
|
||||
const versionInfo =
|
||||
typeof options.version === 'string'
|
||||
? ` version ${options.version}`
|
||||
: '';
|
||||
console.log(
|
||||
`Release ${params.commitOrId}${versionInfo} has been exported to ${options.output}.`,
|
||||
);
|
||||
} catch (error) {
|
||||
throw new ExpectedError(
|
||||
`Release ${params.commitOrId} could not be exported: ${error.message}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016-2024 Balena Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { apply } from '@balena/release-bundle';
|
||||
import { createReadStream } from 'fs';
|
||||
import { ExpectedError } from '../../errors';
|
||||
|
||||
export default class ReleaseImportCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
Imports a release from a file to an app or fleet. The revision field of the release
|
||||
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.
|
||||
`;
|
||||
public static 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',
|
||||
];
|
||||
|
||||
public static usage = 'release import <file> <fleet>';
|
||||
|
||||
public static flags = {
|
||||
'override-version': Flags.string({
|
||||
description:
|
||||
'Imports this release with the specified version overriding the version in the file.',
|
||||
required: false,
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
bundle: Args.string({
|
||||
required: true,
|
||||
description: 'path to a file, e.g. "./release.tar"',
|
||||
}),
|
||||
fleet: Args.string({
|
||||
required: true,
|
||||
description:
|
||||
'fleet that the release will be imported to, e.g. "myOrg/myFleet"',
|
||||
}),
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
const { args: params, flags: options } = await this.parse(ReleaseImportCmd);
|
||||
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const bundle = createReadStream(params.bundle).on('error', () => {
|
||||
throw new ExpectedError(
|
||||
`Release bundle ${params.bundle} does not exist or is not accessible.`,
|
||||
);
|
||||
});
|
||||
|
||||
try {
|
||||
const application = await balena.models.application.get(params.fleet, {
|
||||
$select: ['id'],
|
||||
});
|
||||
if (application == null) {
|
||||
throw new ExpectedError(`Fleet ${params.fleet} not found.`);
|
||||
}
|
||||
await apply({
|
||||
sdk: balena,
|
||||
application: application.id,
|
||||
stream: bundle,
|
||||
version: options['override-version'],
|
||||
});
|
||||
console.log(
|
||||
`Release bundle ${params.bundle} has been imported to ${params.fleet}.`,
|
||||
);
|
||||
} catch (error) {
|
||||
throw new ExpectedError(
|
||||
`Could not import release bundle ${params.bundle} to fleet ${params.fleet}: ${error.message}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -308,6 +308,21 @@ export const authorizePush = function (
|
||||
|
||||
// utilities
|
||||
|
||||
const formatDuration = (seconds: number): string => {
|
||||
const SECONDS_PER_MINUTE = 60;
|
||||
const SECONDS_PER_HOUR = 3600;
|
||||
|
||||
const hours = Math.floor(seconds / SECONDS_PER_HOUR);
|
||||
seconds %= SECONDS_PER_HOUR;
|
||||
|
||||
const minutes = Math.floor(seconds / SECONDS_PER_MINUTE);
|
||||
seconds = Math.floor(seconds % SECONDS_PER_MINUTE);
|
||||
|
||||
return hours > 0
|
||||
? `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`
|
||||
: `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
||||
};
|
||||
|
||||
const renderProgressBar = function (percentage: number, stepCount: number) {
|
||||
const _ = require('lodash') as typeof import('lodash');
|
||||
percentage = _.clamp(percentage, 0, 100);
|
||||
@ -479,11 +494,6 @@ export class BuildProgressUI implements Renderer {
|
||||
}
|
||||
|
||||
_renderStatus(end = false) {
|
||||
const moment = require('moment') as typeof import('moment');
|
||||
(
|
||||
require('moment-duration-format') as typeof import('moment-duration-format')
|
||||
)(moment);
|
||||
|
||||
this._tty.clearLine();
|
||||
this._tty.write(this._prefix);
|
||||
if (end && this._cancelled) {
|
||||
@ -495,12 +505,8 @@ export class BuildProgressUI implements Renderer {
|
||||
const durationStr =
|
||||
this._startTime == null
|
||||
? 'unknown time'
|
||||
: moment
|
||||
.duration(
|
||||
Math.floor((Date.now() - this._startTime) / 1000),
|
||||
'seconds',
|
||||
)
|
||||
.format();
|
||||
: formatDuration((Date.now() - this._startTime) / 1000);
|
||||
|
||||
this._tty.writeLine(`Built ${serviceStr} in ${durationStr}`);
|
||||
} else {
|
||||
this._tty.writeLine(`Building services... ${this._spinner()}`);
|
||||
@ -577,11 +583,6 @@ export class BuildProgressInline implements Renderer {
|
||||
}
|
||||
|
||||
end(summary?: Dictionary<string>) {
|
||||
const moment = require('moment') as typeof import('moment');
|
||||
(
|
||||
require('moment-duration-format') as typeof import('moment-duration-format')
|
||||
)(moment);
|
||||
|
||||
if (this._ended) {
|
||||
return;
|
||||
}
|
||||
@ -599,12 +600,7 @@ export class BuildProgressInline implements Renderer {
|
||||
const durationStr =
|
||||
this._startTime == null
|
||||
? 'unknown time'
|
||||
: moment
|
||||
.duration(
|
||||
Math.floor((Date.now() - this._startTime) / 1000),
|
||||
'seconds',
|
||||
)
|
||||
.format();
|
||||
: formatDuration((Date.now() - this._startTime) / 1000);
|
||||
this._outStream.write(`Built ${serviceStr} in ${durationStr}\n`);
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ export function getProxyConfig(): ProxyConfig | undefined {
|
||||
const proxyUrl = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
|
||||
if (proxyUrl) {
|
||||
const { URL } = require('url') as typeof import('url');
|
||||
let url: URL;
|
||||
let url: InstanceType<typeof URL>;
|
||||
try {
|
||||
url = new URL(proxyUrl);
|
||||
} catch (_e) {
|
||||
|
@ -13,10 +13,13 @@ 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 validEmail = require('@resin.io/valid-email');
|
||||
import { ExpectedError } from '../errors';
|
||||
|
||||
// Sufficiently good email regex in order not to bring in another dependency.
|
||||
const isValidEmail = (email: string): boolean => {
|
||||
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
||||
};
|
||||
|
||||
const APPNAME_REGEX = new RegExp(/^[a-zA-Z0-9_-]+$/);
|
||||
// An regex to detect an IP address, from https://www.regular-expressions.info/ip.html
|
||||
const IP_REGEX = new RegExp(
|
||||
@ -26,7 +29,7 @@ const DOTLOCAL_REGEX = new RegExp(/^([a-zA-Z0-9-]+\.)+local$/);
|
||||
const UUID_REGEX = new RegExp(/^[0-9a-f]+$/);
|
||||
|
||||
export function validateEmail(input: string) {
|
||||
if (!validEmail(input)) {
|
||||
if (!isValidEmail(input)) {
|
||||
return 'Email is not valid';
|
||||
}
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
import * as stream from 'node:stream';
|
||||
import { cleanOutput, runCommand } from '../../helpers';
|
||||
import { BalenaAPIMock } from '../../nock/balena-api-mock';
|
||||
import { expect } from 'chai';
|
||||
import * as mock from 'mock-require';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
// "itSS" means "it() Skip Standalone"
|
||||
const itSS = process.env.BALENA_CLI_TEST_TYPE === 'standalone' ? it.skip : it;
|
||||
|
||||
describe('export fleet content to a file', function () {
|
||||
let api: BalenaAPIMock;
|
||||
const releaseBundleCreateStub = sinon.stub();
|
||||
|
||||
this.beforeEach(() => {
|
||||
api = new BalenaAPIMock();
|
||||
mock('@balena/release-bundle', {
|
||||
create: releaseBundleCreateStub,
|
||||
});
|
||||
});
|
||||
|
||||
this.afterEach(() => {
|
||||
// Check all expected api calls have been made and clean up.
|
||||
api.done();
|
||||
mock.stop('@balena/release-bundle');
|
||||
});
|
||||
|
||||
itSS('should export a release to a file', async () => {
|
||||
api.expectGetWhoAmI();
|
||||
api.expectGetRelease();
|
||||
releaseBundleCreateStub.resolves(stream.Readable.from('something'));
|
||||
|
||||
const { out, err } = await runCommand(
|
||||
'release export badc0ffe -o /tmp/release.tar.gz',
|
||||
);
|
||||
|
||||
const lines = cleanOutput(out);
|
||||
expect(lines[0]).to.contain(
|
||||
'Release badc0ffe has been exported to /tmp/release.tar.gz.',
|
||||
);
|
||||
expect(err).to.be.empty;
|
||||
});
|
||||
|
||||
itSS('should fail if the create throws an error', async () => {
|
||||
api.expectGetWhoAmI();
|
||||
api.expectGetRelease();
|
||||
releaseBundleCreateStub.rejects(
|
||||
new Error('Something went wrong creating the bundle'),
|
||||
);
|
||||
|
||||
const { err } = await runCommand(
|
||||
'release export badc0ffe -o /tmp/release.tar.gz',
|
||||
);
|
||||
|
||||
expect(cleanOutput(err, true)).to.include(
|
||||
'Release badc0ffe could not be exported: Something went wrong creating the bundle',
|
||||
);
|
||||
});
|
||||
|
||||
itSS('should parse with application slug and version', async () => {
|
||||
api.expectGetWhoAmI();
|
||||
api.expectGetRelease();
|
||||
api.expectGetApplication();
|
||||
releaseBundleCreateStub.resolves(stream.Readable.from('something'));
|
||||
|
||||
const { out, err } = await runCommand(
|
||||
'release export org/superApp -o /tmp/release.tar.gz --version 1.2.3+rev1',
|
||||
);
|
||||
|
||||
const lines = cleanOutput(out);
|
||||
expect(lines[0]).to.contain(
|
||||
'Release org/superApp version 1.2.3+rev1 has been exported to /tmp/release.tar.gz.',
|
||||
);
|
||||
expect(err).to.be.empty;
|
||||
});
|
||||
});
|
@ -205,12 +205,6 @@
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/push/index.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/export.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/import.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/index.js
|
||||
|
@ -205,12 +205,6 @@
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/push/index.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/export.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/import.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/index.js
|
||||
|
@ -205,12 +205,6 @@
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/push/index.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/export.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/import.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/index.js
|
||||
|
@ -205,12 +205,6 @@
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/push/index.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/export.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/import.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules/@oclif/core/package.json
|
||||
%2: build/commands/release/index.js
|
||||
|
@ -205,12 +205,6 @@
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules\@oclif\core\package.json
|
||||
%2: build\commands\push\index.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules\@oclif\core\package.json
|
||||
%2: build\commands\release\export.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules\@oclif\core\package.json
|
||||
%2: build\commands\release\import.js
|
||||
> Warning Entry 'main' not found in %1
|
||||
%1: node_modules\@oclif\core\package.json
|
||||
%2: build\commands\release\index.js
|
||||
|
18
typings/resin.io/index.d.ts
vendored
18
typings/resin.io/index.d.ts
vendored
@ -1,18 +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 '@resin.io/valid-email';
|
Reference in New Issue
Block a user