mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
commit
6dd6f43d64
@ -25,7 +25,14 @@ function renderOclifCommand(command: Category['commands'][0]): string[] {
|
||||
const result = [`## ${ent.encode(command.name || '')}`];
|
||||
if (command.aliases?.length) {
|
||||
result.push('### Aliases');
|
||||
result.push(command.aliases.map((alias) => `- \`${alias}\``).join('\n'));
|
||||
result.push(
|
||||
command.aliases
|
||||
.map(
|
||||
(alias) =>
|
||||
`- \`${alias}\`${command.deprecateAliases ? ' *(deprecated)*' : ''}`,
|
||||
)
|
||||
.join('\n'),
|
||||
);
|
||||
result.push(
|
||||
`\nTo use one of the aliases, replace \`${command.name}\` with the alias.`,
|
||||
);
|
||||
|
@ -29,7 +29,7 @@ _balena() {
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)--version[show version and exit]' \
|
||||
'(- 1 *)'{-h,--help}'[show help options and exit]' \
|
||||
'(- 1 *)--help[show help options and exit]' \
|
||||
'1:first command:_balena_main_cmds' \
|
||||
'2:second command:_balena_sec_cmds' \
|
||||
&& ret=0
|
||||
|
@ -14,7 +14,7 @@ $sub_cmds$
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)--version[show version and exit]' \
|
||||
'(- 1 *)'{-h,--help}'[show help options and exit]' \
|
||||
'(- 1 *)--help[show help options and exit]' \
|
||||
'1:first command:_balena_main_cmds' \
|
||||
'2:second command:_balena_sec_cmds' \
|
||||
&& ret=0
|
||||
|
@ -333,13 +333,11 @@ Examples:
|
||||
|
||||
the API key name
|
||||
|
||||
### Options
|
||||
|
||||
## api-key list
|
||||
|
||||
### Aliases
|
||||
|
||||
- `api-keys`
|
||||
- `api-keys` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `api-key list` with the alias.
|
||||
@ -384,8 +382,6 @@ Examples:
|
||||
|
||||
the API key ids
|
||||
|
||||
### Options
|
||||
|
||||
# Apps
|
||||
|
||||
## app create
|
||||
@ -1229,7 +1225,7 @@ Docker host TLS key file
|
||||
|
||||
### Aliases
|
||||
|
||||
- `devices supported`
|
||||
- `devices supported` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device-type list` with the alias.
|
||||
@ -1296,7 +1292,7 @@ answer "yes" to all questions (non interactive use)
|
||||
|
||||
### Aliases
|
||||
|
||||
- `scan`
|
||||
- `scan` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device detect` with the alias.
|
||||
@ -1346,8 +1342,6 @@ Examples:
|
||||
|
||||
the uuid of the device to identify
|
||||
|
||||
### Options
|
||||
|
||||
## device
|
||||
|
||||
### Description
|
||||
@ -1473,7 +1467,7 @@ expiry date assigned to generated provisioning api key (format: YYYY-MM-DD)
|
||||
|
||||
### Aliases
|
||||
|
||||
- `devices`
|
||||
- `devices` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device list` with the alias.
|
||||
@ -1554,7 +1548,7 @@ output boolean indicating local mode status
|
||||
|
||||
### Aliases
|
||||
|
||||
- `logs`
|
||||
- `logs` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device logs` with the alias.
|
||||
@ -1655,7 +1649,7 @@ fleet name or slug (preferred)
|
||||
|
||||
### Aliases
|
||||
|
||||
- `notes`
|
||||
- `notes` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device note` with the alias.
|
||||
@ -1749,8 +1743,6 @@ the uuid of the device to pin to a release
|
||||
|
||||
the commit of the release for the device to get pinned to
|
||||
|
||||
### Options
|
||||
|
||||
## device public-url
|
||||
|
||||
### Description
|
||||
@ -1807,8 +1799,6 @@ Examples:
|
||||
|
||||
comma-separated list (no blank spaces) of device UUIDs
|
||||
|
||||
### Options
|
||||
|
||||
## device reboot
|
||||
|
||||
### Description
|
||||
@ -1895,8 +1885,6 @@ the uuid of the device to rename
|
||||
|
||||
the new name for the device
|
||||
|
||||
### Options
|
||||
|
||||
## device restart
|
||||
|
||||
### Description
|
||||
@ -1982,7 +1970,7 @@ force action if the update lock is set
|
||||
|
||||
### Aliases
|
||||
|
||||
- `ssh`
|
||||
- `ssh` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device ssh` with the alias.
|
||||
@ -2076,8 +2064,6 @@ comma-separated list (no blank spaces) of device UUIDs
|
||||
|
||||
comma-separated list (no blank spaces) of service names
|
||||
|
||||
### Options
|
||||
|
||||
## device stop-service
|
||||
|
||||
### Description
|
||||
@ -2102,8 +2088,6 @@ comma-separated list (no blank spaces) of device UUIDs
|
||||
|
||||
comma-separated list (no blank spaces) of service names
|
||||
|
||||
### Options
|
||||
|
||||
## device track-fleet
|
||||
|
||||
### Description
|
||||
@ -2120,13 +2104,11 @@ Examples:
|
||||
|
||||
the uuid of the device to make track the fleet's release
|
||||
|
||||
### Options
|
||||
|
||||
## device tunnel
|
||||
|
||||
### Aliases
|
||||
|
||||
- `tunnel`
|
||||
- `tunnel` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `device tunnel` with the alias.
|
||||
@ -2188,7 +2170,7 @@ port mapping in the format <remotePort>[:[localIP:]localPort]
|
||||
|
||||
### Aliases
|
||||
|
||||
- `envs`
|
||||
- `envs` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `env list` with the alias.
|
||||
@ -2406,7 +2388,7 @@ do not prompt for confirmation before deleting the variable
|
||||
|
||||
### Aliases
|
||||
|
||||
- `env add`
|
||||
- `env add` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `env set` with the alias.
|
||||
@ -2573,7 +2555,7 @@ produce JSON output instead of tabular output
|
||||
|
||||
### Aliases
|
||||
|
||||
- `fleets`
|
||||
- `fleets` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `fleet list` with the alias.
|
||||
@ -2618,8 +2600,6 @@ the slug of the fleet to pin to a release
|
||||
|
||||
the commit of the release for the fleet to get pinned to
|
||||
|
||||
### Options
|
||||
|
||||
## fleet purge
|
||||
|
||||
### Description
|
||||
@ -2648,8 +2628,6 @@ Examples:
|
||||
|
||||
fleet name or slug (preferred)
|
||||
|
||||
### Options
|
||||
|
||||
## fleet rename
|
||||
|
||||
### Description
|
||||
@ -2685,8 +2663,6 @@ fleet name or slug (preferred)
|
||||
|
||||
the new name for the fleet
|
||||
|
||||
### Options
|
||||
|
||||
## fleet restart
|
||||
|
||||
### Description
|
||||
@ -2714,8 +2690,6 @@ Examples:
|
||||
|
||||
fleet name or slug (preferred)
|
||||
|
||||
### Options
|
||||
|
||||
## fleet rm
|
||||
|
||||
### Description
|
||||
@ -2769,8 +2743,6 @@ Examples:
|
||||
|
||||
the slug of the fleet to make track the latest release
|
||||
|
||||
### Options
|
||||
|
||||
# Local
|
||||
|
||||
## local configure
|
||||
@ -2790,8 +2762,6 @@ Examples:
|
||||
|
||||
path of drive or image to configure
|
||||
|
||||
### Options
|
||||
|
||||
## local flash
|
||||
|
||||
### Description
|
||||
@ -2832,7 +2802,7 @@ answer "yes" to all questions (non interactive use)
|
||||
|
||||
### Aliases
|
||||
|
||||
- `orgs`
|
||||
- `orgs` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `organization list` with the alias.
|
||||
@ -2845,8 +2815,6 @@ Examples:
|
||||
|
||||
$ balena organization list
|
||||
|
||||
### Options
|
||||
|
||||
# OS
|
||||
|
||||
## os build-config
|
||||
@ -3217,8 +3185,6 @@ Examples:
|
||||
|
||||
the device IP or hostname
|
||||
|
||||
### Options
|
||||
|
||||
# Preload
|
||||
|
||||
## preload
|
||||
@ -3586,8 +3552,6 @@ Examples:
|
||||
|
||||
the commit or ID of the release to finalize
|
||||
|
||||
### Options
|
||||
|
||||
## release
|
||||
|
||||
### Description
|
||||
@ -3641,13 +3605,11 @@ Examples:
|
||||
|
||||
the commit or ID of the release to invalidate
|
||||
|
||||
### Options
|
||||
|
||||
## release list
|
||||
|
||||
### Aliases
|
||||
|
||||
- `releases`
|
||||
- `releases` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `release list` with the alias.
|
||||
@ -3708,8 +3670,6 @@ Examples:
|
||||
|
||||
the commit or ID of the release to validate
|
||||
|
||||
### Options
|
||||
|
||||
# Settings
|
||||
|
||||
## settings
|
||||
@ -3722,15 +3682,13 @@ Examples:
|
||||
|
||||
$ balena settings
|
||||
|
||||
### Options
|
||||
|
||||
# SSH Keys
|
||||
|
||||
## ssh-key add
|
||||
|
||||
### Aliases
|
||||
|
||||
- `key add`
|
||||
- `key add` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `ssh-key add` with the alias.
|
||||
@ -3772,13 +3730,11 @@ the SSH key name
|
||||
|
||||
the path to the public key file
|
||||
|
||||
### Options
|
||||
|
||||
## ssh-key
|
||||
|
||||
### Aliases
|
||||
|
||||
- `key`
|
||||
- `key` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `ssh-key` with the alias.
|
||||
@ -3797,14 +3753,12 @@ Examples:
|
||||
|
||||
balenaCloud ID for the SSH key
|
||||
|
||||
### Options
|
||||
|
||||
## ssh-key list
|
||||
|
||||
### Aliases
|
||||
|
||||
- `keys`
|
||||
- `key list`
|
||||
- `keys` *(deprecated)*
|
||||
- `key list` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `ssh-key list` with the alias.
|
||||
@ -3817,13 +3771,11 @@ Examples:
|
||||
|
||||
$ balena ssh-key list
|
||||
|
||||
### Options
|
||||
|
||||
## ssh-key rm
|
||||
|
||||
### Aliases
|
||||
|
||||
- `key rm`
|
||||
- `key rm` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `ssh-key rm` with the alias.
|
||||
@ -3909,7 +3861,7 @@ length of time to enable support for, in (h)ours or (d)ays, e.g. 12h, 2d
|
||||
|
||||
### Aliases
|
||||
|
||||
- `tags`
|
||||
- `tags` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `tag list` with the alias.
|
||||
@ -4058,8 +4010,6 @@ release id
|
||||
List available drives which are usable for writing an OS image to.
|
||||
Does not list system drives.
|
||||
|
||||
### Options
|
||||
|
||||
# Version
|
||||
|
||||
## version
|
||||
|
529
npm-shrinkwrap.json
generated
529
npm-shrinkwrap.json
generated
@ -10,7 +10,7 @@
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@balena/compose": "^4.0.1",
|
||||
"@balena/compose": "^5.0.0",
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"@balena/env-parsing": "^1.1.8",
|
||||
"@balena/es-version": "^1.0.1",
|
||||
@ -20,8 +20,8 @@
|
||||
"balena-device-init": "^7.0.1",
|
||||
"balena-errors": "^4.7.3",
|
||||
"balena-image-fs": "^7.0.6",
|
||||
"balena-preload": "^15.0.6",
|
||||
"balena-sdk": "^19.7.3",
|
||||
"balena-preload": "^16.0.0",
|
||||
"balena-sdk": "^20.3.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^5.0.2",
|
||||
"balena-settings-storage": "^8.1.0",
|
||||
@ -1264,13 +1264,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.9.tgz",
|
||||
"integrity": "sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==",
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.0.tgz",
|
||||
"integrity": "sha512-aP8x5pIw3xvYr/sXT+SEUwyhrXT8rUJRZltK/qN3Db80dcKpTett8cJxHyjk+xYSVXvNnl2SfcJVjbwxpOSscA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.25.9"
|
||||
"@babel/types": "^7.26.0"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@ -1280,11 +1279,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser/node_modules/@babel/types": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.9.tgz",
|
||||
"integrity": "sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==",
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz",
|
||||
"integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
@ -1308,11 +1306,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template/node_modules/@babel/types": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.9.tgz",
|
||||
"integrity": "sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==",
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz",
|
||||
"integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
@ -1343,13 +1340,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse/node_modules/@babel/generator": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.9.tgz",
|
||||
"integrity": "sha512-omlUGkr5EaoIJrhLf9CJ0TvjBRpd9+AXRG//0GEQ9THSo8wPiTlbpy1/Ow8ZTrbXpjd9FHXfbFQx32I04ht0FA==",
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz",
|
||||
"integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.25.9",
|
||||
"@babel/parser": "^7.26.0",
|
||||
"@babel/types": "^7.26.0",
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"jsesc": "^3.0.2"
|
||||
@ -1359,11 +1356,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse/node_modules/@babel/types": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.9.tgz",
|
||||
"integrity": "sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==",
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz",
|
||||
"integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
@ -1398,6 +1394,50 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/abstract-sql-compiler": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@balena/abstract-sql-compiler/-/abstract-sql-compiler-9.2.0.tgz",
|
||||
"integrity": "sha512-sKSbGNcL19QvqUrslms/k8GsVWjq75g0b8uVh/jpZEUWHniixWq402b+OKs0wRIhtRMsWSVA3CLuC33tYj6KCA==",
|
||||
"dependencies": {
|
||||
"@balena/sbvr-types": "^7.0.1",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/abstract-sql-compiler/node_modules/@balena/sbvr-types": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@balena/sbvr-types/-/sbvr-types-7.1.3.tgz",
|
||||
"integrity": "sha512-kizk+ClfYJVJidMx69BiFSFqtDE97R4JXRYrn1Ff/vK+ycN7Mj3HVObFk5DvckresiBI9S2mvZsysW+RVNmJsg==",
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "^5.1.1",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"sha.js": "^2.4.11"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/abstract-sql-to-typescript": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@balena/abstract-sql-to-typescript/-/abstract-sql-to-typescript-3.3.1.tgz",
|
||||
"integrity": "sha512-0I96tPXwznhNagnnD7rzE+0lb3O2cEmKPBbaktXn6hFZmrKmzG1lgNpc4czfCbrVtOsk+jReWx4wXPnxcu1yXA==",
|
||||
"dependencies": {
|
||||
"@balena/abstract-sql-compiler": "^9.2.0",
|
||||
"@balena/odata-to-abstract-sql": "^6.2.7",
|
||||
"@balena/sbvr-types": "^8.0.0",
|
||||
"@types/node": "^20.14.8",
|
||||
"common-tags": "^1.8.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/apple-plist": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@balena/apple-plist/-/apple-plist-0.0.3.tgz",
|
||||
@ -1410,9 +1450,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/compose": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@balena/compose/-/compose-4.0.1.tgz",
|
||||
"integrity": "sha512-yUaML0V58nl7/3xbCJ5eDJyGMWL8H+iPHD6Fc4GkLco5kFMiySkvlGy7+7cJoBa/p2+7GggQO0vCaOKpI7+GJQ==",
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@balena/compose/-/compose-5.0.0.tgz",
|
||||
"integrity": "sha512-jfp08uSw999cGX8v7tuO6cYD99Ge6yq1cIow1EvmRtKQ8PTkeUh5rxUbaMyUN8/meDnqlyAYpXgwwNUuuePKGQ==",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.3",
|
||||
"docker-file-parser": "^1.0.7",
|
||||
@ -1664,6 +1704,51 @@
|
||||
"web-streams-polyfill": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/odata-parser": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@balena/odata-parser/-/odata-parser-3.0.8.tgz",
|
||||
"integrity": "sha512-EhC7uYZUTIeoBPSAHRfL2tz4H2pfe9vO9U4jf/84NVnh6GKApA8Gfo4QQWwL/SHuz+KJI0LkhjU9yNqKCPE0kg==",
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/odata-to-abstract-sql": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@balena/odata-to-abstract-sql/-/odata-to-abstract-sql-6.3.0.tgz",
|
||||
"integrity": "sha512-T5GDWjDsl2vtPL3LFN59b/JuKbX48frdkeQ6QbQPiWUDQLltTp4piQFAxP6SMpXe/QdWsV9kbNN5yBdTm4PfwQ==",
|
||||
"license": "BSD",
|
||||
"dependencies": {
|
||||
"@balena/abstract-sql-compiler": "^9.2.0",
|
||||
"@balena/odata-parser": "^3.0.8",
|
||||
"@types/lodash": "^4.17.7",
|
||||
"@types/memoizee": "^0.4.11",
|
||||
"@types/string-hash": "^1.1.3",
|
||||
"lodash": "^4.17.21",
|
||||
"memoizee": "^0.4.17",
|
||||
"string-hash": "^1.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/sbvr-types": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@balena/sbvr-types/-/sbvr-types-8.0.0.tgz",
|
||||
"integrity": "sha512-SDvbHOkav+rh9ahNSz6hYKGygK6r2pF8+sTRJ7fLhG4wT5LGmU+BZjjyf/bbuvihcW1fX/vm5WGbyXkFDsG/Qw==",
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
"node": ">=16.13.0",
|
||||
"npm": ">=8.1.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "^5.1.1",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"sha.js": "^2.4.11"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/udif": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@balena/udif/-/udif-1.1.2.tgz",
|
||||
@ -2237,6 +2322,103 @@
|
||||
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",
|
||||
"integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw=="
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
|
||||
"integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"make-dir": "^3.1.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"nopt": "^5.0.0",
|
||||
"npmlog": "^5.0.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.5",
|
||||
"tar": "^6.1.11"
|
||||
},
|
||||
"bin": {
|
||||
"node-pre-gyp": "bin/node-pre-gyp"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/are-we-there-yet": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
|
||||
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
|
||||
"deprecated": "This package is no longer supported.",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/detect-libc": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
|
||||
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/gauge": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
|
||||
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
|
||||
"deprecated": "This package is no longer supported.",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"aproba": "^1.0.3 || ^2.0.0",
|
||||
"color-support": "^1.1.2",
|
||||
"console-control-strings": "^1.0.0",
|
||||
"has-unicode": "^2.0.1",
|
||||
"object-assign": "^4.1.1",
|
||||
"signal-exit": "^3.0.0",
|
||||
"string-width": "^4.2.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"wide-align": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/npmlog": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
|
||||
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
|
||||
"deprecated": "This package is no longer supported.",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"are-we-there-yet": "^2.0.0",
|
||||
"console-control-strings": "^1.1.0",
|
||||
"gauge": "^3.0.0",
|
||||
"set-blocking": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -3687,9 +3869,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.17.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz",
|
||||
"integrity": "sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA=="
|
||||
"version": "4.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz",
|
||||
"integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/memoizee": {
|
||||
"version": "0.4.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/memoizee/-/memoizee-0.4.11.tgz",
|
||||
"integrity": "sha512-2gyorIBZu8GoDr9pYjROkxWWcFtHCquF7TVbN2I+/OvgZhnIGQS0vX5KJz4lXNKb8XOSfxFOSG5OLru1ESqLUg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/mime": {
|
||||
"version": "3.0.4",
|
||||
@ -3747,10 +3936,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.16.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.15.tgz",
|
||||
"integrity": "sha512-DV58qQz9dBMqVVn+qnKwGa51QzCD4YM/tQM16qLKxdf5tqz5W4QwtrMzjSTbabN1cFTSuyxVYBy+QWHjWW8X/g==",
|
||||
"license": "MIT",
|
||||
"version": "20.17.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.1.tgz",
|
||||
"integrity": "sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
@ -3958,6 +4146,12 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/string-hash": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/string-hash/-/string-hash-1.1.3.tgz",
|
||||
"integrity": "sha512-p6skq756fJWiA59g2Uss+cMl6tpoDGuCBuxG0SI1t0NwJmYOU66LAMS6QiCgu7cUh3/hYCaMl5phcCW1JP5wOA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/tar-stream": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/tar-stream/-/tar-stream-2.2.2.tgz",
|
||||
@ -4442,6 +4636,13 @@
|
||||
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
|
||||
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
|
||||
},
|
||||
"node_modules/abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"license": "ISC",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
@ -5320,11 +5521,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/balena-preload": {
|
||||
"version": "15.0.6",
|
||||
"resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-15.0.6.tgz",
|
||||
"integrity": "sha512-WQQu9Agu8usnmwZZFz5G+Qblnry/NsIwpv1hu5PCViHSOARHThQrBu6n5Yhx2LUGQ2J0e+BcoE3eEeBWD3vxuA==",
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-16.0.0.tgz",
|
||||
"integrity": "sha512-IP+4Op6LHJW5ip/oomQmERjbNroKqi5atDI3s07aokgv/mH8J7jy4BOOW6JwnrHb560IQy/oPf4yM4h3qQlLEA==",
|
||||
"dependencies": {
|
||||
"balena-sdk": "^19.7.2",
|
||||
"balena-sdk": "^20.1.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"compare-versions": "^3.6.0",
|
||||
"docker-progress": "^5.0.0",
|
||||
@ -5380,13 +5581,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/balena-sdk": {
|
||||
"version": "19.7.3",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-19.7.3.tgz",
|
||||
"integrity": "sha512-O7c+ZVZVSGOlECvkLvi1DWwbKb7bM3UgPaRlCfld0cOcp6X9S+6fcLt9ewOOhF3YsxrBksYOSYBnrmkW9VxqLQ==",
|
||||
"version": "20.3.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-20.3.0.tgz",
|
||||
"integrity": "sha512-HN8sDLf3Jbl2UrI9UE0zFRf07XRcUh2VLsxsuZYGOi0LQ7aJ8FB6F0DRsPQIDLMuvzz18lnztvpEmgzvTE/P1A==",
|
||||
"dependencies": {
|
||||
"@balena/es-version": "^1.0.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^18.19.50",
|
||||
"abortcontroller-polyfill": "^1.7.1",
|
||||
"balena-auth": "^6.0.1",
|
||||
"balena-errors": "^4.9.0",
|
||||
@ -5402,7 +5603,7 @@
|
||||
"mime": "^3.0.0",
|
||||
"ndjson": "^2.0.0",
|
||||
"p-throttle": "^4.1.1",
|
||||
"pinejs-client-core": "~6.14.0",
|
||||
"pinejs-client-core": "^6.15.0",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -5499,6 +5700,21 @@
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
||||
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
|
||||
},
|
||||
"node_modules/bcrypt": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz",
|
||||
"integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||
"node-addon-api": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bcrypt-pbkdf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
||||
@ -5507,6 +5723,20 @@
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"node_modules/bcrypt/node_modules/node-addon-api": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
|
||||
"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==",
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/bcryptjs": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
||||
"integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==",
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/binary": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
|
||||
@ -6283,6 +6513,16 @@
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/color-support": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"color-support": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
@ -6852,12 +7092,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/d": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
|
||||
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz",
|
||||
"integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"es5-ext": "^0.10.50",
|
||||
"type": "^1.0.1"
|
||||
"es5-ext": "^0.10.64",
|
||||
"type": "^2.7.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/dashdash": {
|
||||
@ -8125,12 +8369,6 @@
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/esniff/node_modules/type": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz",
|
||||
"integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "9.6.1",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
|
||||
@ -8515,12 +8753,6 @@
|
||||
"type": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/ext/node_modules/type": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz",
|
||||
"integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ext2fs": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ext2fs/-/ext2fs-4.2.1.tgz",
|
||||
@ -9152,6 +9384,32 @@
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-minipass": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"minipass": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-minipass/node_modules/minipass": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
||||
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
@ -12020,18 +12278,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/memoizee": {
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
|
||||
"integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
|
||||
"version": "0.4.17",
|
||||
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz",
|
||||
"integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.53",
|
||||
"d": "^1.0.2",
|
||||
"es5-ext": "^0.10.64",
|
||||
"es6-weak-map": "^2.0.3",
|
||||
"event-emitter": "^0.3.5",
|
||||
"is-promise": "^2.2.2",
|
||||
"lru-queue": "^0.1.0",
|
||||
"next-tick": "^1.1.0",
|
||||
"timers-ext": "^0.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
@ -12147,6 +12409,33 @@
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/minizlib": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
|
||||
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"minipass": "^3.0.0",
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/minizlib/node_modules/minipass": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
||||
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz",
|
||||
@ -12827,6 +13116,22 @@
|
||||
"resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz",
|
||||
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI="
|
||||
},
|
||||
"node_modules/nopt": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
|
||||
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"abbrev": "1"
|
||||
},
|
||||
"bin": {
|
||||
"nopt": "bin/nopt.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-package-data": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz",
|
||||
@ -14004,10 +14309,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pinejs-client-core": {
|
||||
"version": "6.14.13",
|
||||
"resolved": "https://registry.npmjs.org/pinejs-client-core/-/pinejs-client-core-6.14.13.tgz",
|
||||
"integrity": "sha512-Ca1kfbst+0C9UbvqrJFM2VZRAX/UDSgMDYiqSswzTsNoz/axOLMB3bmbrK8el+wSLb0TG2s/UsOZQTnN4MkOcQ==",
|
||||
"version": "6.15.11",
|
||||
"resolved": "https://registry.npmjs.org/pinejs-client-core/-/pinejs-client-core-6.15.11.tgz",
|
||||
"integrity": "sha512-EUhXx+UpyKJnkw7E5Y5fEwYMNx6SstBJdE21Rwsvs783oXPeoQ1Gmo1Lh5Ct67YaDQLoA6Dab4KoqycwrZPGSA==",
|
||||
"dependencies": {
|
||||
"@balena/abstract-sql-to-typescript": "^3.2.3",
|
||||
"@balena/es-version": "^1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
@ -15456,6 +15762,20 @@
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
||||
},
|
||||
"node_modules/sha.js": {
|
||||
"version": "2.4.11",
|
||||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||
"license": "(MIT AND BSD-3-Clause)",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"sha.js": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
@ -15996,6 +16316,12 @@
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string-hash": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz",
|
||||
"integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==",
|
||||
"license": "CC0-1.0"
|
||||
},
|
||||
"node_modules/string-to-stream": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz",
|
||||
@ -16300,6 +16626,24 @@
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tar": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
|
||||
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
"minipass": "^5.0.0",
|
||||
"minizlib": "^2.1.1",
|
||||
"mkdirp": "^1.0.3",
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/tar-fs": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
|
||||
@ -16348,6 +16692,39 @@
|
||||
"tar-stream": "^2.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/tar/node_modules/chownr": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
|
||||
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/tar/node_modules/minipass": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
|
||||
"integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/tar/node_modules/mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/temp": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/temp/-/temp-0.6.0.tgz",
|
||||
@ -16677,9 +17054,10 @@
|
||||
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
|
||||
},
|
||||
"node_modules/type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz",
|
||||
"integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/type-check": {
|
||||
"version": "0.4.0",
|
||||
@ -17541,6 +17919,13 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"license": "ISC",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
|
@ -189,7 +189,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@balena/compose": "^4.0.1",
|
||||
"@balena/compose": "^5.0.0",
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"@balena/env-parsing": "^1.1.8",
|
||||
"@balena/es-version": "^1.0.1",
|
||||
@ -199,8 +199,8 @@
|
||||
"balena-device-init": "^7.0.1",
|
||||
"balena-errors": "^4.7.3",
|
||||
"balena-image-fs": "^7.0.6",
|
||||
"balena-preload": "^15.0.6",
|
||||
"balena-sdk": "^19.7.3",
|
||||
"balena-preload": "^16.0.0",
|
||||
"balena-sdk": "^20.3.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^5.0.2",
|
||||
"balena-settings-storage": "^8.1.0",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class GenerateCmd extends Command {
|
||||
@ -39,10 +38,6 @@ export default class GenerateCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -21,6 +21,7 @@ import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class APIKeyListCmd extends Command {
|
||||
public static aliases = ['api-keys'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Print a list of balenaCloud API keys.
|
||||
@ -32,7 +33,6 @@ export default class APIKeyListCmd extends Command {
|
||||
public static examples = ['$ balena api-key list'];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
user: Flags.boolean({
|
||||
char: 'u',
|
||||
description: 'show API keys for your user',
|
||||
@ -51,7 +51,7 @@ export default class APIKeyListCmd extends Command {
|
||||
await getApplication(getBalenaSdk(), options.fleet, {
|
||||
$select: 'actor',
|
||||
})
|
||||
).actor
|
||||
).actor.__id
|
||||
: await getBalenaSdk().auth.getActorId();
|
||||
const keys = await getBalenaSdk().pine.get({
|
||||
resource: 'api_key',
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class RevokeCmd extends Command {
|
||||
@ -40,10 +39,6 @@ export default class RevokeCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class AppCreateCmd extends Command {
|
||||
@ -64,7 +63,6 @@ export default class AppCreateCmd extends Command {
|
||||
description:
|
||||
'app device type (Check available types with `balena device-type list`)',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class BlockCreateCmd extends Command {
|
||||
@ -64,7 +63,6 @@ export default class BlockCreateCmd extends Command {
|
||||
description:
|
||||
'block device type (Check available types with `balena device-type list`)',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -44,7 +44,6 @@ interface FlagsDef extends ComposeCliFlags, DockerCliFlags {
|
||||
deviceType?: string;
|
||||
fleet?: string;
|
||||
source?: string; // Not part of command profile - source param copied here.
|
||||
help: void;
|
||||
}
|
||||
|
||||
export default class BuildCmd extends Command {
|
||||
@ -95,9 +94,6 @@ ${dockerignoreHelp}
|
||||
fleet: cf.fleet,
|
||||
...composeCliFlags,
|
||||
...dockerCliFlags,
|
||||
// NOTE: Not supporting -h for help, because of clash with -h in DockerCliFlags
|
||||
// Revisit this in future release.
|
||||
help: Flags.help({}),
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -117,7 +117,6 @@ export default class ConfigGenerateCmd extends Command {
|
||||
'expiry date assigned to generated provisioning api key (format: YYYY-MM-DD)',
|
||||
exclusive: ['device'],
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -44,7 +44,6 @@ export default class ConfigInjectCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
drive: cf.driveOrImg,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static root = true;
|
||||
|
@ -38,7 +38,6 @@ export default class ConfigReadCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
drive: cf.driveOrImg,
|
||||
help: cf.help,
|
||||
json: cf.json,
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,6 @@ export default class ConfigReconfigureCmd extends Command {
|
||||
description: 'show advanced commands',
|
||||
char: 'v',
|
||||
}),
|
||||
help: cf.help,
|
||||
version: Flags.string({
|
||||
description: 'balenaOS version, for example "2.32.0" or "2.44.0+rev1"',
|
||||
}),
|
||||
|
@ -49,7 +49,6 @@ export default class ConfigWriteCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
drive: cf.driveOrImg,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static root = true;
|
||||
|
@ -60,7 +60,6 @@ interface FlagsDef extends ComposeCliFlags, DockerCliFlags {
|
||||
'release-tag'?: string[];
|
||||
draft: boolean;
|
||||
note?: string;
|
||||
help: void;
|
||||
}
|
||||
|
||||
export default class DeployCmd extends Command {
|
||||
@ -139,9 +138,6 @@ ${dockerignoreHelp}
|
||||
note: Flags.string({ description: 'The notes for this release' }),
|
||||
...composeCliFlags,
|
||||
...dockerCliFlags,
|
||||
// NOTE: Not supporting -h for help, because of clash with -h in DockerCliFlags
|
||||
// Revisit this in future release.
|
||||
help: Flags.help({}),
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -17,11 +17,11 @@
|
||||
import { Flags, Command } from '@oclif/core';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import * as _ from 'lodash';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceTypeListCmd extends Command {
|
||||
public static aliases = ['devices supported'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').
|
||||
@ -45,7 +45,6 @@ export default class DeviceTypeListCmd extends Command {
|
||||
];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
json: Flags.boolean({
|
||||
char: 'j',
|
||||
description: 'produce JSON output instead of tabular output',
|
||||
|
@ -42,7 +42,6 @@ export default class DeviceDeactivateCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getCliUx, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceDetectCmd extends Command {
|
||||
public static aliases = ['scan'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Scan for balenaOS devices on your local network.
|
||||
@ -49,7 +49,6 @@ export default class DeviceDetectCmd extends Command {
|
||||
char: 't',
|
||||
description: 'scan timeout in seconds',
|
||||
}),
|
||||
help: cf.help,
|
||||
json: Flags.boolean({
|
||||
default: false,
|
||||
char: 'j',
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { ExpectedError } from '../../errors';
|
||||
|
||||
@ -35,10 +34,6 @@ export default class DeviceIdentifyCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -63,7 +63,6 @@ export default class DeviceCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
json: cf.json,
|
||||
help: cf.help,
|
||||
view: Flags.boolean({
|
||||
default: false,
|
||||
description: 'open device dashboard page',
|
||||
|
@ -28,7 +28,6 @@ interface FlagsDef {
|
||||
'os-version'?: string;
|
||||
drive?: string;
|
||||
config?: string;
|
||||
help: void;
|
||||
'provisioning-key-name'?: string;
|
||||
'provisioning-key-expiry-date'?: string;
|
||||
}
|
||||
@ -100,7 +99,6 @@ export default class DeviceInitCmd extends Command {
|
||||
description:
|
||||
'expiry date assigned to generated provisioning api key (format: YYYY-MM-DD)',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -37,6 +37,7 @@ const devicesSelectFields = {
|
||||
|
||||
export default class DeviceListCmd extends Command {
|
||||
public static aliases = ['devices'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List all devices.
|
||||
@ -58,7 +59,6 @@ export default class DeviceListCmd extends Command {
|
||||
public static flags = {
|
||||
fleet: cf.fleet,
|
||||
json: cf.json,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceLocalModeCmd extends Command {
|
||||
@ -54,7 +53,6 @@ export default class DeviceLocalModeCmd extends Command {
|
||||
description: 'output boolean indicating local mode status',
|
||||
exclusive: ['enable', 'disable'],
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import type { LogMessage } from 'balena-sdk';
|
||||
|
||||
@ -24,6 +23,7 @@ const MAX_RETRY = 1000;
|
||||
|
||||
export default class DeviceLogsCmd extends Command {
|
||||
public static aliases = ['logs'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Show device logs.
|
||||
@ -86,7 +86,6 @@ export default class DeviceLogsCmd extends Command {
|
||||
'Only show system logs. This can be used in combination with --service.',
|
||||
char: 'S',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -55,7 +55,6 @@ export default class DeviceMoveCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
fleet: cf.fleet,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -22,6 +22,7 @@ import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceNoteCmd extends Command {
|
||||
public static aliases = ['notes'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Set a device note.
|
||||
@ -49,7 +50,6 @@ export default class DeviceNoteCmd extends Command {
|
||||
exclusive: ['device'],
|
||||
hidden: true,
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -57,7 +57,6 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
exclusive: ['version'],
|
||||
}),
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
@ -147,7 +146,18 @@ export default class DeviceOsUpdateCmd extends Command {
|
||||
'Host OS updates require a device restart when they complete. Are you sure you want to proceed?',
|
||||
);
|
||||
|
||||
await sdk.models.device.startOsUpdate(uuid, targetOsVersion);
|
||||
await patterns.awaitDeviceOsUpdate(uuid, targetOsVersion);
|
||||
await sdk.models.device
|
||||
.startOsUpdate(uuid, targetOsVersion, {
|
||||
runDetached: true,
|
||||
})
|
||||
.then(() => {
|
||||
console.log(
|
||||
`The balena OS update has started. You can keep track of the progress via the dashboard.\n` +
|
||||
`To open the dashboard page related to a device via the CLI, you can use \`balena device UUID --view\``,
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(`Failed to start OS update for device ${uuid}:`, error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
|
||||
@ -43,10 +42,6 @@ export default class DevicePinCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
@ -56,7 +51,7 @@ export default class DevicePinCmd extends Command {
|
||||
|
||||
const device = await balena.models.device.get(params.uuid, {
|
||||
$expand: {
|
||||
should_be_running__release: {
|
||||
is_pinned_on__release: {
|
||||
$select: 'commit',
|
||||
},
|
||||
belongs_to__application: {
|
||||
@ -66,7 +61,7 @@ export default class DevicePinCmd extends Command {
|
||||
});
|
||||
|
||||
const pinnedRelease = getExpandedProp(
|
||||
device.should_be_running__release,
|
||||
device.is_pinned_on__release,
|
||||
'commit',
|
||||
);
|
||||
const appSlug = getExpandedProp(device.belongs_to__application, 'slug');
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DevicePublicUrlCmd extends Command {
|
||||
@ -56,7 +55,6 @@ export default class DevicePublicUrlCmd extends Command {
|
||||
description: 'determine if public URL is enabled',
|
||||
exclusive: ['enable', 'disable'],
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DevicePurgeCmd extends Command {
|
||||
@ -41,10 +40,6 @@ export default class DevicePurgeCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -36,7 +36,6 @@ export default class DeviceRebootCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
force: cf.force,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
@ -52,7 +51,6 @@ export default class DeviceRegisterCmd extends Command {
|
||||
description:
|
||||
"device type slug (run 'balena device-type list' for possible values)",
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceRenameCmd extends Command {
|
||||
@ -42,10 +41,6 @@ export default class DeviceRenameCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import type {
|
||||
BalenaSDK,
|
||||
@ -58,7 +57,6 @@ export default class DeviceRestartCmd extends Command {
|
||||
'comma-separated list (no blank spaces) of service names to restart',
|
||||
char: 's',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
@ -156,7 +154,7 @@ export default class DeviceRestartCmd extends Command {
|
||||
|
||||
async restartAllServices(balena: BalenaSDK, deviceUuid: string) {
|
||||
// Note: device.restartApplication throws `BalenaDeviceNotFound: Device not found` if device not online.
|
||||
// Need to use device.get first to distinguish between non-existant and offline devices.
|
||||
// Need to use device.get first to distinguish between non-existant and disconnected devices.
|
||||
// Remove this workaround when SDK issue resolved: https://github.com/balena-io/balena-sdk/issues/649
|
||||
const { instanceOf, ExpectedError } = await import('../../errors');
|
||||
try {
|
||||
|
@ -44,7 +44,6 @@ export default class DeviceRmCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -37,7 +37,6 @@ export default class DeviceShutdownCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
force: cf.force,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import {
|
||||
parseAsInteger,
|
||||
@ -25,6 +24,7 @@ import {
|
||||
|
||||
export default class DeviceSSHCmd extends Command {
|
||||
public static aliases = ['ssh'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Open a SSH prompt on a device's host OS or service container.
|
||||
@ -99,7 +99,6 @@ export default class DeviceSSHCmd extends Command {
|
||||
default: false,
|
||||
description: 'bypass global proxy configuration for the ssh connection',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
|
||||
@ -45,10 +44,6 @@ export default class DeviceStartServiceCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
|
||||
@ -45,10 +44,6 @@ export default class DeviceStopServiceCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class DeviceTrackFleetCmd extends Command {
|
||||
@ -34,10 +33,6 @@ export default class DeviceTrackFleetCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -21,7 +21,6 @@ import {
|
||||
InvalidPortMappingError,
|
||||
ExpectedError,
|
||||
} from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization';
|
||||
|
||||
@ -29,6 +28,7 @@ import type { Server, Socket } from 'net';
|
||||
|
||||
export default class DeviceTunnelCmd extends Command {
|
||||
public static aliases = ['tunnel'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Tunnel local ports to your balenaOS device.
|
||||
@ -86,7 +86,6 @@ export default class DeviceTunnelCmd extends Command {
|
||||
char: 'p',
|
||||
multiple: true,
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
2
src/commands/env/list.ts
vendored
2
src/commands/env/list.ts
vendored
@ -47,6 +47,7 @@ interface ServiceEnvironmentVariableInfo
|
||||
|
||||
export default class EnvListCmd extends Command {
|
||||
public static aliases = ['envs'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List the environment or config variables of a fleet, device or service.
|
||||
@ -104,7 +105,6 @@ export default class EnvListCmd extends Command {
|
||||
exclusive: ['service'],
|
||||
}),
|
||||
device: { ...cf.device, exclusive: ['fleet'] },
|
||||
help: cf.help,
|
||||
json: cf.json,
|
||||
service: { ...cf.service, exclusive: ['config'] },
|
||||
};
|
||||
|
2
src/commands/env/rename.ts
vendored
2
src/commands/env/rename.ts
vendored
@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ec from '../../utils/env-common';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
@ -55,7 +54,6 @@ export default class EnvRenameCmd extends Command {
|
||||
config: ec.booleanConfig,
|
||||
device: ec.booleanDevice,
|
||||
service: ec.booleanService,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public async run() {
|
||||
|
3
src/commands/env/set.ts
vendored
3
src/commands/env/set.ts
vendored
@ -25,7 +25,6 @@ import { applicationIdInfo } from '../../utils/messages';
|
||||
interface FlagsDef {
|
||||
fleet?: string;
|
||||
device?: string; // device UUID
|
||||
help: void;
|
||||
quiet: boolean;
|
||||
service?: string; // service name
|
||||
}
|
||||
@ -37,6 +36,7 @@ interface ArgsDef {
|
||||
|
||||
export default class EnvSetCmd extends Command {
|
||||
public static aliases = ['env add'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Add or update env or config variable to fleets, devices or services.
|
||||
@ -97,7 +97,6 @@ export default class EnvSetCmd extends Command {
|
||||
public static flags = {
|
||||
fleet: { ...cf.fleet, exclusive: ['device'] },
|
||||
device: { ...cf.device, exclusive: ['fleet'] },
|
||||
help: cf.help,
|
||||
quiet: cf.quiet,
|
||||
service: cf.service,
|
||||
};
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class FleetCreateCmd extends Command {
|
||||
@ -64,7 +63,6 @@ export default class FleetCreateCmd extends Command {
|
||||
description:
|
||||
'fleet device type (Check available types with `balena device-type list`)',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -40,7 +40,6 @@ export default class FleetCmd extends Command {
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
view: Flags.boolean({
|
||||
default: false,
|
||||
description: 'open fleet dashboard page',
|
||||
|
@ -28,6 +28,7 @@ interface ExtendedApplication extends ApplicationWithDeviceTypeSlug {
|
||||
|
||||
export default class FleetListCmd extends Command {
|
||||
public static aliases = ['fleets'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List all fleets.
|
||||
@ -41,7 +42,6 @@ export default class FleetListCmd extends Command {
|
||||
public static examples = ['$ balena fleet list'];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
json: cf.json,
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
|
||||
@ -43,10 +42,6 @@ export default class FleetPinCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
@ -40,10 +39,6 @@ export default class FleetPurgeCmd extends Command {
|
||||
fleet: ca.fleetRequired,
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
@ -46,10 +45,6 @@ export default class FleetRenameCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
@ -39,10 +38,6 @@ export default class FleetRestartCmd extends Command {
|
||||
fleet: ca.fleetRequired,
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -44,7 +44,6 @@ export default class FleetRmCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class FleetTrackLatestCmd extends Command {
|
||||
@ -37,10 +36,6 @@ export default class FleetTrackLatestCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -65,7 +65,6 @@ export default class JoinCmd extends Command {
|
||||
description: 'the interval in minutes to check for updates',
|
||||
char: 'i',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import { parseAsLocalHostnameOrIp } from '../../utils/validation';
|
||||
|
||||
@ -49,10 +48,6 @@ export default class LeaveCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
public static primary = true;
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import { promisify } from 'util';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class LocalConfigureCmd extends Command {
|
||||
@ -39,10 +38,6 @@ export default class LocalConfigureCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static root = true;
|
||||
public static offlineCompatible = true;
|
||||
|
||||
|
@ -48,7 +48,6 @@ export default class LocalFlashCmd extends Command {
|
||||
public static flags = {
|
||||
drive: cf.drive,
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static offlineCompatible = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import type { WhoamiResult } from 'balena-sdk';
|
||||
@ -29,7 +28,6 @@ interface FlagsDef {
|
||||
user?: string;
|
||||
password?: string;
|
||||
port?: number;
|
||||
help: void;
|
||||
hideExperimentalWarning: boolean;
|
||||
}
|
||||
|
||||
@ -111,7 +109,6 @@ export default class LoginCmd extends Command {
|
||||
default: false,
|
||||
description: 'Hides warning for experimental features',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class OrganizationListCmd extends Command {
|
||||
public static aliases = ['orgs'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List all organizations.
|
||||
@ -29,10 +29,6 @@ export default class OrganizationListCmd extends Command {
|
||||
`;
|
||||
public static examples = ['$ balena organization list'];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getCliForm, stripIndent } from '../../utils/lazy';
|
||||
import * as _ from 'lodash';
|
||||
import type { DeviceTypeJson } from 'balena-sdk';
|
||||
@ -55,7 +54,6 @@ export default class OsBuildConfigCmd extends Command {
|
||||
char: 'o',
|
||||
required: true,
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -154,7 +154,6 @@ export default class OsConfigureCmd extends Command {
|
||||
'expiry date assigned to generated provisioning api key (format: YYYY-MM-DD)',
|
||||
exclusive: ['config', 'device'],
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class OsDownloadCmd extends Command {
|
||||
@ -78,7 +77,6 @@ export default class OsDownloadCmd extends Command {
|
||||
or 'menu-esr' (interactive menu, ESR versions)
|
||||
`,
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public async run() {
|
||||
|
@ -51,7 +51,6 @@ export default class OsInitializeCmd extends Command {
|
||||
type: cf.deviceType,
|
||||
drive: cf.drive,
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class OsVersionsCmd extends Command {
|
||||
@ -40,7 +39,6 @@ export default class OsVersionsCmd extends Command {
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
esr: Flags.boolean({
|
||||
description: 'select balenaOS ESR versions',
|
||||
default: false,
|
||||
|
@ -128,9 +128,6 @@ Can be repeated to add multiple certificates.\
|
||||
'Docker daemon TCP port number (hint: 2375 for balena devices)',
|
||||
parse: async (p) => parseAsInteger(p, 'dockerPort'),
|
||||
}),
|
||||
// Not supporting -h for help, because of clash with -h in DockerCliFlags
|
||||
// Revisit this in future release.
|
||||
help: Flags.help({}),
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
@ -413,6 +410,8 @@ Can be repeated to add multiple certificates.\
|
||||
const DEFAULT_CHOICE = { name: 'current', value: 'current' };
|
||||
const choices = [DEFAULT_CHOICE].concat(
|
||||
releases.map((release) => ({
|
||||
// TODO: [next-major] consider changing this to use the release semver
|
||||
// and maybe the commit as well
|
||||
name: `${release.end_timestamp} - ${release.commit}`,
|
||||
value: release.commit,
|
||||
})),
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import type { Interfaces } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
@ -218,7 +217,6 @@ export default class PushCmd extends Command {
|
||||
default: false,
|
||||
}),
|
||||
note: Flags.string({ description: 'The notes for this release' }),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static primary = true;
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import { commitOrIdArg } from '.';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class ReleaseFinalizeCmd extends Command {
|
||||
@ -40,10 +39,6 @@ export default class ReleaseFinalizeCmd extends Command {
|
||||
'$ balena release finalize 1234567',
|
||||
];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
commitOrId: commitOrIdArg({
|
||||
description: 'the commit or ID of the release to finalize',
|
||||
|
@ -43,7 +43,6 @@ export default class ReleaseCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
json: cf.json,
|
||||
help: cf.help,
|
||||
composition: Flags.boolean({
|
||||
default: false,
|
||||
char: 'c',
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import { commitOrIdArg } from '.';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class ReleaseInvalidateCmd extends Command {
|
||||
@ -35,10 +34,6 @@ export default class ReleaseInvalidateCmd extends Command {
|
||||
'$ balena release invalidate 1234567',
|
||||
];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
commitOrId: commitOrIdArg({
|
||||
description: 'the commit or ID of the release to invalidate',
|
||||
|
@ -24,6 +24,7 @@ import { jsonInfo } from '../../utils/messages';
|
||||
|
||||
export default class ReleaseListCmd extends Command {
|
||||
public static aliases = ['releases'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List all releases of a fleet.
|
||||
@ -41,7 +42,6 @@ export default class ReleaseListCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
json: cf.json,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import { commitOrIdArg } from '.';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class ReleaseValidateCmd extends Command {
|
||||
@ -34,10 +33,6 @@ export default class ReleaseValidateCmd extends Command {
|
||||
'$ balena release validate 1234567',
|
||||
];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static args = {
|
||||
commitOrId: commitOrIdArg({
|
||||
description: 'the commit or ID of the release to validate',
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class SettingsCmd extends Command {
|
||||
@ -27,10 +26,6 @@ export default class SettingsCmd extends Command {
|
||||
`;
|
||||
public static examples = ['$ balena settings'];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public async run() {
|
||||
await this.parse(SettingsCmd);
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class SSHKeyAddCmd extends Command {
|
||||
public static aliases = ['key add'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Add an SSH key to balenaCloud.
|
||||
@ -62,10 +62,6 @@ export default class SSHKeyAddCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Args, Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
|
||||
export default class SSHKeyCmd extends Command {
|
||||
public static aliases = ['key'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Display an SSH key.
|
||||
@ -39,10 +39,6 @@ export default class SSHKeyCmd extends Command {
|
||||
}),
|
||||
};
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
|
||||
export default class SSHKeyListCmd extends Command {
|
||||
public static aliases = ['keys', 'key list'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List the SSH keys in balenaCloud.
|
||||
@ -29,10 +29,6 @@ export default class SSHKeyListCmd extends Command {
|
||||
`;
|
||||
public static examples = ['$ balena ssh-key list'];
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -22,6 +22,7 @@ import { parseAsInteger } from '../../utils/validation';
|
||||
|
||||
export default class SSHKeyRmCmd extends Command {
|
||||
public static aliases = ['key rm'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
Remove an SSH key from balenaCloud.
|
||||
@ -46,7 +47,6 @@ export default class SSHKeyRmCmd extends Command {
|
||||
|
||||
public static flags = {
|
||||
yes: cf.yes,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -66,7 +66,6 @@ export default class SupportCmd extends Command {
|
||||
'length of time to enable support for, in (h)ours or (d)ays, e.g. 12h, 2d',
|
||||
char: 't',
|
||||
}),
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -23,6 +23,7 @@ import { applicationIdInfo } from '../../utils/messages';
|
||||
|
||||
export default class TagListCmd extends Command {
|
||||
public static aliases = ['tags'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List all tags for a fleet, device or release.
|
||||
@ -53,7 +54,6 @@ export default class TagListCmd extends Command {
|
||||
...cf.release,
|
||||
exclusive: ['fleet', 'device'],
|
||||
},
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -57,7 +57,6 @@ export default class TagRmCmd extends Command {
|
||||
...cf.release,
|
||||
exclusive: ['fleet', 'device'],
|
||||
},
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -71,7 +71,6 @@ export default class TagSetCmd extends Command {
|
||||
...cf.release,
|
||||
exclusive: ['fleet', 'device'],
|
||||
},
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static authenticated = true;
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { Command } from '@oclif/core';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent, getChalk, getVisuals } from '../../utils/lazy';
|
||||
|
||||
export default class UtilAvailableDrivesCmd extends Command {
|
||||
@ -27,10 +26,6 @@ export default class UtilAvailableDrivesCmd extends Command {
|
||||
Does not list system drives.
|
||||
`;
|
||||
|
||||
public static flags = {
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
public static offlineCompatible = true;
|
||||
|
||||
public async run() {
|
||||
|
@ -63,7 +63,6 @@ export default class VersionCmd extends Command {
|
||||
description:
|
||||
'output version information in JSON format for programmatic use',
|
||||
}),
|
||||
help: Flags.help({ char: 'h' }),
|
||||
};
|
||||
|
||||
public async run() {
|
||||
|
@ -28,7 +28,7 @@ function getHelpSubject(args: string[]): string | undefined {
|
||||
if (arg === '--') {
|
||||
return;
|
||||
}
|
||||
if (arg === 'help' || arg === '--help' || arg === '-h') {
|
||||
if (arg === 'help' || arg === '--help') {
|
||||
continue;
|
||||
}
|
||||
if (arg.startsWith('-')) {
|
||||
@ -135,7 +135,7 @@ export default class BalenaHelp extends Help {
|
||||
}
|
||||
|
||||
const globalOps = [
|
||||
['--help, -h', 'display command help'],
|
||||
['--help', 'display command help'],
|
||||
['--debug', 'enable debug output'],
|
||||
[
|
||||
'--unsupported',
|
||||
|
@ -40,8 +40,8 @@ export async function preparseArgs(argv: string[]): Promise<string[]> {
|
||||
if (['--version', '-v'].includes(cmdSlice[0])) {
|
||||
cmdSlice[0] = 'version';
|
||||
}
|
||||
// convert 'balena --help' or 'balena -h' to 'balena help'
|
||||
else if (['--help', '-h'].includes(cmdSlice[0])) {
|
||||
// convert 'balena --help' to 'balena help'
|
||||
else if ('--help' === cmdSlice[0]) {
|
||||
cmdSlice[0] = 'help';
|
||||
}
|
||||
// convert e.g. 'balena help env set' to 'balena env set --help'
|
||||
@ -110,14 +110,9 @@ export function checkDeletedCommand(argvSlice: string[]): void {
|
||||
if (argvSlice[0] === 'help') {
|
||||
argvSlice = argvSlice.slice(1);
|
||||
}
|
||||
function replaced(
|
||||
oldCmd: string,
|
||||
alternative: string,
|
||||
version: string,
|
||||
verb = 'replaced',
|
||||
) {
|
||||
function replaced(oldCmd: string, alternative: string, version: string) {
|
||||
throw new ExpectedError(`\
|
||||
Note: the command "balena ${oldCmd}" was ${verb} in CLI version ${version}.
|
||||
Note: the command "balena ${oldCmd}" was replaced in CLI version ${version}.
|
||||
Please use "balena ${alternative}" instead.`);
|
||||
}
|
||||
function removed(oldCmd: string, alternative: string, version: string) {
|
||||
@ -127,22 +122,7 @@ Please use "balena ${alternative}" instead.`);
|
||||
}
|
||||
throw new ExpectedError(msg);
|
||||
}
|
||||
const stopAlternative =
|
||||
'Please use "balena device ssh -s" to access the host OS, then use `balena-engine stop`.';
|
||||
const cmds: { [cmd: string]: [(...args: any) => void, ...string[]] } = {
|
||||
sync: [replaced, 'push', 'v11.0.0', 'removed'],
|
||||
'local logs': [replaced, 'logs', 'v11.0.0'],
|
||||
'local push': [replaced, 'push', 'v11.0.0'],
|
||||
'local scan': [replaced, 'scan', 'v11.0.0'],
|
||||
'local ssh': [replaced, 'ssh', 'v11.0.0'],
|
||||
'local stop': [removed, stopAlternative, 'v11.0.0'],
|
||||
app: [replaced, 'fleet', 'v13.0.0'],
|
||||
apps: [replaced, 'fleets', 'v13.0.0'],
|
||||
'app purge': [replaced, 'fleet purge', 'v13.0.0'],
|
||||
'app rename': [replaced, 'fleet rename', 'v13.0.0'],
|
||||
'app restart': [replaced, 'fleet restart', 'v13.0.0'],
|
||||
'app rm': [replaced, 'fleet rm', 'v13.0.0'],
|
||||
};
|
||||
const cmds: { [cmd: string]: ['replaced' | 'removed', string, string] } = {};
|
||||
let cmd: string | undefined;
|
||||
if (argvSlice.length > 1) {
|
||||
cmd = [argvSlice[0], argvSlice[1]].join(' ');
|
||||
@ -150,7 +130,9 @@ Please use "balena ${alternative}" instead.`);
|
||||
cmd = argvSlice[0];
|
||||
}
|
||||
if (cmd && Object.getOwnPropertyNames(cmds).includes(cmd)) {
|
||||
cmds[cmd][0](cmd, ...cmds[cmd].slice(1));
|
||||
const changeType = cmds[cmd][0];
|
||||
const changeTypeFn = changeType === 'replaced' ? replaced : removed;
|
||||
changeTypeFn(cmd, cmds[cmd][1], cmds[cmd][2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import { getBalenaSdk } from './lazy';
|
||||
export interface FlagsDef {
|
||||
organization?: string;
|
||||
type?: string; // application device type
|
||||
help: void;
|
||||
}
|
||||
|
||||
export interface ArgsDef {
|
||||
|
@ -30,8 +30,6 @@ export const device = Flags.string({
|
||||
description: 'device UUID',
|
||||
});
|
||||
|
||||
export const help = Flags.help({ char: 'h' });
|
||||
|
||||
export const quiet = Flags.boolean({
|
||||
char: 'q',
|
||||
description: 'suppress warning messages',
|
||||
|
2
src/utils/compose-types.d.ts
vendored
2
src/utils/compose-types.d.ts
vendored
@ -95,7 +95,7 @@ export interface Release {
|
||||
| 'end_timestamp'
|
||||
>;
|
||||
serviceImages: Dictionary<
|
||||
Omit<ImageModel, 'created_at' | 'is_a_build_of__service' | '__metadata'>
|
||||
Omit<ImageModel, 'created_at' | 'is_a_build_of__service'>
|
||||
>;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ export const createRelease = async function (
|
||||
composition: Composition,
|
||||
draft: boolean,
|
||||
semver: string | undefined,
|
||||
contract: string | undefined,
|
||||
contract: import('@balena/compose/dist/release/models').ReleaseModel['contract'],
|
||||
): Promise<Release> {
|
||||
const _ = require('lodash') as typeof import('lodash');
|
||||
const crypto = require('crypto') as typeof import('crypto');
|
||||
@ -152,8 +152,7 @@ export const createRelease = async function (
|
||||
},
|
||||
},
|
||||
{
|
||||
// @balena/compose atm works with v6, bump it once @balena/compose moves to v7.
|
||||
apiVersion: 'v6',
|
||||
apiVersion: 'v7',
|
||||
},
|
||||
);
|
||||
|
||||
@ -187,13 +186,9 @@ export const createRelease = async function (
|
||||
serviceImages: _.mapValues(
|
||||
serviceImages,
|
||||
(serviceImage) =>
|
||||
_.omit(serviceImage, [
|
||||
'created_at',
|
||||
'is_a_build_of__service',
|
||||
'__metadata',
|
||||
]) as Omit<
|
||||
_.omit(serviceImage, ['created_at', 'is_a_build_of__service']) as Omit<
|
||||
typeof serviceImage,
|
||||
'created_at' | 'is_a_build_of__service' | '__metadata'
|
||||
'created_at' | 'is_a_build_of__service'
|
||||
>,
|
||||
),
|
||||
};
|
||||
|
@ -1292,7 +1292,7 @@ async function pushAndUpdateServiceImages(
|
||||
localImage.inspect(),
|
||||
pushImage(localImage, index),
|
||||
]);
|
||||
serviceImage.image_size = imgInfo.Size;
|
||||
serviceImage.image_size = `${imgInfo.Size}`;
|
||||
serviceImage.content_hash = imgDigest;
|
||||
serviceImage.build_log = logs;
|
||||
serviceImage.dockerfile = props.dockerfile;
|
||||
@ -1404,7 +1404,7 @@ export async function deployProject(
|
||||
composition,
|
||||
isDraft,
|
||||
contract?.version,
|
||||
contract ? JSON.stringify(contract) : undefined,
|
||||
contract,
|
||||
),
|
||||
);
|
||||
const { client: pineClient, release, serviceImages } = $release;
|
||||
@ -1500,7 +1500,9 @@ export function createRunLoop(tick: (...args: any[]) => void) {
|
||||
|
||||
async function getContractContent(
|
||||
filePath: string,
|
||||
): Promise<Dictionary<any> | undefined> {
|
||||
): Promise<
|
||||
import('@balena/compose/dist/release/models').ReleaseModel['contract']
|
||||
> {
|
||||
let fileContentAsString;
|
||||
try {
|
||||
fileContentAsString = await fs.readFile(filePath, 'utf8');
|
||||
|
@ -208,9 +208,8 @@ export async function validateSecureBootOptionAndWarn(
|
||||
throw new ExpectedError(`Error: No ${version} release for ${slug}`);
|
||||
}
|
||||
|
||||
const contract = osRelease.contract ? JSON.parse(osRelease.contract) : null;
|
||||
if (
|
||||
contract?.provides.some((entry: Dictionary<string>) => {
|
||||
osRelease.contract?.provides.some((entry: Dictionary<string>) => {
|
||||
return entry.type === 'sw.feature' && entry.slug === 'secureboot';
|
||||
})
|
||||
) {
|
||||
|
@ -93,7 +93,7 @@ export class DeviceAPI {
|
||||
);
|
||||
}
|
||||
|
||||
public async getTargetState(): Promise<any> {
|
||||
public async getTargetState() {
|
||||
const url = this.getUrlForAction('getTargetState');
|
||||
|
||||
return DeviceAPI.promisifiedRequest(
|
||||
|
@ -636,6 +636,7 @@ export function generateTargetState(
|
||||
services[idx] = {
|
||||
...defaults,
|
||||
...opts,
|
||||
// TODO: is this affected by the `contract` typing change?
|
||||
...(contract != null ? { contract } : {}),
|
||||
...{
|
||||
imageId: idx,
|
||||
|
@ -30,9 +30,8 @@ import {
|
||||
ExpectedError,
|
||||
NotAvailableInOfflineModeError,
|
||||
} from '../errors';
|
||||
import { getBalenaSdk, getVisuals, stripIndent, getCliForm } from './lazy';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from './lazy';
|
||||
import validation = require('./validation');
|
||||
import { delay } from './helpers';
|
||||
|
||||
export function authenticate(options: object): Promise<void> {
|
||||
const balena = getBalenaSdk();
|
||||
@ -286,51 +285,6 @@ export async function getAndSelectOrganization() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function awaitDeviceOsUpdate(
|
||||
uuid: string,
|
||||
targetOsVersion: string,
|
||||
) {
|
||||
const balena = getBalenaSdk();
|
||||
|
||||
const deviceName = await balena.models.device.getName(uuid);
|
||||
const visuals = getVisuals();
|
||||
const progressBar = new visuals.Progress(
|
||||
`Updating the OS of ${deviceName} to v${targetOsVersion}`,
|
||||
);
|
||||
progressBar.update({ percentage: 0 });
|
||||
|
||||
const poll = async (): Promise<void> => {
|
||||
const [osUpdateStatus, { overall_progress: osUpdateProgress }] =
|
||||
await Promise.all([
|
||||
balena.models.device.getOsUpdateStatus(uuid),
|
||||
balena.models.device.get(uuid, { $select: 'overall_progress' }),
|
||||
]);
|
||||
if (osUpdateStatus.status === 'done') {
|
||||
console.info(
|
||||
`The device ${deviceName} has been updated to v${targetOsVersion} and will restart shortly!`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (osUpdateStatus.error) {
|
||||
throw new ExpectedError(
|
||||
`Failed to complete Host OS update on device ${deviceName}\n${osUpdateStatus.error}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (osUpdateProgress !== null) {
|
||||
// Avoid resetting to 0% at end of process when device goes offline.
|
||||
progressBar.update({ percentage: osUpdateProgress });
|
||||
}
|
||||
|
||||
await delay(3000);
|
||||
await poll();
|
||||
};
|
||||
|
||||
await poll();
|
||||
return uuid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Given fleetOrDevice, which may be
|
||||
* - a fleet name
|
||||
@ -358,7 +312,9 @@ export async function getOnlineTargetDeviceUuid(
|
||||
});
|
||||
|
||||
if (!device.is_online) {
|
||||
throw new ExpectedError(`Device with UUID ${fleetOrDevice} is offline`);
|
||||
throw new ExpectedError(
|
||||
`Device with UUID ${fleetOrDevice} is disconnected`,
|
||||
);
|
||||
}
|
||||
|
||||
return device.uuid;
|
||||
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019-2020 Balena Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { BalenaAPIMock } from '../../nock/balena-api-mock';
|
||||
import { cleanOutput, runCommand } from '../../helpers';
|
||||
|
||||
const HELP_MESSAGE = '';
|
||||
|
||||
describe('balena app create', function () {
|
||||
let api: BalenaAPIMock;
|
||||
|
||||
beforeEach(() => {
|
||||
api = new BalenaAPIMock();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// Check all expected api calls have been made and clean up.
|
||||
api.done();
|
||||
});
|
||||
|
||||
// Temporarily skipped because of parse/checking order issue with -h
|
||||
it.skip('should print help text with the -h flag', async () => {
|
||||
api.expectGetWhoAmI({ optional: true });
|
||||
|
||||
const { out, err } = await runCommand('app create -h');
|
||||
|
||||
expect(cleanOutput(out)).to.deep.equal(cleanOutput([HELP_MESSAGE]));
|
||||
|
||||
expect(err).to.eql([]);
|
||||
});
|
||||
});
|
@ -183,9 +183,11 @@ describe('balena deploy', function () {
|
||||
api.expectPostRelease({
|
||||
inspectRequest: (_uri: string, requestBody: nock.Body) => {
|
||||
const body = requestBody.valueOf() as Partial<ReleaseRequest>;
|
||||
expect(body.contract).to.be.equal(
|
||||
'{"name":"testContract","type":"sw.application","version":"1.5.2"}',
|
||||
);
|
||||
expect(body.contract).to.deep.equal({
|
||||
name: 'testContract',
|
||||
type: 'sw.application',
|
||||
version: '1.5.2',
|
||||
});
|
||||
expect(body.is_final).to.be.true;
|
||||
},
|
||||
});
|
||||
@ -232,9 +234,11 @@ describe('balena deploy', function () {
|
||||
api.expectPostRelease({
|
||||
inspectRequest: (_uri: string, requestBody: nock.Body) => {
|
||||
const body = requestBody.valueOf() as Partial<ReleaseRequest>;
|
||||
expect(body.contract).to.be.equal(
|
||||
'{"name":"testContract","type":"sw.application","version":"1.5.2"}',
|
||||
);
|
||||
expect(body.contract).to.deep.equal({
|
||||
name: 'testContract',
|
||||
type: 'sw.application',
|
||||
version: '1.5.2',
|
||||
});
|
||||
expect(body.semver).to.be.equal('1.5.2');
|
||||
expect(body.is_final).to.be.false;
|
||||
},
|
||||
@ -384,7 +388,7 @@ describe('balena deploy', function () {
|
||||
let failedImagePatchRequests = 0;
|
||||
let succesfullImagePatchRequests = 0;
|
||||
api
|
||||
.optPatch(/^\/v6\/image($|[(?])/, { times: maxRequestRetries })
|
||||
.optPatch(/^\/v7\/image($|[(?])/, { times: maxRequestRetries })
|
||||
.reply((_uri, requestBody) => {
|
||||
const imageBody = requestBody as Partial<
|
||||
import('@balena/compose/dist/release/models').ImageModel
|
||||
|
@ -33,8 +33,8 @@ describe('balena device-type list', function () {
|
||||
api.done();
|
||||
});
|
||||
|
||||
it('should print help text with the -h flag', async () => {
|
||||
const { out, err } = await runCommand('device-type list -h');
|
||||
it('should print help text with the --help flag', async () => {
|
||||
const { out, err } = await runCommand('device-type list --help');
|
||||
|
||||
expect(cleanOutput(out)).to.contain('$ balena device-type list');
|
||||
|
||||
|
@ -46,7 +46,7 @@ describe('balena device', function () {
|
||||
it('should list device details for provided uuid', async () => {
|
||||
api.scope
|
||||
.get(
|
||||
/^\/v6\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
/^\/v7\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
)
|
||||
.replyWithFile(200, path.join(apiResponsePath, 'device.json'), {
|
||||
'Content-Type': 'application/json',
|
||||
@ -64,7 +64,7 @@ describe('balena device', function () {
|
||||
it.skip('correctly handles devices with missing fields', async () => {
|
||||
api.scope
|
||||
.get(
|
||||
/^\/v6\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
/^\/v7\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
)
|
||||
.replyWithFile(
|
||||
200,
|
||||
@ -88,7 +88,7 @@ describe('balena device', function () {
|
||||
// e.g. When user has a device associated with app that user is no longer a collaborator of.
|
||||
api.scope
|
||||
.get(
|
||||
/^\/v6\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
/^\/v7\/device\?.+&\$expand=belongs_to__application\(\$select=app_name,slug\)/,
|
||||
)
|
||||
.replyWithFile(
|
||||
200,
|
||||
@ -109,7 +109,7 @@ describe('balena device', function () {
|
||||
|
||||
it('outputs device as JSON with the -j/--json flag', async () => {
|
||||
api.scope
|
||||
.get(/^\/v6\/device\?.+&\$expand=device_tag\(\$select=tag_key,value\)/)
|
||||
.get(/^\/v7\/device\?.+&\$expand=device_tag\(\$select=tag_key,value\)/)
|
||||
.replyWithFile(200, path.join(apiResponsePath, 'device.json'), {
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
@ -125,7 +125,7 @@ describe('balena device', function () {
|
||||
it('should list devices from own and collaborator apps', async () => {
|
||||
api.scope
|
||||
.get(
|
||||
'/v6/device?$orderby=device_name%20asc&$select=id,uuid,device_name,status,is_online,supervisor_version,os_version&$expand=belongs_to__application($select=app_name,slug),is_of__device_type($select=slug),is_running__release($select=commit)',
|
||||
'/v7/device?$orderby=device_name%20asc&$select=id,uuid,device_name,status,is_online,supervisor_version,os_version&$expand=belongs_to__application($select=app_name,slug),is_of__device_type($select=slug),is_running__release($select=commit)',
|
||||
)
|
||||
.replyWithFile(200, path.join(apiResponsePath, 'devices.json'), {
|
||||
'Content-Type': 'application/json',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user