diff --git a/automation/capitanodoc/markdown.ts b/automation/capitanodoc/markdown.ts index 4edf72b7..4bd32bcd 100644 --- a/automation/capitanodoc/markdown.ts +++ b/automation/capitanodoc/markdown.ts @@ -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.`, ); diff --git a/completion/_balena b/completion/_balena index 0058ceab..9daf9928 100644 --- a/completion/_balena +++ b/completion/_balena @@ -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 diff --git a/completion/templates/zsh.template b/completion/templates/zsh.template index 4676869f..d5762146 100644 --- a/completion/templates/zsh.template +++ b/completion/templates/zsh.template @@ -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 diff --git a/docs/balena-cli.md b/docs/balena-cli.md index f1ac7804..3d5c2f49 100644 --- a/docs/balena-cli.md +++ b/docs/balena-cli.md @@ -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 [:[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 @@ -3277,9 +3243,9 @@ fleet name or slug (preferred) The commit hash of the release to preload. Use "current" to specify the current release (ignored if no appId is given). The current release is usually also the -latest, but can be pinned to a specific release. See: -https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/ -https://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api +latest, but can be pinned to a specific release. See: +https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/ +https://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api https://github.com/balena-io-examples/staged-releases #### -s, --splash-image SPLASH-IMAGE @@ -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 diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 2c91a025..051dcb68 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -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", diff --git a/package.json b/package.json index 0676a164..5f642704 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/commands/api-key/generate.ts b/src/commands/api-key/generate.ts index e869358d..1eb381de 100644 --- a/src/commands/api-key/generate.ts +++ b/src/commands/api-key/generate.ts @@ -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() { diff --git a/src/commands/api-key/list.ts b/src/commands/api-key/list.ts index cecbcdfa..8f802ff7 100644 --- a/src/commands/api-key/list.ts +++ b/src/commands/api-key/list.ts @@ -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', diff --git a/src/commands/api-key/revoke.ts b/src/commands/api-key/revoke.ts index a8c4756b..ef303d68 100644 --- a/src/commands/api-key/revoke.ts +++ b/src/commands/api-key/revoke.ts @@ -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() { diff --git a/src/commands/app/create.ts b/src/commands/app/create.ts index 67242d30..7ca52f77 100644 --- a/src/commands/app/create.ts +++ b/src/commands/app/create.ts @@ -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; diff --git a/src/commands/block/create.ts b/src/commands/block/create.ts index 0e69b6cc..221f7d2a 100644 --- a/src/commands/block/create.ts +++ b/src/commands/block/create.ts @@ -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; diff --git a/src/commands/build/index.ts b/src/commands/build/index.ts index fd0c9940..66a8944f 100644 --- a/src/commands/build/index.ts +++ b/src/commands/build/index.ts @@ -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; diff --git a/src/commands/config/generate.ts b/src/commands/config/generate.ts index ee95a0c7..4376b53f 100644 --- a/src/commands/config/generate.ts +++ b/src/commands/config/generate.ts @@ -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; diff --git a/src/commands/config/inject.ts b/src/commands/config/inject.ts index f34e71d0..a9d06cb1 100644 --- a/src/commands/config/inject.ts +++ b/src/commands/config/inject.ts @@ -44,7 +44,6 @@ export default class ConfigInjectCmd extends Command { public static flags = { drive: cf.driveOrImg, - help: cf.help, }; public static root = true; diff --git a/src/commands/config/read.ts b/src/commands/config/read.ts index d32b511d..644f68f1 100644 --- a/src/commands/config/read.ts +++ b/src/commands/config/read.ts @@ -38,7 +38,6 @@ export default class ConfigReadCmd extends Command { public static flags = { drive: cf.driveOrImg, - help: cf.help, json: cf.json, }; diff --git a/src/commands/config/reconfigure.ts b/src/commands/config/reconfigure.ts index 24003f8e..af01e959 100644 --- a/src/commands/config/reconfigure.ts +++ b/src/commands/config/reconfigure.ts @@ -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"', }), diff --git a/src/commands/config/write.ts b/src/commands/config/write.ts index 34cd3b8b..4a8d991c 100644 --- a/src/commands/config/write.ts +++ b/src/commands/config/write.ts @@ -49,7 +49,6 @@ export default class ConfigWriteCmd extends Command { public static flags = { drive: cf.driveOrImg, - help: cf.help, }; public static root = true; diff --git a/src/commands/deploy/index.ts b/src/commands/deploy/index.ts index 1e87ad74..312edfb4 100644 --- a/src/commands/deploy/index.ts +++ b/src/commands/deploy/index.ts @@ -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; diff --git a/src/commands/device-type/list.ts b/src/commands/device-type/list.ts index e2c2e6f2..ff3d5dcc 100644 --- a/src/commands/device-type/list.ts +++ b/src/commands/device-type/list.ts @@ -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', diff --git a/src/commands/device/deactivate.ts b/src/commands/device/deactivate.ts index e8e50611..f0a81631 100644 --- a/src/commands/device/deactivate.ts +++ b/src/commands/device/deactivate.ts @@ -42,7 +42,6 @@ export default class DeviceDeactivateCmd extends Command { public static flags = { yes: cf.yes, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/device/detect.ts b/src/commands/device/detect.ts index 0361d461..c8489c42 100644 --- a/src/commands/device/detect.ts +++ b/src/commands/device/detect.ts @@ -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', diff --git a/src/commands/device/identify.ts b/src/commands/device/identify.ts index 57bef0af..c3de3cec 100644 --- a/src/commands/device/identify.ts +++ b/src/commands/device/identify.ts @@ -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() { diff --git a/src/commands/device/index.ts b/src/commands/device/index.ts index 86e2c0a0..53e6c7bb 100644 --- a/src/commands/device/index.ts +++ b/src/commands/device/index.ts @@ -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', diff --git a/src/commands/device/init.ts b/src/commands/device/init.ts index 7ad58e24..81b907f4 100644 --- a/src/commands/device/init.ts +++ b/src/commands/device/init.ts @@ -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; diff --git a/src/commands/device/list.ts b/src/commands/device/list.ts index ce492a0a..7eea1c1e 100644 --- a/src/commands/device/list.ts +++ b/src/commands/device/list.ts @@ -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; diff --git a/src/commands/device/local-mode.ts b/src/commands/device/local-mode.ts index e26ae15d..7d327336 100644 --- a/src/commands/device/local-mode.ts +++ b/src/commands/device/local-mode.ts @@ -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; diff --git a/src/commands/device/logs.ts b/src/commands/device/logs.ts index 4903482d..b08d81e1 100644 --- a/src/commands/device/logs.ts +++ b/src/commands/device/logs.ts @@ -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; diff --git a/src/commands/device/move.ts b/src/commands/device/move.ts index 93393b32..0300fe70 100644 --- a/src/commands/device/move.ts +++ b/src/commands/device/move.ts @@ -55,7 +55,6 @@ export default class DeviceMoveCmd extends Command { public static flags = { fleet: cf.fleet, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/device/note.ts b/src/commands/device/note.ts index 5be144c8..cedbdb81 100644 --- a/src/commands/device/note.ts +++ b/src/commands/device/note.ts @@ -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; diff --git a/src/commands/device/os-update.ts b/src/commands/device/os-update.ts index 665c5d87..47aa5fdf 100644 --- a/src/commands/device/os-update.ts +++ b/src/commands/device/os-update.ts @@ -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); + }); } } diff --git a/src/commands/device/pin.ts b/src/commands/device/pin.ts index dae13ddf..b786ccb8 100644 --- a/src/commands/device/pin.ts +++ b/src/commands/device/pin.ts @@ -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'); diff --git a/src/commands/device/public-url.ts b/src/commands/device/public-url.ts index c1ff9bb5..52f7394b 100644 --- a/src/commands/device/public-url.ts +++ b/src/commands/device/public-url.ts @@ -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; diff --git a/src/commands/device/purge.ts b/src/commands/device/purge.ts index 00bd54d0..37cf4a5d 100644 --- a/src/commands/device/purge.ts +++ b/src/commands/device/purge.ts @@ -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() { diff --git a/src/commands/device/reboot.ts b/src/commands/device/reboot.ts index 2a7e0e90..9061b405 100644 --- a/src/commands/device/reboot.ts +++ b/src/commands/device/reboot.ts @@ -36,7 +36,6 @@ export default class DeviceRebootCmd extends Command { public static flags = { force: cf.force, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/device/register.ts b/src/commands/device/register.ts index cefea070..13c8be60 100644 --- a/src/commands/device/register.ts +++ b/src/commands/device/register.ts @@ -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; diff --git a/src/commands/device/rename.ts b/src/commands/device/rename.ts index 0f56b8d4..f087be80 100644 --- a/src/commands/device/rename.ts +++ b/src/commands/device/rename.ts @@ -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() { diff --git a/src/commands/device/restart.ts b/src/commands/device/restart.ts index 92d1d90d..f64d3bd5 100644 --- a/src/commands/device/restart.ts +++ b/src/commands/device/restart.ts @@ -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 { diff --git a/src/commands/device/rm.ts b/src/commands/device/rm.ts index 1ce7434d..be387aa7 100644 --- a/src/commands/device/rm.ts +++ b/src/commands/device/rm.ts @@ -44,7 +44,6 @@ export default class DeviceRmCmd extends Command { public static flags = { yes: cf.yes, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/device/shutdown.ts b/src/commands/device/shutdown.ts index 79b1974e..a65d7d84 100644 --- a/src/commands/device/shutdown.ts +++ b/src/commands/device/shutdown.ts @@ -37,7 +37,6 @@ export default class DeviceShutdownCmd extends Command { public static flags = { force: cf.force, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/device/ssh.ts b/src/commands/device/ssh.ts index 1268ebf5..ca722ac5 100644 --- a/src/commands/device/ssh.ts +++ b/src/commands/device/ssh.ts @@ -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; diff --git a/src/commands/device/start-service.ts b/src/commands/device/start-service.ts index 5749c2a2..eba5c71e 100644 --- a/src/commands/device/start-service.ts +++ b/src/commands/device/start-service.ts @@ -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() { diff --git a/src/commands/device/stop-service.ts b/src/commands/device/stop-service.ts index 652d1ec4..22f46067 100644 --- a/src/commands/device/stop-service.ts +++ b/src/commands/device/stop-service.ts @@ -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() { diff --git a/src/commands/device/track-fleet.ts b/src/commands/device/track-fleet.ts index cbf976b2..f4612a97 100644 --- a/src/commands/device/track-fleet.ts +++ b/src/commands/device/track-fleet.ts @@ -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() { diff --git a/src/commands/device/tunnel.ts b/src/commands/device/tunnel.ts index fc086853..38d877ea 100644 --- a/src/commands/device/tunnel.ts +++ b/src/commands/device/tunnel.ts @@ -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; diff --git a/src/commands/env/list.ts b/src/commands/env/list.ts index 5a32d97e..42c122d5 100644 --- a/src/commands/env/list.ts +++ b/src/commands/env/list.ts @@ -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'] }, }; diff --git a/src/commands/env/rename.ts b/src/commands/env/rename.ts index dcdd59f4..e21e01d7 100644 --- a/src/commands/env/rename.ts +++ b/src/commands/env/rename.ts @@ -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() { diff --git a/src/commands/env/set.ts b/src/commands/env/set.ts index 036ccfd3..6ad8d6a0 100644 --- a/src/commands/env/set.ts +++ b/src/commands/env/set.ts @@ -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, }; diff --git a/src/commands/fleet/create.ts b/src/commands/fleet/create.ts index 2412ab59..ebb3cb35 100644 --- a/src/commands/fleet/create.ts +++ b/src/commands/fleet/create.ts @@ -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; diff --git a/src/commands/fleet/index.ts b/src/commands/fleet/index.ts index ebba3444..7080a697 100644 --- a/src/commands/fleet/index.ts +++ b/src/commands/fleet/index.ts @@ -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', diff --git a/src/commands/fleet/list.ts b/src/commands/fleet/list.ts index 5d7824dc..49e84547 100644 --- a/src/commands/fleet/list.ts +++ b/src/commands/fleet/list.ts @@ -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, }; diff --git a/src/commands/fleet/pin.ts b/src/commands/fleet/pin.ts index 92a19057..e1665bef 100644 --- a/src/commands/fleet/pin.ts +++ b/src/commands/fleet/pin.ts @@ -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() { diff --git a/src/commands/fleet/purge.ts b/src/commands/fleet/purge.ts index a6601ff1..2bcd3966 100644 --- a/src/commands/fleet/purge.ts +++ b/src/commands/fleet/purge.ts @@ -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() { diff --git a/src/commands/fleet/rename.ts b/src/commands/fleet/rename.ts index cd99434c..a6e03a06 100644 --- a/src/commands/fleet/rename.ts +++ b/src/commands/fleet/rename.ts @@ -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() { diff --git a/src/commands/fleet/restart.ts b/src/commands/fleet/restart.ts index e81067b0..9a6c6c9d 100644 --- a/src/commands/fleet/restart.ts +++ b/src/commands/fleet/restart.ts @@ -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() { diff --git a/src/commands/fleet/rm.ts b/src/commands/fleet/rm.ts index c115f67f..c768b74d 100644 --- a/src/commands/fleet/rm.ts +++ b/src/commands/fleet/rm.ts @@ -44,7 +44,6 @@ export default class FleetRmCmd extends Command { public static flags = { yes: cf.yes, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/fleet/track-latest.ts b/src/commands/fleet/track-latest.ts index 588592ee..2547d9b2 100644 --- a/src/commands/fleet/track-latest.ts +++ b/src/commands/fleet/track-latest.ts @@ -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() { diff --git a/src/commands/join/index.ts b/src/commands/join/index.ts index 2e3ccc7f..5427cb57 100644 --- a/src/commands/join/index.ts +++ b/src/commands/join/index.ts @@ -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; diff --git a/src/commands/leave/index.ts b/src/commands/leave/index.ts index 9ff81399..123631a8 100644 --- a/src/commands/leave/index.ts +++ b/src/commands/leave/index.ts @@ -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; diff --git a/src/commands/local/configure.ts b/src/commands/local/configure.ts index 7e72fb60..1cdd244c 100644 --- a/src/commands/local/configure.ts +++ b/src/commands/local/configure.ts @@ -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; diff --git a/src/commands/local/flash.ts b/src/commands/local/flash.ts index 592e0993..89c097ef 100644 --- a/src/commands/local/flash.ts +++ b/src/commands/local/flash.ts @@ -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; diff --git a/src/commands/login/index.ts b/src/commands/login/index.ts index 7fb7de77..34d7fbfb 100644 --- a/src/commands/login/index.ts +++ b/src/commands/login/index.ts @@ -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; diff --git a/src/commands/organization/list.ts b/src/commands/organization/list.ts index 544ebdea..df252d83 100644 --- a/src/commands/organization/list.ts +++ b/src/commands/organization/list.ts @@ -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() { diff --git a/src/commands/os/build-config.ts b/src/commands/os/build-config.ts index caac821a..7a15613b 100644 --- a/src/commands/os/build-config.ts +++ b/src/commands/os/build-config.ts @@ -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; diff --git a/src/commands/os/configure.ts b/src/commands/os/configure.ts index cb9669ef..da497c36 100644 --- a/src/commands/os/configure.ts +++ b/src/commands/os/configure.ts @@ -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; diff --git a/src/commands/os/download.ts b/src/commands/os/download.ts index 00ae0787..4635fcdd 100644 --- a/src/commands/os/download.ts +++ b/src/commands/os/download.ts @@ -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() { diff --git a/src/commands/os/initialize.ts b/src/commands/os/initialize.ts index 76c5063f..c6d4b52a 100644 --- a/src/commands/os/initialize.ts +++ b/src/commands/os/initialize.ts @@ -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; diff --git a/src/commands/os/versions.ts b/src/commands/os/versions.ts index bdd1c0b8..1937885b 100644 --- a/src/commands/os/versions.ts +++ b/src/commands/os/versions.ts @@ -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, diff --git a/src/commands/preload/index.ts b/src/commands/preload/index.ts index cad1c732..0cdfc63b 100644 --- a/src/commands/preload/index.ts +++ b/src/commands/preload/index.ts @@ -84,9 +84,9 @@ export default class PreloadCmd extends Command { description: `\ The commit hash of the release to preload. Use "current" to specify the current release (ignored if no appId is given). The current release is usually also the -latest, but can be pinned to a specific release. See: -https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/ -https://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api +latest, but can be pinned to a specific release. See: +https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/ +https://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api https://github.com/balena-io-examples/staged-releases\ `, char: 'c', @@ -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, })), diff --git a/src/commands/push/index.ts b/src/commands/push/index.ts index 520c2511..2b8b6e72 100644 --- a/src/commands/push/index.ts +++ b/src/commands/push/index.ts @@ -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; diff --git a/src/commands/release/finalize.ts b/src/commands/release/finalize.ts index e1f6c229..20276e2e 100644 --- a/src/commands/release/finalize.ts +++ b/src/commands/release/finalize.ts @@ -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', diff --git a/src/commands/release/index.ts b/src/commands/release/index.ts index 1b9db22e..0c6cc19a 100644 --- a/src/commands/release/index.ts +++ b/src/commands/release/index.ts @@ -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', diff --git a/src/commands/release/invalidate.ts b/src/commands/release/invalidate.ts index 26cfee60..42f952c8 100644 --- a/src/commands/release/invalidate.ts +++ b/src/commands/release/invalidate.ts @@ -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', diff --git a/src/commands/release/list.ts b/src/commands/release/list.ts index d3564372..dace069e 100644 --- a/src/commands/release/list.ts +++ b/src/commands/release/list.ts @@ -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 = { diff --git a/src/commands/release/validate.ts b/src/commands/release/validate.ts index 83c269da..83d3e9ab 100644 --- a/src/commands/release/validate.ts +++ b/src/commands/release/validate.ts @@ -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', diff --git a/src/commands/settings/index.ts b/src/commands/settings/index.ts index f5ca58f0..6dfaa5bc 100644 --- a/src/commands/settings/index.ts +++ b/src/commands/settings/index.ts @@ -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); diff --git a/src/commands/ssh-key/add.ts b/src/commands/ssh-key/add.ts index 726aab9e..4180792b 100644 --- a/src/commands/ssh-key/add.ts +++ b/src/commands/ssh-key/add.ts @@ -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() { diff --git a/src/commands/ssh-key/index.ts b/src/commands/ssh-key/index.ts index 95b128fb..bb8ca1f8 100644 --- a/src/commands/ssh-key/index.ts +++ b/src/commands/ssh-key/index.ts @@ -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() { diff --git a/src/commands/ssh-key/list.ts b/src/commands/ssh-key/list.ts index 78ca85ce..d081e640 100644 --- a/src/commands/ssh-key/list.ts +++ b/src/commands/ssh-key/list.ts @@ -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() { diff --git a/src/commands/ssh-key/rm.ts b/src/commands/ssh-key/rm.ts index 05920e2a..273cfa94 100644 --- a/src/commands/ssh-key/rm.ts +++ b/src/commands/ssh-key/rm.ts @@ -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; diff --git a/src/commands/support/index.ts b/src/commands/support/index.ts index 50d4e420..6c100a24 100644 --- a/src/commands/support/index.ts +++ b/src/commands/support/index.ts @@ -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; diff --git a/src/commands/tag/list.ts b/src/commands/tag/list.ts index 509ed9e8..40ca940e 100644 --- a/src/commands/tag/list.ts +++ b/src/commands/tag/list.ts @@ -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; diff --git a/src/commands/tag/rm.ts b/src/commands/tag/rm.ts index 3c1585cc..622b6f35 100644 --- a/src/commands/tag/rm.ts +++ b/src/commands/tag/rm.ts @@ -57,7 +57,6 @@ export default class TagRmCmd extends Command { ...cf.release, exclusive: ['fleet', 'device'], }, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/tag/set.ts b/src/commands/tag/set.ts index 60575a32..adb79a1e 100644 --- a/src/commands/tag/set.ts +++ b/src/commands/tag/set.ts @@ -71,7 +71,6 @@ export default class TagSetCmd extends Command { ...cf.release, exclusive: ['fleet', 'device'], }, - help: cf.help, }; public static authenticated = true; diff --git a/src/commands/util/available-drives.ts b/src/commands/util/available-drives.ts index 3de865cf..d4742718 100644 --- a/src/commands/util/available-drives.ts +++ b/src/commands/util/available-drives.ts @@ -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() { diff --git a/src/commands/version/index.ts b/src/commands/version/index.ts index c7f5919c..2624b2e5 100644 --- a/src/commands/version/index.ts +++ b/src/commands/version/index.ts @@ -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() { diff --git a/src/help.ts b/src/help.ts index 85e7fd51..16b75391 100644 --- a/src/help.ts +++ b/src/help.ts @@ -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', diff --git a/src/preparser.ts b/src/preparser.ts index 8afcb3cd..242af795 100644 --- a/src/preparser.ts +++ b/src/preparser.ts @@ -40,8 +40,8 @@ export async function preparseArgs(argv: string[]): Promise { 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]); } } diff --git a/src/utils/application-create.ts b/src/utils/application-create.ts index 072b561c..b25acc98 100644 --- a/src/utils/application-create.ts +++ b/src/utils/application-create.ts @@ -4,7 +4,6 @@ import { getBalenaSdk } from './lazy'; export interface FlagsDef { organization?: string; type?: string; // application device type - help: void; } export interface ArgsDef { diff --git a/src/utils/common-flags.ts b/src/utils/common-flags.ts index 8f687cf1..ba84db13 100644 --- a/src/utils/common-flags.ts +++ b/src/utils/common-flags.ts @@ -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', diff --git a/src/utils/compose-types.d.ts b/src/utils/compose-types.d.ts index ab566167..8bd000cb 100644 --- a/src/utils/compose-types.d.ts +++ b/src/utils/compose-types.d.ts @@ -95,7 +95,7 @@ export interface Release { | 'end_timestamp' >; serviceImages: Dictionary< - Omit + Omit >; } diff --git a/src/utils/compose.ts b/src/utils/compose.ts index ccbec3e2..1270cc91 100644 --- a/src/utils/compose.ts +++ b/src/utils/compose.ts @@ -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 { 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' >, ), }; diff --git a/src/utils/compose_ts.ts b/src/utils/compose_ts.ts index 75b64333..b2fd3044 100644 --- a/src/utils/compose_ts.ts +++ b/src/utils/compose_ts.ts @@ -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 | undefined> { +): Promise< + import('@balena/compose/dist/release/models').ReleaseModel['contract'] +> { let fileContentAsString; try { fileContentAsString = await fs.readFile(filePath, 'utf8'); diff --git a/src/utils/config.ts b/src/utils/config.ts index 51948225..e3a91676 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -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) => { + osRelease.contract?.provides.some((entry: Dictionary) => { return entry.type === 'sw.feature' && entry.slug === 'secureboot'; }) ) { diff --git a/src/utils/device/api.ts b/src/utils/device/api.ts index 7687ed25..0cf79a4a 100644 --- a/src/utils/device/api.ts +++ b/src/utils/device/api.ts @@ -93,7 +93,7 @@ export class DeviceAPI { ); } - public async getTargetState(): Promise { + public async getTargetState() { const url = this.getUrlForAction('getTargetState'); return DeviceAPI.promisifiedRequest( diff --git a/src/utils/device/deploy.ts b/src/utils/device/deploy.ts index 9ead627a..68b9145e 100644 --- a/src/utils/device/deploy.ts +++ b/src/utils/device/deploy.ts @@ -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, diff --git a/src/utils/patterns.ts b/src/utils/patterns.ts index 6dcbc516..b13ba8fd 100644 --- a/src/utils/patterns.ts +++ b/src/utils/patterns.ts @@ -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 { 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 => { - 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; diff --git a/tests/commands/app/create.spec.ts b/tests/commands/app/create.spec.ts deleted file mode 100644 index 290b5e37..00000000 --- a/tests/commands/app/create.spec.ts +++ /dev/null @@ -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([]); - }); -}); diff --git a/tests/commands/deploy.spec.ts b/tests/commands/deploy.spec.ts index cff67b75..27926c42 100644 --- a/tests/commands/deploy.spec.ts +++ b/tests/commands/deploy.spec.ts @@ -183,9 +183,11 @@ describe('balena deploy', function () { api.expectPostRelease({ inspectRequest: (_uri: string, requestBody: nock.Body) => { const body = requestBody.valueOf() as Partial; - 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; - 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 diff --git a/tests/commands/device-type/list.spec.ts b/tests/commands/device-type/list.spec.ts index 64bce186..556b52ef 100644 --- a/tests/commands/device-type/list.spec.ts +++ b/tests/commands/device-type/list.spec.ts @@ -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'); diff --git a/tests/commands/device/device.spec.ts b/tests/commands/device/device.spec.ts index 78b3b3a8..3f283a2d 100644 --- a/tests/commands/device/device.spec.ts +++ b/tests/commands/device/device.spec.ts @@ -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', diff --git a/tests/commands/device/ssh.spec.ts b/tests/commands/device/ssh.spec.ts index 94534b77..0da4caf5 100644 --- a/tests/commands/device/ssh.spec.ts +++ b/tests/commands/device/ssh.spec.ts @@ -121,7 +121,7 @@ describe('balena device ssh', function () { itSS('should fail if device not online (mocked, device UUID)', async () => { const deviceUUID = 'abc1234'; - const expectedErrLines = ['Device with UUID abc1234 is offline']; + const expectedErrLines = ['Device with UUID abc1234 is disconnected']; api.expectGetWhoAmI({ optional: true, persist: true }); api.expectGetDevice({ fullUUID: deviceUUID, isOnline: false }); mockedExitCode = 0; diff --git a/tests/commands/env/list.spec.ts b/tests/commands/env/list.spec.ts index 5cf83541..a0790412 100644 --- a/tests/commands/env/list.spec.ts +++ b/tests/commands/env/list.spec.ts @@ -65,20 +65,17 @@ describe('balena env list', function () { api.expectGetAppEnvVars(); api.expectGetAppServiceVars(); - const { out, err } = await runCommand(`envs -f ${appName}`); + const { out } = await runCommand(`envs -f ${appName}`); - expect(out.join('')).to.satisfy((msg: string) => - msg.endsWith( - stripIndent` + expect(out.join('')).to.contain( + stripIndent` ID NAME VALUE FLEET SERVICE 120110 svar1 svar1-value gh_user/testApp service1 120111 svar2 svar2-value gh_user/testApp service2 120101 var1 var1-val gh_user/testApp * 120102 var2 22 gh_user/testApp * ` + '\n', - ), ); - expect(err.join('')).to.equal(''); }); it('should successfully list config vars for a test fleet', async () => { diff --git a/tests/commands/help.spec.ts b/tests/commands/help.spec.ts index 0b395232..4d0db647 100644 --- a/tests/commands/help.spec.ts +++ b/tests/commands/help.spec.ts @@ -98,7 +98,7 @@ const LIST_ADDITIONAL = ` const GLOBAL_OPTIONS = ` GLOBAL OPTIONS - --help, -h + --help --debug `; diff --git a/tests/commands/release.spec.ts b/tests/commands/release.spec.ts index 7c749b6e..1ced28ca 100644 --- a/tests/commands/release.spec.ts +++ b/tests/commands/release.spec.ts @@ -85,6 +85,5 @@ describe('balena release', function () { expect(json[0].contains__image[0].image[0].start_timestamp).to.equal( '2020-01-04T01:13:08.583Z', ); - expect(json[0].__metadata.uri).to.equal('/resin/release(@id)?@id=142334'); }); }); diff --git a/tests/nock/balena-api-mock.ts b/tests/nock/balena-api-mock.ts index add690e9..bf6ca230 100644 --- a/tests/nock/balena-api-mock.ts +++ b/tests/nock/balena-api-mock.ts @@ -39,7 +39,7 @@ export class BalenaAPIMock extends NockMock { times = undefined as number | undefined, expandArchitecture = false, } = {}) { - const interceptor = this.optGet(/^\/v6\/application($|[(?])/, { + const interceptor = this.optGet(/^\/v7\/application($|[(?])/, { optional, persist, times, @@ -52,8 +52,8 @@ export class BalenaAPIMock extends NockMock { path.join( apiResponsePath, !expandArchitecture - ? 'application-GET-v6-expanded-app-type.json' - : 'application-GET-v6-expanded-app-type-cpu-arch.json', + ? 'application-GET-v7-expanded-app-type.json' + : 'application-GET-v7-expanded-app-type-cpu-arch.json', ), jHeader, ); @@ -86,17 +86,6 @@ export class BalenaAPIMock extends NockMock { this.optPost(/^\/api-key\/v[0-9]\/?$/, opts).reply(200, 'dummykey'); } - public expectGetMyApplication(opts: ScopeOpts = {}) { - this.optGet(/^\/v6\/my_application($|[(?])/, opts).reply( - 200, - JSON.parse(`{"d": [{ - "organization": [{ "handle": "bob", "__metadata": {} }], - "id": 1301645, - "__metadata": { "uri": "/resin/my_application(@id)?@id=1301645" }}]} - `), - ); - } - public expectGetAuth(opts: ScopeOpts = {}) { this.optGet(/^\/auth\/v1\//, opts).reply(200, { token: 'test', @@ -109,7 +98,7 @@ export class BalenaAPIMock extends NockMock { persist = false, times = undefined as number | undefined, } = {}) { - const interceptor = this.optGet(/^\/v6\/release($|[(?])/, { + const interceptor = this.optGet(/^\/v7\/release($|[(?])/, { persist, optional, times, @@ -117,12 +106,12 @@ export class BalenaAPIMock extends NockMock { if (notFound) { interceptor.reply(200, { d: [] }); } else { - this.optGet(/^\/v6\/release($|[(?])/, { + this.optGet(/^\/v7\/release($|[(?])/, { persist, optional, }).replyWithFile( 200, - path.join(apiResponsePath, 'release-GET-v6.json'), + path.join(apiResponsePath, 'release-GET-v7.json'), jHeader, ); } @@ -139,7 +128,7 @@ export class BalenaAPIMock extends NockMock { persist = false, times = undefined as number | undefined, }) { - this.optPatch(/^\/v6\/release($|[(?])/, { optional, persist, times }).reply( + this.optPatch(/^\/v7\/release($|[(?])/, { optional, persist, times }).reply( statusCode, this.getInspectedReplyBodyFunction(inspectRequest, replyBody), ); @@ -155,11 +144,11 @@ export class BalenaAPIMock extends NockMock { persist = false, times = undefined as number | undefined, }) { - this.optPost(/^\/v6\/release($|[(?])/, { optional, persist, times }).reply( + this.optPost(/^\/v7\/release($|[(?])/, { optional, persist, times }).reply( statusCode, this.getInspectedReplyFileFunction( inspectRequest, - path.join(apiResponsePath, 'release-POST-v6.json'), + path.join(apiResponsePath, 'release-POST-v7.json'), ), jHeader, ); @@ -176,7 +165,7 @@ export class BalenaAPIMock extends NockMock { persist = false, times = undefined as number | undefined, }) { - this.optPatch(/^\/v6\/image($|[(?])/, { optional, persist, times }).reply( + this.optPatch(/^\/v7\/image($|[(?])/, { optional, persist, times }).reply( statusCode, this.getInspectedReplyBodyFunction(inspectRequest, replyBody), ); @@ -186,9 +175,9 @@ export class BalenaAPIMock extends NockMock { * Mocks balena-release call */ public expectPostImage(opts: ScopeOpts = {}) { - this.optPost(/^\/v6\/image($|[(?])/, opts).replyWithFile( + this.optPost(/^\/v7\/image($|[(?])/, opts).replyWithFile( 201, - path.join(apiResponsePath, 'image-POST-v6.json'), + path.join(apiResponsePath, 'image-POST-v7.json'), jHeader, ); } @@ -197,9 +186,9 @@ export class BalenaAPIMock extends NockMock { * Mocks balena-release call */ public expectPostImageLabel(opts: ScopeOpts = {}) { - this.optPost(/^\/v6\/image_label($|[(?])/, opts).replyWithFile( + this.optPost(/^\/v7\/image_label($|[(?])/, opts).replyWithFile( 201, - path.join(apiResponsePath, 'image-label-POST-v6.json'), + path.join(apiResponsePath, 'image-label-POST-v7.json'), jHeader, ); } @@ -209,11 +198,11 @@ export class BalenaAPIMock extends NockMock { */ public expectPostImageIsPartOfRelease(opts: ScopeOpts = {}) { this.optPost( - /^\/v6\/image__is_part_of__release($|[(?])/, + /^\/v7\/image__is_part_of__release($|[(?])/, opts, ).replyWithFile( 200, - path.join(apiResponsePath, 'image-is-part-of-release-POST-v6.json'), + path.join(apiResponsePath, 'image-is-part-of-release-POST-v7.json'), jHeader, ); } @@ -365,7 +354,7 @@ export class BalenaAPIMock extends NockMock { public expectGetDeviceTypes(opts: ScopeOpts = {}) { this.optGet(/^\/v\d+\/device_type($|\?)/, opts).replyWithFile( 200, - path.join(apiResponsePath, 'device-type-GET-v6.json'), + path.join(apiResponsePath, 'device-type-GET-v7.json'), jHeader, ); } @@ -404,7 +393,7 @@ export class BalenaAPIMock extends NockMock { serviceName: string; }) { const serviceId = opts.serviceId || 243768; - this.optGet(/^\/v6\/application($|\?).*\$expand=service.*/, opts).reply( + this.optGet(/^\/v7\/application($|\?).*\$expand=service.*/, opts).reply( 200, { d: [{ service: [{ id: serviceId, service_name: opts.serviceName }] }], @@ -416,16 +405,13 @@ export class BalenaAPIMock extends NockMock { * Mocks balena-release call */ public expectGetUser(opts: ScopeOpts = {}) { - this.optGet(/^\/v6\/user/, opts).reply(200, { + this.optGet(/^\/v7\/user/, opts).reply(200, { d: [ { id: 99999, - actor: 1234567, + actor: { __id: 1234567 }, username: 'gh_user', created_at: '2018-08-19T13:55:04.485Z', - __metadata: { - uri: '/resin/user(@id)?@id=43699', - }, }, ], }); diff --git a/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json b/tests/test-data/api-response/application-GET-v7-expanded-app-type-cpu-arch.json similarity index 83% rename from tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json rename to tests/test-data/api-response/application-GET-v7-expanded-app-type-cpu-arch.json index 62fe7329..5dc62b16 100644 --- a/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json +++ b/tests/test-data/api-response/application-GET-v7-expanded-app-type-cpu-arch.json @@ -6,8 +6,7 @@ "name": "Starter", "slug": "microservices-starter", "supports_multicontainer": true, - "is_legacy": true, - "__metadata": {} + "is_legacy": true } ], "id": 1301645, @@ -23,7 +22,7 @@ } ], "depends_on__application": null, - "actor": 3423895, + "actor": { "__id": 3423895 }, "app_name": "testApp", "slug": "gh_user/testApp", "should_be__running_release": [ @@ -44,10 +43,7 @@ "should_track_latest_release": true, "is_accessible_by_support_until__date": null, "is_public": false, - "is_host": false, - "__metadata": { - "uri": "/resin/application(@id)?@id=1301645" - } + "is_host": false } ] } diff --git a/tests/test-data/api-response/application-GET-v6-expanded-app-type.json b/tests/test-data/api-response/application-GET-v7-expanded-app-type.json similarity index 81% rename from tests/test-data/api-response/application-GET-v6-expanded-app-type.json rename to tests/test-data/api-response/application-GET-v7-expanded-app-type.json index 6708b2f1..af136e83 100644 --- a/tests/test-data/api-response/application-GET-v6-expanded-app-type.json +++ b/tests/test-data/api-response/application-GET-v7-expanded-app-type.json @@ -6,8 +6,7 @@ "name": "Starter", "slug": "microservices-starter", "supports_multicontainer": true, - "is_legacy": true, - "__metadata": {} + "is_legacy": true } ], "id": 1301645, @@ -23,7 +22,7 @@ } ], "depends_on__application": null, - "actor": 3423895, + "actor": { "__id": 3423895 }, "app_name": "testApp", "slug": "gh_user/testApp", "should_be__running_release": [ @@ -39,10 +38,7 @@ "should_track_latest_release": true, "is_accessible_by_support_until__date": null, "is_public": false, - "is_host": false, - "__metadata": { - "uri": "/resin/application(@id)?@id=1301645" - } + "is_host": false } ] } diff --git a/tests/test-data/api-response/device-missing-app.json b/tests/test-data/api-response/device-missing-app.json index fca329f1..10d51076 100644 --- a/tests/test-data/api-response/device-missing-app.json +++ b/tests/test-data/api-response/device-missing-app.json @@ -3,7 +3,6 @@ { "belongs_to__application": [], "id": 1747415, - "is_managed_by__device": null, "device_name": "sparkling-wood", "is_of__device_type": [{ "slug": "raspberrypi4-64" }], "uuid": "fda508c8583011b8466c26abdd5159f2", @@ -16,19 +15,16 @@ "os_version": "balenaOS 2.44.0+rev3", "supervisor_version": "10.3.7", "is_web_accessible": false, - "overall_status": "idle", - "cpu_usage" : 34, - "cpu_temp" : 56.2, - "cpu_id" : "some cpu id", - "memory_usage" : 1000, - "memory_total" : 4000, - "storage_block_device" : "/dev/mmcblk0", - "storage_usage" : 1000, - "storage_total" : 64000, - "is_undervolted" : true, - "__metadata": { - "uri": "/resin/device(@id)?@id=1747415" - } + "overall_status": "reduced-functionality", + "cpu_usage": 34, + "cpu_temp": 56.2, + "cpu_id": "some cpu id", + "memory_usage": 1000, + "memory_total": 4000, + "storage_block_device": "/dev/mmcblk0", + "storage_usage": 1000, + "storage_total": 64000, + "is_undervolted": true } ] } diff --git a/tests/test-data/api-response/device-missing-fields.json b/tests/test-data/api-response/device-missing-fields.json index db57d1a3..1f6a0601 100644 --- a/tests/test-data/api-response/device-missing-fields.json +++ b/tests/test-data/api-response/device-missing-fields.json @@ -4,12 +4,10 @@ "belongs_to__application": [ { "app_name": "test app", - "slug": "org/test app", - "__metadata": {} + "slug": "org/test app" } ], "id": 1747415, - "is_managed_by__device": null, "device_name": "sparkling-wood", "is_of__device_type": [{ "slug": "raspberrypi4-64" }], "uuid": "fda508c8583011b8466c26abdd5159f2", @@ -22,10 +20,7 @@ "os_version": "balenaOS 2.44.0+rev3", "supervisor_version": "10.3.7", "is_web_accessible": false, - "overall_status": "offline", - "__metadata": { - "uri": "/resin/device(@id)?@id=1747415" - } + "overall_status": "disconnected" } ] } diff --git a/tests/test-data/api-response/device-status.json b/tests/test-data/api-response/device-status.json index 643f64c8..0ee67523 100644 --- a/tests/test-data/api-response/device-status.json +++ b/tests/test-data/api-response/device-status.json @@ -1,8 +1,7 @@ { "d": [ { - "overall_status": "offline", - "__metadata": {} + "overall_status": "disconnected" } ] } diff --git a/tests/test-data/api-response/device-type-GET-v6.json b/tests/test-data/api-response/device-type-GET-v6.json deleted file mode 100644 index da1ff638..00000000 --- a/tests/test-data/api-response/device-type-GET-v6.json +++ /dev/null @@ -1,2254 +0,0 @@ -{ - "d": [ - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "n310-tx2", - "__metadata": {} - } - ], - "id": 162, - "slug": "n310-tx2", - "name": "Aetina N310 TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=162" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "n510-tx2", - "__metadata": {} - } - ], - "id": 39, - "slug": "n510-tx2", - "name": "Aetina N510 TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=39" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "aio-3288c", - "__metadata": {} - } - ], - "id": 148, - "slug": "aio-3288c", - "name": "AIO 3288C", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=148" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "am571x-evm", - "__metadata": {} - } - ], - "id": 1, - "slug": "am571x-evm", - "name": "AM571X EVM", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=1" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "apalis-imx6q", - "__metadata": {} - } - ], - "id": 2, - "slug": "apalis-imx6q", - "name": "Apalis iMX6q", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=2" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "asus-tinker-board", - "__metadata": {} - } - ], - "id": 8, - "slug": "asus-tinker-board", - "name": "Asus Tinker Board", - "is_private": false, - "belongs_to__device_family": { - "__id": 1, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=1" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=8" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "asus-tinker-board-s", - "__metadata": {} - } - ], - "id": 9, - "slug": "asus-tinker-board-s", - "name": "Asus Tinker Board S", - "is_private": false, - "belongs_to__device_family": { - "__id": 1, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=1" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=9" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jn30b-nano", - "__metadata": {} - } - ], - "id": 141, - "slug": "jn30b-nano", - "name": "Auvidea JN30B Nano", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=141" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "fincm3", - "__metadata": {} - } - ], - "id": 21, - "slug": "fincm3", - "name": "Balena Fin (CM3)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=21" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "bananapi-m1-plus", - "__metadata": {} - } - ], - "id": 10, - "slug": "bananapi-m1-plus", - "name": "BananaPi-M1+", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=10" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beagleboard-xm", - "__metadata": {} - } - ], - "id": 11, - "slug": "beagleboard-xm", - "name": "BeagleBoard-XM", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=11" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beaglebone-black", - "__metadata": {} - } - ], - "id": 12, - "slug": "beaglebone-black", - "name": "BeagleBone Black", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=12" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beaglebone-green", - "__metadata": {} - } - ], - "id": 13, - "slug": "beaglebone-green", - "name": "BeagleBone Green", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=13" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beaglebone-green-gateway", - "__metadata": {} - } - ], - "id": 184, - "slug": "beaglebone-green-gateway", - "name": "BeagleBone Green Gateway", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=184" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beaglebone-green-wifi", - "__metadata": {} - } - ], - "id": 14, - "slug": "beaglebone-green-wifi", - "name": "BeagleBone Green Wireless", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=14" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "colibri-imx6dl", - "__metadata": {} - } - ], - "id": 18, - "slug": "colibri-imx6dl", - "name": "Colibri iMX6dl", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=18" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "iot-gate-imx8", - "__metadata": {} - } - ], - "id": 190, - "slug": "iot-gate-imx8", - "name": "Compulab IOT-gate-imx8", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=190" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "cl-som-imx8", - "__metadata": {} - } - ], - "id": 17, - "slug": "cl-som-imx8", - "name": "Compulab MX8M", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=17" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "coral-dev", - "__metadata": {} - } - ], - "id": 142, - "slug": "coral-dev", - "name": "Coral Dev Board", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=142" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "astro-tx2", - "__metadata": {} - } - ], - "id": 161, - "slug": "astro-tx2", - "name": "CTI Astro TX2 G+", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=161" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "orbitty-tx2", - "__metadata": {} - } - ], - "id": 52, - "slug": "orbitty-tx2", - "name": "CTI Orbitty TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=52" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "photon-nano", - "__metadata": {} - } - ], - "id": 146, - "slug": "photon-nano", - "name": "CTI Photon Nano", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=146" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "photon-xavier-nx", - "__metadata": {} - } - ], - "id": 176, - "slug": "photon-xavier-nx", - "name": "CTI Photon Xavier NX", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=176" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "spacely-tx2", - "__metadata": {} - } - ], - "id": 64, - "slug": "spacely-tx2", - "name": "CTI Spacely TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=64" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "i386-nlp", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "cybertan-ze250", - "__metadata": {} - } - ], - "id": 19, - "slug": "cybertan-ze250", - "name": "Cybertan ZE250", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=19" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "ccimx8x-sbc-pro", - "__metadata": {} - } - ], - "id": 185, - "slug": "ccimx8x-sbc-pro", - "name": "Digi ConnectCore 8X SBC Pro", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=185" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "edge", - "__metadata": {} - } - ], - "id": 20, - "slug": "edge", - "name": "Edge Device Builder", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=20" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "etcher-pro", - "__metadata": {} - } - ], - "id": 144, - "slug": "etcher-pro", - "name": "Etcher Pro", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=144" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "firefly-rk3288", - "__metadata": {} - } - ], - "id": 147, - "slug": "firefly-rk3288", - "name": "FireFly rk3288", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=147" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "floyd-nano", - "__metadata": {} - } - ], - "id": 192, - "slug": "floyd-nano", - "name": "Floyd Nano BB02A eMMC", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=192" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "generic", - "__metadata": {} - } - ], - "id": 22, - "slug": "generic", - "name": "Generic", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=22" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "generic-aarch64", - "__metadata": {} - } - ], - "id": 23, - "slug": "generic-aarch64", - "name": "Generic AARCH64", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=23" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "generic-amd64", - "__metadata": {} - } - ], - "id": 24, - "slug": "generic-amd64", - "name": "generic-amd64", - "is_private": true, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=24" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "generic-armv7ahf", - "__metadata": {} - } - ], - "id": 178, - "slug": "generic-armv7ahf", - "name": "Generic ARMv7-a HF", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=178" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "genericx86-64-ext", - "__metadata": {} - } - ], - "id": 145, - "slug": "genericx86-64-ext", - "name": "Generic x86_64", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=145" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "hummingboard", - "__metadata": {} - } - ], - "id": 25, - "slug": "hummingboard", - "name": "Hummingboard", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=25" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "imx8mm-var-dart ", - "__metadata": {} - } - ], - "id": 151, - "slug": "imx8mm-var-dart ", - "name": "imx8mm-var-dart ", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=151" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "i386", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "intel-edison", - "__metadata": {} - } - ], - "id": 29, - "slug": "intel-edison", - "name": "Intel Edison", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=29" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "intel-nuc", - "__metadata": {} - }, - { - "is_referenced_by__alias": "nuc", - "__metadata": {} - } - ], - "id": 30, - "slug": "intel-nuc", - "name": "Intel NUC", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=30" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "smarc-px30", - "__metadata": {} - } - ], - "id": 186, - "slug": "smarc-px30", - "name": "I-Pi SMARC PX30 SD-CARD", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=186" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "surface-pro-6", - "__metadata": {} - } - ], - "id": 67, - "slug": "surface-pro-6", - "name": "Microsoft Surface 6", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=67" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "surface-go", - "__metadata": {} - } - ], - "id": 140, - "slug": "surface-go", - "name": "Microsoft Surface Go", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=140" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "nanopc-t4", - "__metadata": {} - } - ], - "id": 40, - "slug": "nanopc-t4", - "name": "NanoPC-T4", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=40" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "nanopi-neo-air", - "__metadata": {} - } - ], - "id": 41, - "slug": "nanopi-neo-air", - "name": "Nanopi Neo Air", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=41" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "nitrogen6x", - "__metadata": {} - } - ], - "id": 42, - "slug": "nitrogen6x", - "name": "Nitrogen 6x", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=42" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "nitrogen6xq2g", - "__metadata": {} - } - ], - "id": 43, - "slug": "nitrogen6xq2g", - "name": "Nitrogen 6X Quad 2GB", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=43" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "nitrogen8mm", - "__metadata": {} - } - ], - "id": 44, - "slug": "nitrogen8mm", - "name": "Nitrogen8M Mini SBC", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=44" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "npe-x500-m3", - "__metadata": {} - } - ], - "id": 45, - "slug": "npe-x500-m3", - "name": "NPE X500 M3", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=45" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "blackboard-tx2", - "__metadata": {} - } - ], - "id": 16, - "slug": "blackboard-tx2", - "name": "Nvidia blackboard TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=16" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-nano-2gb-devkit", - "__metadata": {} - } - ], - "id": 188, - "slug": "jetson-nano-2gb-devkit", - "name": "Nvidia Jetson Nano 2GB Devkit SD", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=188" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-nano-emmc", - "__metadata": {} - } - ], - "id": 158, - "slug": "jetson-nano-emmc", - "name": "Nvidia Jetson Nano eMMC", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=158" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-nano", - "__metadata": {} - } - ], - "id": 32, - "slug": "jetson-nano", - "name": "Nvidia Jetson Nano SD-CARD", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=32" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-tx1", - "__metadata": {} - } - ], - "id": 33, - "slug": "jetson-tx1", - "name": "Nvidia Jetson TX1", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=33" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-tx2", - "__metadata": {} - } - ], - "id": 34, - "slug": "jetson-tx2", - "name": "Nvidia Jetson TX2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=34" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-tx2-skycatch", - "__metadata": {} - } - ], - "id": 35, - "slug": "jetson-tx2-skycatch", - "name": "Nvidia Jetson TX2 Skycatch (EXPERIMENTAL)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=35" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-xavier", - "__metadata": {} - } - ], - "id": 36, - "slug": "jetson-xavier", - "name": "Nvidia Jetson Xavier", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=36" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-xavier-nx-devkit-emmc", - "__metadata": {} - } - ], - "id": 159, - "slug": "jetson-xavier-nx-devkit-emmc", - "name": "Nvidia Jetson Xavier NX Devkit eMMC", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=159" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "jetson-xavier-nx-devkit", - "__metadata": {} - } - ], - "id": 181, - "slug": "jetson-xavier-nx-devkit", - "name": "Nvidia Jetson Xavier NX Devkit SD-CARD", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=181" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "odroid-c1", - "__metadata": {} - } - ], - "id": 46, - "slug": "odroid-c1", - "name": "ODROID-C1+", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=46" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "odroid-u3+", - "__metadata": {} - }, - { - "is_referenced_by__alias": "odroid-ux3", - "__metadata": {} - }, - { - "is_referenced_by__alias": "odroid-xu4", - "__metadata": {} - } - ], - "id": 47, - "slug": "odroid-xu4", - "name": "ODROID-XU4", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=47" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "orange-pi-lite", - "__metadata": {} - } - ], - "id": 48, - "slug": "orange-pi-lite", - "name": "Orange Pi Lite", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=48" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "orange-pi-one", - "__metadata": {} - } - ], - "id": 49, - "slug": "orange-pi-one", - "name": "Orange Pi One", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=49" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "orangepi-plus2", - "__metadata": {} - } - ], - "id": 50, - "slug": "orangepi-plus2", - "name": "Orange Pi Plus2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=50" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "orange-pi-zero", - "__metadata": {} - } - ], - "id": 51, - "slug": "orange-pi-zero", - "name": "Orange Pi Zero", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=51" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "parallella", - "__metadata": {} - } - ], - "id": 53, - "slug": "parallella", - "name": "Parallella", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=53" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "beaglebone-pocket", - "__metadata": {} - } - ], - "id": 15, - "slug": "beaglebone-pocket", - "name": "PocketBeagle", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=15" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "i386", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "qemux86", - "__metadata": {} - } - ], - "id": 54, - "slug": "qemux86", - "name": "QEMU X86 32bit", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=54" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "qemux86-64", - "__metadata": {} - } - ], - "id": 55, - "slug": "qemux86-64", - "name": "QEMU X86 64bit", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=55" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi2", - "__metadata": {} - }, - { - "is_referenced_by__alias": "raspberry-pi2", - "__metadata": {} - } - ], - "id": 57, - "slug": "raspberry-pi2", - "name": "Raspberry Pi 2", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=57" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi3", - "__metadata": {} - } - ], - "id": 58, - "slug": "raspberrypi3", - "name": "Raspberry Pi 3", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=58" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi3-64", - "__metadata": {} - } - ], - "id": 59, - "slug": "raspberrypi3-64", - "name": "Raspberry Pi 3 (using 64bit OS)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=59" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi400-64", - "__metadata": {} - } - ], - "id": 183, - "slug": "raspberrypi400-64", - "name": "Raspberry Pi 400", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=183" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi4-64", - "__metadata": {} - } - ], - "id": 60, - "slug": "raspberrypi4-64", - "name": "Raspberry Pi 4 (using 64bit OS)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=60" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypicm4-ioboard", - "__metadata": {} - } - ], - "id": 191, - "slug": "raspberrypicm4-ioboard", - "name": "Raspberry Pi CM4 IO Board", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=191" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "rpi", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "raspberrypi", - "__metadata": {} - }, - { - "is_referenced_by__alias": "raspberry-pi", - "__metadata": {} - } - ], - "id": 56, - "slug": "raspberry-pi", - "name": "Raspberry Pi (v1 / Zero / Zero W)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=56" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "revpi-connect", - "__metadata": {} - } - ], - "id": 163, - "slug": "revpi-connect", - "name": "Revolution Pi Connect", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=163" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "revpi-core-3", - "__metadata": {} - } - ], - "id": 61, - "slug": "revpi-core-3", - "name": "Revolution Pi Core 3", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=61" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "kitra520", - "__metadata": {} - } - ], - "id": 37, - "slug": "kitra520", - "name": "RushUp Kitra 520", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=37" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "kitra710", - "__metadata": {} - } - ], - "id": 38, - "slug": "kitra710", - "name": "RushUp Kitra 710", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=38" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "artik10", - "__metadata": {} - } - ], - "id": 3, - "slug": "artik10", - "name": "Samsung Artik 10", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=3" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "artik5", - "__metadata": {} - } - ], - "id": 4, - "slug": "artik5", - "name": "Samsung Artik 520", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=4" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "artik530", - "__metadata": {} - } - ], - "id": 5, - "slug": "artik530", - "name": "Samsung Artik 530", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=5" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "artik533s", - "__metadata": {} - } - ], - "id": 6, - "slug": "artik533s", - "name": "Samsung Artik 530s 1G", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=6" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "artik710", - "__metadata": {} - } - ], - "id": 7, - "slug": "artik710", - "name": "Samsung Artik 710", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=7" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "i386-nlp", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "iot2000", - "__metadata": {} - } - ], - "id": 31, - "slug": "iot2000", - "name": "Siemens IOT2000", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=31" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "skx2", - "__metadata": {} - } - ], - "id": 62, - "slug": "skx2", - "name": "SKX2", - "is_private": true, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=62" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "ts4900", - "__metadata": {} - } - ], - "id": 68, - "slug": "ts4900", - "name": "Technologic TS-4900", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=68" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "ts7700", - "__metadata": {} - } - ], - "id": 69, - "slug": "ts7700", - "name": "Technologic TS-7700", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=69" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "up-board", - "__metadata": {} - } - ], - "id": 70, - "slug": "up-board", - "name": "UP Board", - "is_private": false, - "belongs_to__device_family": { - "__id": 2, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=2" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=70" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "up-core", - "__metadata": {} - } - ], - "id": 71, - "slug": "up-core", - "name": "UP Core", - "is_private": false, - "belongs_to__device_family": { - "__id": 2, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=2" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=71" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "up-core-plus", - "__metadata": {} - } - ], - "id": 72, - "slug": "up-core-plus", - "name": "UP Core Plus", - "is_private": false, - "belongs_to__device_family": { - "__id": 2, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=2" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=72" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "amd64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "up-squared", - "__metadata": {} - } - ], - "id": 73, - "slug": "up-squared", - "name": "UP Squared", - "is_private": false, - "belongs_to__device_family": { - "__id": 2, - "__deferred": { - "uri": "/resin/device_family(@id)?@id=2" - } - }, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=73" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "imx6ul-var-dart", - "__metadata": {} - } - ], - "id": 26, - "slug": "imx6ul-var-dart", - "name": "Variscite DART-6UL", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=26" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "imx8m-var-dart", - "__metadata": {} - } - ], - "id": 28, - "slug": "imx8m-var-dart", - "name": "Variscite DART-MX8M", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=28" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "imx8mm-var-dart", - "__metadata": {} - } - ], - "id": 150, - "slug": "imx8mm-var-dart", - "name": "Variscite DART-MX8M Mini", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=150" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "var-som-mx6", - "__metadata": {} - } - ], - "id": 74, - "slug": "var-som-mx6", - "name": "Variscite VAR-SOM-MX6", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=74" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "imx7-var-som", - "__metadata": {} - } - ], - "id": 27, - "slug": "imx7-var-som", - "name": "Variscite VAR-SOM-MX7", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=27" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "via-vab820-quad", - "__metadata": {} - } - ], - "id": 75, - "slug": "via-vab820-quad", - "name": "VIA VAB 820-quad", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=75" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "armv7hf", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "zc702-zynq7", - "__metadata": {} - } - ], - "id": 169, - "slug": "zc702-zynq7", - "name": "Zynq ZC702", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=169" - } - }, - { - "is_of__cpu_architecture": [ - { - "slug": "aarch64", - "__metadata": {} - } - ], - "device_type_alias": [ - { - "is_referenced_by__alias": "zynq-xz702", - "__metadata": {} - } - ], - "id": 76, - "slug": "zynq-xz702", - "name": "Zynq ZC702 (DISCONTINUED)", - "is_private": false, - "belongs_to__device_family": null, - "__metadata": { - "uri": "/resin/device_type(@id)?@id=76" - } - } - ] -} \ No newline at end of file diff --git a/tests/test-data/api-response/device-type-GET-v7.json b/tests/test-data/api-response/device-type-GET-v7.json new file mode 100644 index 00000000..fe9d67ac --- /dev/null +++ b/tests/test-data/api-response/device-type-GET-v7.json @@ -0,0 +1,1749 @@ +{ + "d": [ + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "n310-tx2" + } + ], + "id": 162, + "slug": "n310-tx2", + "name": "Aetina N310 TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "n510-tx2" + } + ], + "id": 39, + "slug": "n510-tx2", + "name": "Aetina N510 TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "aio-3288c" + } + ], + "id": 148, + "slug": "aio-3288c", + "name": "AIO 3288C", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "am571x-evm" + } + ], + "id": 1, + "slug": "am571x-evm", + "name": "AM571X EVM", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "apalis-imx6q" + } + ], + "id": 2, + "slug": "apalis-imx6q", + "name": "Apalis iMX6q", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "asus-tinker-board" + } + ], + "id": 8, + "slug": "asus-tinker-board", + "name": "Asus Tinker Board", + "is_private": false, + "belongs_to__device_family": { + "__id": 1, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=1" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "asus-tinker-board-s" + } + ], + "id": 9, + "slug": "asus-tinker-board-s", + "name": "Asus Tinker Board S", + "is_private": false, + "belongs_to__device_family": { + "__id": 1, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=1" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jn30b-nano" + } + ], + "id": 141, + "slug": "jn30b-nano", + "name": "Auvidea JN30B Nano", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "fincm3" + } + ], + "id": 21, + "slug": "fincm3", + "name": "Balena Fin (CM3)", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "bananapi-m1-plus" + } + ], + "id": 10, + "slug": "bananapi-m1-plus", + "name": "BananaPi-M1+", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beagleboard-xm" + } + ], + "id": 11, + "slug": "beagleboard-xm", + "name": "BeagleBoard-XM", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-black" + } + ], + "id": 12, + "slug": "beaglebone-black", + "name": "BeagleBone Black", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green" + } + ], + "id": 13, + "slug": "beaglebone-green", + "name": "BeagleBone Green", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green-gateway" + } + ], + "id": 184, + "slug": "beaglebone-green-gateway", + "name": "BeagleBone Green Gateway", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-green-wifi" + } + ], + "id": 14, + "slug": "beaglebone-green-wifi", + "name": "BeagleBone Green Wireless", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "colibri-imx6dl" + } + ], + "id": 18, + "slug": "colibri-imx6dl", + "name": "Colibri iMX6dl", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "iot-gate-imx8" + } + ], + "id": 190, + "slug": "iot-gate-imx8", + "name": "Compulab IOT-gate-imx8", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "cl-som-imx8" + } + ], + "id": 17, + "slug": "cl-som-imx8", + "name": "Compulab MX8M", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "coral-dev" + } + ], + "id": 142, + "slug": "coral-dev", + "name": "Coral Dev Board", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "astro-tx2" + } + ], + "id": 161, + "slug": "astro-tx2", + "name": "CTI Astro TX2 G+", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orbitty-tx2" + } + ], + "id": 52, + "slug": "orbitty-tx2", + "name": "CTI Orbitty TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "photon-nano" + } + ], + "id": 146, + "slug": "photon-nano", + "name": "CTI Photon Nano", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "photon-xavier-nx" + } + ], + "id": 176, + "slug": "photon-xavier-nx", + "name": "CTI Photon Xavier NX", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "spacely-tx2" + } + ], + "id": 64, + "slug": "spacely-tx2", + "name": "CTI Spacely TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "i386-nlp" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "cybertan-ze250" + } + ], + "id": 19, + "slug": "cybertan-ze250", + "name": "Cybertan ZE250", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ccimx8x-sbc-pro" + } + ], + "id": 185, + "slug": "ccimx8x-sbc-pro", + "name": "Digi ConnectCore 8X SBC Pro", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "edge" + } + ], + "id": 20, + "slug": "edge", + "name": "Edge Device Builder", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "etcher-pro" + } + ], + "id": 144, + "slug": "etcher-pro", + "name": "Etcher Pro", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "firefly-rk3288" + } + ], + "id": 147, + "slug": "firefly-rk3288", + "name": "FireFly rk3288", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "floyd-nano" + } + ], + "id": 192, + "slug": "floyd-nano", + "name": "Floyd Nano BB02A eMMC", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic" + } + ], + "id": 22, + "slug": "generic", + "name": "Generic", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-aarch64" + } + ], + "id": 23, + "slug": "generic-aarch64", + "name": "Generic AARCH64", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-amd64" + } + ], + "id": 24, + "slug": "generic-amd64", + "name": "generic-amd64", + "is_private": true, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "generic-armv7ahf" + } + ], + "id": 178, + "slug": "generic-armv7ahf", + "name": "Generic ARMv7-a HF", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "genericx86-64-ext" + } + ], + "id": 145, + "slug": "genericx86-64-ext", + "name": "Generic x86_64", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "hummingboard" + } + ], + "id": 25, + "slug": "hummingboard", + "name": "Hummingboard", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8mm-var-dart " + } + ], + "id": 151, + "slug": "imx8mm-var-dart ", + "name": "imx8mm-var-dart ", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "i386" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "intel-edison" + } + ], + "id": 29, + "slug": "intel-edison", + "name": "Intel Edison", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "intel-nuc" + }, + { + "is_referenced_by__alias": "nuc" + } + ], + "id": 30, + "slug": "intel-nuc", + "name": "Intel NUC", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "smarc-px30" + } + ], + "id": 186, + "slug": "smarc-px30", + "name": "I-Pi SMARC PX30 SD-CARD", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "surface-pro-6" + } + ], + "id": 67, + "slug": "surface-pro-6", + "name": "Microsoft Surface 6", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "surface-go" + } + ], + "id": 140, + "slug": "surface-go", + "name": "Microsoft Surface Go", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nanopc-t4" + } + ], + "id": 40, + "slug": "nanopc-t4", + "name": "NanoPC-T4", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nanopi-neo-air" + } + ], + "id": 41, + "slug": "nanopi-neo-air", + "name": "Nanopi Neo Air", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen6x" + } + ], + "id": 42, + "slug": "nitrogen6x", + "name": "Nitrogen 6x", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen6xq2g" + } + ], + "id": 43, + "slug": "nitrogen6xq2g", + "name": "Nitrogen 6X Quad 2GB", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "nitrogen8mm" + } + ], + "id": 44, + "slug": "nitrogen8mm", + "name": "Nitrogen8M Mini SBC", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "npe-x500-m3" + } + ], + "id": 45, + "slug": "npe-x500-m3", + "name": "NPE X500 M3", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "blackboard-tx2" + } + ], + "id": 16, + "slug": "blackboard-tx2", + "name": "Nvidia blackboard TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano-2gb-devkit" + } + ], + "id": 188, + "slug": "jetson-nano-2gb-devkit", + "name": "Nvidia Jetson Nano 2GB Devkit SD", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano-emmc" + } + ], + "id": 158, + "slug": "jetson-nano-emmc", + "name": "Nvidia Jetson Nano eMMC", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-nano" + } + ], + "id": 32, + "slug": "jetson-nano", + "name": "Nvidia Jetson Nano SD-CARD", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx1" + } + ], + "id": 33, + "slug": "jetson-tx1", + "name": "Nvidia Jetson TX1", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx2" + } + ], + "id": 34, + "slug": "jetson-tx2", + "name": "Nvidia Jetson TX2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-tx2-skycatch" + } + ], + "id": 35, + "slug": "jetson-tx2-skycatch", + "name": "Nvidia Jetson TX2 Skycatch (EXPERIMENTAL)", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier" + } + ], + "id": 36, + "slug": "jetson-xavier", + "name": "Nvidia Jetson Xavier", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier-nx-devkit-emmc" + } + ], + "id": 159, + "slug": "jetson-xavier-nx-devkit-emmc", + "name": "Nvidia Jetson Xavier NX Devkit eMMC", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "jetson-xavier-nx-devkit" + } + ], + "id": 181, + "slug": "jetson-xavier-nx-devkit", + "name": "Nvidia Jetson Xavier NX Devkit SD-CARD", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "odroid-c1" + } + ], + "id": 46, + "slug": "odroid-c1", + "name": "ODROID-C1+", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "odroid-u3+" + }, + { + "is_referenced_by__alias": "odroid-ux3" + }, + { + "is_referenced_by__alias": "odroid-xu4" + } + ], + "id": 47, + "slug": "odroid-xu4", + "name": "ODROID-XU4", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-lite" + } + ], + "id": 48, + "slug": "orange-pi-lite", + "name": "Orange Pi Lite", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-one" + } + ], + "id": 49, + "slug": "orange-pi-one", + "name": "Orange Pi One", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orangepi-plus2" + } + ], + "id": 50, + "slug": "orangepi-plus2", + "name": "Orange Pi Plus2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "orange-pi-zero" + } + ], + "id": 51, + "slug": "orange-pi-zero", + "name": "Orange Pi Zero", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "parallella" + } + ], + "id": 53, + "slug": "parallella", + "name": "Parallella", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "beaglebone-pocket" + } + ], + "id": 15, + "slug": "beaglebone-pocket", + "name": "PocketBeagle", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "i386" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "qemux86" + } + ], + "id": 54, + "slug": "qemux86", + "name": "QEMU X86 32bit", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "qemux86-64" + } + ], + "id": 55, + "slug": "qemux86-64", + "name": "QEMU X86 64bit", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi2" + }, + { + "is_referenced_by__alias": "raspberry-pi2" + } + ], + "id": 57, + "slug": "raspberry-pi2", + "name": "Raspberry Pi 2", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi3" + } + ], + "id": 58, + "slug": "raspberrypi3", + "name": "Raspberry Pi 3", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi3-64" + } + ], + "id": 59, + "slug": "raspberrypi3-64", + "name": "Raspberry Pi 3 (using 64bit OS)", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi400-64" + } + ], + "id": 183, + "slug": "raspberrypi400-64", + "name": "Raspberry Pi 400", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi4-64" + } + ], + "id": 60, + "slug": "raspberrypi4-64", + "name": "Raspberry Pi 4 (using 64bit OS)", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypicm4-ioboard" + } + ], + "id": 191, + "slug": "raspberrypicm4-ioboard", + "name": "Raspberry Pi CM4 IO Board", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "rpi" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "raspberrypi" + }, + { + "is_referenced_by__alias": "raspberry-pi" + } + ], + "id": 56, + "slug": "raspberry-pi", + "name": "Raspberry Pi (v1 / Zero / Zero W)", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "revpi-connect" + } + ], + "id": 163, + "slug": "revpi-connect", + "name": "Revolution Pi Connect", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "revpi-core-3" + } + ], + "id": 61, + "slug": "revpi-core-3", + "name": "Revolution Pi Core 3", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "kitra520" + } + ], + "id": 37, + "slug": "kitra520", + "name": "RushUp Kitra 520", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "kitra710" + } + ], + "id": 38, + "slug": "kitra710", + "name": "RushUp Kitra 710", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik10" + } + ], + "id": 3, + "slug": "artik10", + "name": "Samsung Artik 10", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik5" + } + ], + "id": 4, + "slug": "artik5", + "name": "Samsung Artik 520", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik530" + } + ], + "id": 5, + "slug": "artik530", + "name": "Samsung Artik 530", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik533s" + } + ], + "id": 6, + "slug": "artik533s", + "name": "Samsung Artik 530s 1G", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "artik710" + } + ], + "id": 7, + "slug": "artik710", + "name": "Samsung Artik 710", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "i386-nlp" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "iot2000" + } + ], + "id": 31, + "slug": "iot2000", + "name": "Siemens IOT2000", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "skx2" + } + ], + "id": 62, + "slug": "skx2", + "name": "SKX2", + "is_private": true, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ts4900" + } + ], + "id": 68, + "slug": "ts4900", + "name": "Technologic TS-4900", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "ts7700" + } + ], + "id": 69, + "slug": "ts7700", + "name": "Technologic TS-7700", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-board" + } + ], + "id": 70, + "slug": "up-board", + "name": "UP Board", + "is_private": false, + "belongs_to__device_family": { + "__id": 2, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=2" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-core" + } + ], + "id": 71, + "slug": "up-core", + "name": "UP Core", + "is_private": false, + "belongs_to__device_family": { + "__id": 2, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=2" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-core-plus" + } + ], + "id": 72, + "slug": "up-core-plus", + "name": "UP Core Plus", + "is_private": false, + "belongs_to__device_family": { + "__id": 2, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=2" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "amd64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "up-squared" + } + ], + "id": 73, + "slug": "up-squared", + "name": "UP Squared", + "is_private": false, + "belongs_to__device_family": { + "__id": 2, + "__deferred": { + "uri": "/resin/device_family(@id)?@id=2" + } + } + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx6ul-var-dart" + } + ], + "id": 26, + "slug": "imx6ul-var-dart", + "name": "Variscite DART-6UL", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8m-var-dart" + } + ], + "id": 28, + "slug": "imx8m-var-dart", + "name": "Variscite DART-MX8M", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx8mm-var-dart" + } + ], + "id": 150, + "slug": "imx8mm-var-dart", + "name": "Variscite DART-MX8M Mini", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "var-som-mx6" + } + ], + "id": 74, + "slug": "var-som-mx6", + "name": "Variscite VAR-SOM-MX6", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "imx7-var-som" + } + ], + "id": 27, + "slug": "imx7-var-som", + "name": "Variscite VAR-SOM-MX7", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "via-vab820-quad" + } + ], + "id": 75, + "slug": "via-vab820-quad", + "name": "VIA VAB 820-quad", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "armv7hf" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "zc702-zynq7" + } + ], + "id": 169, + "slug": "zc702-zynq7", + "name": "Zynq ZC702", + "is_private": false, + "belongs_to__device_family": null + }, + { + "is_of__cpu_architecture": [ + { + "slug": "aarch64" + } + ], + "device_type_alias": [ + { + "is_referenced_by__alias": "zynq-xz702" + } + ], + "id": 76, + "slug": "zynq-xz702", + "name": "Zynq ZC702 (DISCONTINUED)", + "is_private": false, + "belongs_to__device_family": null + } + ] +} diff --git a/tests/test-data/api-response/device-types-GET-v1.json b/tests/test-data/api-response/device-types-GET-v1.json index ea84e934..dd275864 100644 --- a/tests/test-data/api-response/device-types-GET-v1.json +++ b/tests/test-data/api-response/device-types-GET-v1.json @@ -4073,7 +4073,7 @@ "state": "DISCONTINUED", "stateInstructions": { "postProvisioning": [ - "The device is performing a shutdown. Please wait until the device is offline in the dashboard and disconnect the power cable.", + "The device is performing a shutdown. Please wait until the device is disconnected in the dashboard and disconnect the power cable.", "Remove the resinOS installation media.", "Set J11 (just next to the micro SD card slot) to position 1-2 (the position closest to the edge of the board).", "Remove and re-connect power to the board." @@ -4084,7 +4084,7 @@ "Insert the freshly burnt SD card into the VIA VAB 820-quad.", "Warning! This will also completely erase internal storage media, so please make a backup first.", "Set J11 (just next to the micro SD card slot) to position 2-3 (the position furthest away from the edge of the board) and then power on the board.", - "The device is performing a shutdown. Please wait until the device is offline in the dashboard and disconnect the power cable.", + "The device is performing a shutdown. Please wait until the device is disconnected in the dashboard and disconnect the power cable.", "Remove the resinOS installation media.", "Set J11 (just next to the micro SD card slot) to position 1-2 (the position closest to the edge of the board).", "Remove and re-connect power to the board." diff --git a/tests/test-data/api-response/device.json b/tests/test-data/api-response/device.json index e6505ca5..74b67fef 100644 --- a/tests/test-data/api-response/device.json +++ b/tests/test-data/api-response/device.json @@ -4,8 +4,7 @@ "belongs_to__application": [ { "app_name": "test app", - "slug": "org/test app", - "__metadata": {} + "slug": "org/test app" } ], "device_tag": [ @@ -15,7 +14,6 @@ } ], "id": 1747415, - "is_managed_by__device": null, "device_name": "sparkling-wood", "is_of__device_type": [{ "slug": "raspberrypi4-64" }], "uuid": "fda508c8583011b8466c26abdd5159f2", @@ -28,19 +26,16 @@ "os_version": "balenaOS 2.44.0+rev3", "supervisor_version": "10.3.7", "is_web_accessible": false, - "overall_status": "offline", - "cpu_usage" : 34, - "cpu_temp" : 56.2, - "cpu_id" : "some cpu id", - "memory_usage" : 1000, - "memory_total" : 4000, - "storage_block_device" : "/dev/mmcblk0", - "storage_usage" : 1000, - "storage_total" : 64000, - "is_undervolted" : true, - "__metadata": { - "uri": "/resin/device(@id)?@id=1747415" - } + "overall_status": "disconnected", + "cpu_usage": 34, + "cpu_temp": 56.2, + "cpu_id": "some cpu id", + "memory_usage": 1000, + "memory_total": 4000, + "storage_block_device": "/dev/mmcblk0", + "storage_usage": 1000, + "storage_total": 64000, + "is_undervolted": true } ] } diff --git a/tests/test-data/api-response/devices.json b/tests/test-data/api-response/devices.json index e6403c4a..bc1672d3 100644 --- a/tests/test-data/api-response/devices.json +++ b/tests/test-data/api-response/devices.json @@ -3,8 +3,7 @@ { "belongs_to__application": [ { - "slug": "org/test app", - "__metadata": {} + "slug": "org/test app" } ], "id": 1747415, @@ -19,10 +18,7 @@ "status": "Idle", "is_online": false, "os_version": "balenaOS 2.44.0+rev3", - "supervisor_version": "10.3.7", - "__metadata": { - "uri": "/resin/device(@id)?@id=1747415" - } + "supervisor_version": "10.3.7" }, { "belongs_to__application": [], @@ -38,10 +34,7 @@ "status": "Idle", "is_online": false, "os_version": "balenaOS 2.44.0+rev3", - "supervisor_version": "10.3.7", - "__metadata": { - "uri": "/resin/device(@id)?@id=1747415" - } + "supervisor_version": "10.3.7" } ] } diff --git a/tests/test-data/api-response/image-POST-v6.json b/tests/test-data/api-response/image-POST-v7.json similarity index 86% rename from tests/test-data/api-response/image-POST-v6.json rename to tests/test-data/api-response/image-POST-v7.json index 17f7fb32..c1ef357d 100644 --- a/tests/test-data/api-response/image-POST-v6.json +++ b/tests/test-data/api-response/image-POST-v7.json @@ -18,8 +18,5 @@ "push_timestamp": null, "status": "running", "content_hash": null, - "contract": null, - "__metadata": { - "uri": "/resin/image(@id)?@id=1859016" - } -} \ No newline at end of file + "contract": null +} diff --git a/tests/test-data/api-response/image-is-part-of-release-POST-v6.json b/tests/test-data/api-response/image-is-part-of-release-POST-v7.json similarity index 75% rename from tests/test-data/api-response/image-is-part-of-release-POST-v6.json rename to tests/test-data/api-response/image-is-part-of-release-POST-v7.json index d45645ab..db5c6abe 100644 --- a/tests/test-data/api-response/image-is-part-of-release-POST-v6.json +++ b/tests/test-data/api-response/image-is-part-of-release-POST-v7.json @@ -12,8 +12,5 @@ "uri": "/resin/release(1218643)" }, "__id": 1218643 - }, - "__metadata": { - "uri": "/resin/image__is_part_of__release(@id)?@id=1774668" } -} \ No newline at end of file +} diff --git a/tests/test-data/api-response/image-label-POST-v6.json b/tests/test-data/api-response/image-label-POST-v7.json similarity index 72% rename from tests/test-data/api-response/image-label-POST-v6.json rename to tests/test-data/api-response/image-label-POST-v7.json index a22b53c9..83d6b893 100644 --- a/tests/test-data/api-response/image-label-POST-v6.json +++ b/tests/test-data/api-response/image-label-POST-v7.json @@ -8,8 +8,5 @@ "__id": 1774668 }, "label_name": "io.resin.features.firmware", - "value": "1", - "__metadata": { - "uri": "/resin/image_label(@id)?@id=99699617" - } -} \ No newline at end of file + "value": "1" +} diff --git a/tests/test-data/api-response/release-GET-v6.json b/tests/test-data/api-response/release-GET-v7.json similarity index 90% rename from tests/test-data/api-response/release-GET-v6.json rename to tests/test-data/api-response/release-GET-v7.json index efae8a26..3f0b8788 100644 --- a/tests/test-data/api-response/release-GET-v6.json +++ b/tests/test-data/api-response/release-GET-v7.json @@ -10,9 +10,6 @@ "build_log": null, "start_timestamp": "2021-08-25T22:18:33.624Z", "end_timestamp": "2021-08-25T22:18:48.820Z", - "__metadata": { - "uri": "/resin/release(@id)?@id=142334" - }, "contains__image": [ { "image": [ @@ -28,7 +25,7 @@ }, "__id": 233455 }, - "image_size": 134320410, + "image_size": "134320410", "is_stored_at__image_location": "registry2.balena-cloud.com/v2/9c00c9413942cd15cfc9189c5dac359d", "project_type": "Standard Dockerfile", "error_message": null, @@ -36,10 +33,7 @@ "push_timestamp": "2020-01-04T01:13:14.415Z", "status": "success", "content_hash": "sha256:6b5471aae43ae81e8f69e10d1a516cb412569a6d5020a57eae311f8fa16d688a", - "contract": null, - "__metadata": { - "uri": "/resin/image(@id)?@id=1820810" - } + "contract": null } ], "id": 1738663, @@ -49,17 +43,13 @@ "uri": "/resin/release(1203844)" }, "__id": 1203844 - }, - "__metadata": { - "uri": "/resin/image__is_part_of__release(@id)?@id=1738663" } } ], "release_tag": [ { "tag_key": "testtag1", - "value": "val1", - "__metadata": {} + "value": "val1" } ], "composition": { diff --git a/tests/test-data/api-response/release-POST-v6.json b/tests/test-data/api-response/release-POST-v7.json similarity index 85% rename from tests/test-data/api-response/release-POST-v6.json rename to tests/test-data/api-response/release-POST-v7.json index ab5ca345..1c3b5b41 100644 --- a/tests/test-data/api-response/release-POST-v6.json +++ b/tests/test-data/api-response/release-POST-v7.json @@ -29,9 +29,7 @@ "tty": true, "restart": "always", "network_mode": "host", - "volumes": [ - "resin-data:/data" - ], + "volumes": ["resin-data:/data"], "labels": { "io.resin.features.kernel-modules": "1", "io.resin.features.firmware": "1", @@ -47,8 +45,5 @@ "build_log": null, "start_timestamp": "2020-01-16T17:08:52.710Z", "end_timestamp": null, - "update_timestamp": "2020-01-16T17:08:53.017Z", - "__metadata": { - "uri": "/resin/release(@id)?@id=1218643" - } -} \ No newline at end of file + "update_timestamp": "2020-01-16T17:08:53.017Z" +}