Merge pull request #1742 from balena-io/update-balena-sdk-13.0.0

Fix left-overs from balena-sdk v13 bump
This commit is contained in:
bulldozer-balena[bot] 2020-06-29 20:52:46 +00:00 committed by GitHub
commit d681dacc6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View File

@ -69,13 +69,19 @@ export default class DeviceCmd extends Command {
const balena = getBalenaSdk();
const device: ExtendedDevice = await balena.models.device.get(
params.uuid,
expandForAppName,
);
const deviceStatus = await balena.models.device.getStatus(device.uuid);
device.status = deviceStatus;
const [device, overallStatus] = await Promise.all([
balena.models.device.get(params.uuid, expandForAppName) as Promise<
ExtendedDevice
>,
// TODO: drop this and add `overall_status` to a $select in the above
// pine query once the overall_status field is moved to open-balena-api.
// See: https://github.com/balena-io/open-balena-api/issues/338
balena.models.device
.get(params.uuid, { $select: 'overall_status' })
.then(({ overall_status }) => overall_status)
.catchReturn(''),
]);
device.status = overallStatus;
device.dashboard_url = balena.models.device.getDashboardUrl(device.uuid);

View File

@ -214,7 +214,6 @@ function setupBalenaSdkSharedOptions(settings: CliSettings) {
const BalenaSdk = require('balena-sdk');
BalenaSdk.setSharedOptions({
apiUrl: settings.get<string>('apiUrl'),
imageMakerUrl: settings.get<string>('imageMakerUrl'),
dataDirectory: settings.get<string>('dataDirectory'),
retries: 2,
});

View File

@ -185,7 +185,6 @@
"archiver": "^3.1.1",
"balena-config-json": "^2.1.1",
"balena-device-init": "^5.0.2",
"balena-device-status": "^3.2.1",
"balena-errors": "^4.3.0",
"balena-image-manager": "^6.1.2",
"balena-preload": "^8.4.0",