mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 00:24:15 +00:00
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:
commit
d681dacc6d
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
});
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user