mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Update 'balena-sdk' from v12 to v13 and update code and tests as needed
Change-type: patch
This commit is contained in:
parent
06ab84fd10
commit
3ecf461d55
@ -108,7 +108,7 @@ Examples:
|
||||
.then(device =>
|
||||
// @ts-ignore `device.getStatus` requires a device with service info, but
|
||||
// this device isn't typed with them, possibly needs fixing?
|
||||
balena.models.device.getStatus(device).then(function(status) {
|
||||
balena.models.device.getStatus(params.uuid).then(function(status) {
|
||||
device.status = status;
|
||||
// @ts-ignore extending the device object with extra props
|
||||
device.dashboard_url = balena.models.device.getDashboardUrl(
|
||||
|
@ -130,9 +130,8 @@ const messages: {
|
||||
`,
|
||||
|
||||
BalenaExpiredToken: () => stripIndent`
|
||||
Looks like your session token has expired.
|
||||
Please try logging in again with:
|
||||
$ balena login`,
|
||||
Looks like the session token has expired.
|
||||
Try logging in again with the "balena login" command.`,
|
||||
};
|
||||
|
||||
const EXPECTED_ERROR_REGEXES = [
|
||||
|
257
npm-shrinkwrap.json
generated
257
npm-shrinkwrap.json
generated
@ -109,6 +109,11 @@
|
||||
"resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz",
|
||||
"integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="
|
||||
},
|
||||
"@balena/es-version": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@balena/es-version/-/es-version-1.0.0.tgz",
|
||||
"integrity": "sha512-o3/sRDyrXC75BUUziMAs+W5C02aVST0YqY5Ny31Ot3a+7CzK2XDRinMGywvK93tm2QVdL83HGkN483S62Xo9Dw=="
|
||||
},
|
||||
"@balena/lint": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@balena/lint/-/lint-4.1.1.tgz",
|
||||
@ -1108,9 +1113,9 @@
|
||||
"integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w=="
|
||||
},
|
||||
"@types/memoizee": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/memoizee/-/memoizee-0.4.3.tgz",
|
||||
"integrity": "sha512-N6QT0c9ZbEKl33n1wyoTxZs4cpN+YXjs0Aqy5Qim8ipd9PBNIPqOh/p5Pixc4601tqr5GErsdxUbfqviDfubNw=="
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/memoizee/-/memoizee-0.4.4.tgz",
|
||||
"integrity": "sha512-c9+1g6+6vEqcw5UuM0RbfQV0mssmZcoG9+hNC5ptDCsv4G+XJW1Z4pE13wV5zbc9e0+YrDydALBTiD3nWG1a3g=="
|
||||
},
|
||||
"@types/mime": {
|
||||
"version": "2.0.1",
|
||||
@ -2095,9 +2100,9 @@
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"balena-auth": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/balena-auth/-/balena-auth-3.0.1.tgz",
|
||||
"integrity": "sha512-ImeAWuJK1FL7vkMxIKNkMUMSExE4Is8dc09aKKMm1xwbdRbLVllMYpVhr9wbMFXEbe6GX9x5RwVF2YlFrvixBw==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-auth/-/balena-auth-3.1.0.tgz",
|
||||
"integrity": "sha512-RMdRmxvhfZsoahq+GApdf0TN97a55kHprLsWkvZYJugdMThookcRw7B79pJFbEPXTPLX8vlpD3RbJ5IgUf7C6w==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.29",
|
||||
"@types/jwt-decode": "^2.2.1",
|
||||
@ -2122,6 +2127,33 @@
|
||||
"version": "8.10.60",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "12.33.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-12.33.0.tgz",
|
||||
"integrity": "sha512-riqcJeA8SYMf20bgt1lhgw/eWiWXVwivGHgBer54/dxDIo48RIwys98LvkisIO2sTco1AmTL4Q0rePsMGjEYwQ==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.30",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/node": "^8.10.59",
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"balena-auth": "^3.0.1",
|
||||
"balena-device-status": "^3.2.1",
|
||||
"balena-errors": "^4.3.0",
|
||||
"balena-hup-action-utils": "~4.0.0",
|
||||
"balena-pine": "^10.1.1",
|
||||
"balena-register-device": "^6.0.1",
|
||||
"balena-request": "^10.0.8",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-settings-client": "^4.0.4",
|
||||
"bluebird": "^3.7.2",
|
||||
"lodash": "^4.17.15",
|
||||
"memoizee": "^0.4.14",
|
||||
"moment": "^2.24.0",
|
||||
"ndjson": "^1.5.0",
|
||||
"semver": "^7.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2191,6 +2223,33 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "12.33.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-12.33.0.tgz",
|
||||
"integrity": "sha512-riqcJeA8SYMf20bgt1lhgw/eWiWXVwivGHgBer54/dxDIo48RIwys98LvkisIO2sTco1AmTL4Q0rePsMGjEYwQ==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.30",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/node": "^8.10.59",
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"balena-auth": "^3.0.1",
|
||||
"balena-device-status": "^3.2.1",
|
||||
"balena-errors": "^4.3.0",
|
||||
"balena-hup-action-utils": "~4.0.0",
|
||||
"balena-pine": "^10.1.1",
|
||||
"balena-register-device": "^6.0.1",
|
||||
"balena-request": "^10.0.8",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-settings-client": "^4.0.4",
|
||||
"bluebird": "^3.7.2",
|
||||
"lodash": "^4.17.15",
|
||||
"memoizee": "^0.4.14",
|
||||
"moment": "^2.24.0",
|
||||
"ndjson": "^1.5.0",
|
||||
"semver": "^7.1.3"
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
"version": "2.4.4",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
|
||||
@ -2240,6 +2299,40 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "12.33.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-12.33.0.tgz",
|
||||
"integrity": "sha512-riqcJeA8SYMf20bgt1lhgw/eWiWXVwivGHgBer54/dxDIo48RIwys98LvkisIO2sTco1AmTL4Q0rePsMGjEYwQ==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.30",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/node": "^8.10.59",
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"balena-auth": "^3.0.1",
|
||||
"balena-device-status": "^3.2.1",
|
||||
"balena-errors": "^4.3.0",
|
||||
"balena-hup-action-utils": "~4.0.0",
|
||||
"balena-pine": "^10.1.1",
|
||||
"balena-register-device": "^6.0.1",
|
||||
"balena-request": "^10.0.8",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-settings-client": "^4.0.4",
|
||||
"bluebird": "^3.7.2",
|
||||
"lodash": "^4.17.15",
|
||||
"memoizee": "^0.4.14",
|
||||
"moment": "^2.24.0",
|
||||
"ndjson": "^1.5.0",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"docker-progress": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/docker-progress/-/docker-progress-3.0.5.tgz",
|
||||
@ -2290,12 +2383,23 @@
|
||||
}
|
||||
},
|
||||
"balena-register-device": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-register-device/-/balena-register-device-6.1.0.tgz",
|
||||
"integrity": "sha512-iPCm8HiZUG2xwNLVECaHx8g589jnqBDtCpLJ0ow7828xd0Spk9nF/GncRqiqmeo5OUZPnXW7prLkaRwu4s2Otg==",
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/balena-register-device/-/balena-register-device-6.1.6.tgz",
|
||||
"integrity": "sha512-kS8JZoLyucZ9oUFicspN/k3jRrvdtQ4UYXVCHHyw91C3y2Z1T5CQpwfMBSqA8dp5wQKyP527K/0+lMUa2ncLhA==",
|
||||
"requires": {
|
||||
"bluebird": "^3.7.2",
|
||||
"randomstring": "^1.1.5"
|
||||
"randomstring": "^1.1.5",
|
||||
"typed-error": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"typed-error": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/typed-error/-/typed-error-2.0.0.tgz",
|
||||
"integrity": "sha1-05j9hin8K3nIOfm30b/Ay7ZSYBI=",
|
||||
"requires": {
|
||||
"tslib": "^1.7.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"balena-release": {
|
||||
@ -2337,43 +2441,86 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"qs": {
|
||||
"version": "6.9.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz",
|
||||
"integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw=="
|
||||
"version": "6.9.4",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz",
|
||||
"integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "12.33.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-12.33.0.tgz",
|
||||
"integrity": "sha512-riqcJeA8SYMf20bgt1lhgw/eWiWXVwivGHgBer54/dxDIo48RIwys98LvkisIO2sTco1AmTL4Q0rePsMGjEYwQ==",
|
||||
"version": "13.8.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-13.8.0.tgz",
|
||||
"integrity": "sha512-EhaXZq7kNCewhp0oSMeeTslvRIhvaV0QxlS7u3SWmdMoDjH1gdg01sG2I3b20DkN8oDAIoNkaD14eo2eTf0C8w==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.30",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/lodash": "^4.14.150",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/node": "^8.10.59",
|
||||
"@types/node": "^10.17.20",
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"balena-auth": "^3.0.1",
|
||||
"balena-device-status": "^3.2.1",
|
||||
"balena-errors": "^4.3.0",
|
||||
"balena-hup-action-utils": "~4.0.0",
|
||||
"balena-pine": "^10.1.1",
|
||||
"balena-register-device": "^6.0.1",
|
||||
"balena-request": "^10.0.8",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-errors": "^4.4.0",
|
||||
"balena-hup-action-utils": "~4.0.1",
|
||||
"balena-pine": "^11.0.1",
|
||||
"balena-register-device": "^6.1.1",
|
||||
"balena-request": "^10.0.9",
|
||||
"balena-semver": "^2.3.0",
|
||||
"balena-settings-client": "^4.0.4",
|
||||
"bluebird": "^3.7.2",
|
||||
"lodash": "^4.17.15",
|
||||
"memoizee": "^0.4.14",
|
||||
"moment": "^2.24.0",
|
||||
"moment": "~2.24.0 || ^2.25.1",
|
||||
"ndjson": "^1.5.0",
|
||||
"semver": "^7.1.3"
|
||||
"semver": "^7.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "8.10.60",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
"balena-errors": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-errors/-/balena-errors-4.4.0.tgz",
|
||||
"integrity": "sha512-w5Zje97Gl0veNKpAhH4OQ3R7ACt0MYNUBfb37o1/Yq7EeeB7HsVFsvXNhZwBn8DIBvJamxZWSIbqjw53GKjUzQ==",
|
||||
"requires": {
|
||||
"tslib": "^1.11.1",
|
||||
"typed-error": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"balena-pine": {
|
||||
"version": "11.2.1",
|
||||
"resolved": "https://registry.npmjs.org/balena-pine/-/balena-pine-11.2.1.tgz",
|
||||
"integrity": "sha512-K8g9HQ9opaT2ZiSCxkvW8VVCsXzOZ0gBejLOs+BgsA5ECVNLu5uS0H9Qfpf1R2Yg2CB3sopBqes2nMIhq7qGJQ==",
|
||||
"requires": {
|
||||
"@balena/es-version": "^1.0.0",
|
||||
"@types/bluebird": "^3.5.32",
|
||||
"balena-errors": "^4.2.1",
|
||||
"bluebird": "^3.7.2",
|
||||
"pinejs-client-core": "^5.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bluebird": {
|
||||
"version": "3.5.32",
|
||||
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.32.tgz",
|
||||
"integrity": "sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"balena-semver": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-semver/-/balena-semver-2.3.0.tgz",
|
||||
"integrity": "sha512-dlUBaYz22ZxHh3umciI/87aLcwX+HRlT1RjkpuiClO8wjkuR8U/2ZvtS16iMNe30rm2kNgAV2myamQ5eA8SxVQ==",
|
||||
"requires": {
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/semver": "^7.1.0",
|
||||
"lodash": "^4.17.15",
|
||||
"semver": "^7.1.3"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2411,9 +2558,9 @@
|
||||
}
|
||||
},
|
||||
"balena-settings-storage": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-settings-storage/-/balena-settings-storage-5.0.0.tgz",
|
||||
"integrity": "sha512-alDQKM//J4wvjQXuv99ma3NsamZvHnwkxChwWpbBl9JMVr2kQHZpnsaw193wp7fdFKfNh3UFDdp1RYezDysXMA==",
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balena-settings-storage/-/balena-settings-storage-5.0.2.tgz",
|
||||
"integrity": "sha512-379S8kNo1NYZvTE5+iRHQ0Q4+uSXIqsE+83gxF+onBjX6ecyF7b7Z+ZVvRbmIeo5rn6xGO2P5iW72ehL5tXgaw==",
|
||||
"requires": {
|
||||
"@resin.io/types-node-localstorage": "^1.3.0",
|
||||
"@types/bluebird": "^3.5.8",
|
||||
@ -2423,9 +2570,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "8.10.60",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
"version": "8.10.61",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.61.tgz",
|
||||
"integrity": "sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2460,6 +2607,33 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz",
|
||||
"integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg=="
|
||||
},
|
||||
"balena-sdk": {
|
||||
"version": "12.33.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-12.33.0.tgz",
|
||||
"integrity": "sha512-riqcJeA8SYMf20bgt1lhgw/eWiWXVwivGHgBer54/dxDIo48RIwys98LvkisIO2sTco1AmTL4Q0rePsMGjEYwQ==",
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.30",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/node": "^8.10.59",
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"balena-auth": "^3.0.1",
|
||||
"balena-device-status": "^3.2.1",
|
||||
"balena-errors": "^4.3.0",
|
||||
"balena-hup-action-utils": "~4.0.0",
|
||||
"balena-pine": "^10.1.1",
|
||||
"balena-register-device": "^6.0.1",
|
||||
"balena-request": "^10.0.8",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-settings-client": "^4.0.4",
|
||||
"bluebird": "^3.7.2",
|
||||
"lodash": "^4.17.15",
|
||||
"memoizee": "^0.4.14",
|
||||
"moment": "^2.24.0",
|
||||
"ndjson": "^1.5.0",
|
||||
"semver": "^7.1.3"
|
||||
}
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
@ -14153,9 +14327,12 @@
|
||||
}
|
||||
},
|
||||
"pinejs-client-core": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/pinejs-client-core/-/pinejs-client-core-5.7.0.tgz",
|
||||
"integrity": "sha512-89WcvoAXVP1ep0LcLa71du9OkVc0rJXcGNQgXiK9TdgLSBlUJSKFDGjnK8OKibkak0ydkjVghBRWEwlICcv7zw=="
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/pinejs-client-core/-/pinejs-client-core-5.8.0.tgz",
|
||||
"integrity": "sha512-O+tDtZMnj63WqMQd9LRJC6qJJn6fFHdpOt0Sm3W6MQWDUmFUu02VYR0p0PCegePC8XPp0TMR0TSejYRrg4NMtQ==",
|
||||
"requires": {
|
||||
"@balena/es-version": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"pinkie": {
|
||||
"version": "2.0.4",
|
||||
|
@ -34,6 +34,9 @@
|
||||
"build/auth/pages/*.ejs",
|
||||
"build/hooks",
|
||||
"node_modules/resin-discoverable-services/services/**/*",
|
||||
"node_modules/balena-sdk/node_modules/balena-pine/**/*",
|
||||
"node_modules/balena-pine/**/*",
|
||||
"node_modules/pinejs-client-core/**/*",
|
||||
"node_modules/opn/xdg-open",
|
||||
"node_modules/open/xdg-open",
|
||||
"node_modules/windosu/*.bat",
|
||||
@ -181,7 +184,7 @@
|
||||
"balena-image-manager": "^6.1.2",
|
||||
"balena-preload": "^8.4.0",
|
||||
"balena-release": "^2.1.0",
|
||||
"balena-sdk": "^12.33.0",
|
||||
"balena-sdk": "^13.6.0",
|
||||
"balena-semver": "^2.2.0",
|
||||
"balena-settings-client": "^4.0.5",
|
||||
"balena-sync": "^10.2.0",
|
||||
|
@ -172,6 +172,17 @@ export class BalenaAPIMock extends NockMock {
|
||||
});
|
||||
}
|
||||
|
||||
public expectGetDeviceStatus(opts: ScopeOpts = {}) {
|
||||
this.optGet(
|
||||
/^\/v\d+\/device\?.+&\$select=overall_status$/,
|
||||
opts,
|
||||
).replyWithFile(
|
||||
200,
|
||||
path.join(apiResponsePath, 'device-status.json'),
|
||||
jHeader,
|
||||
);
|
||||
}
|
||||
|
||||
public expectGetAppEnvVars(opts: ScopeOpts = {}) {
|
||||
this.optGet(/^\/v\d+\/application_environment_variable($|\?)/, opts).reply(
|
||||
200,
|
||||
|
@ -370,7 +370,9 @@ describe('balena build: project validation', function() {
|
||||
`found in source folder "${projectPath}"`,
|
||||
];
|
||||
|
||||
const { out, err } = await runCommand(`build ${projectPath} -a testApp`);
|
||||
const { out, err } = await runCommand(
|
||||
`build ${projectPath} -A amd64 -d nuc`,
|
||||
);
|
||||
expect(
|
||||
cleanOutput(err).map(line => line.replace(/\s{2,}/g, ' ')),
|
||||
).to.include.members(expectedErrorLines);
|
||||
|
@ -217,6 +217,17 @@ describe('balena deploy', function() {
|
||||
});
|
||||
|
||||
describe('balena deploy: project validation', function() {
|
||||
let api: BalenaAPIMock;
|
||||
this.beforeEach(() => {
|
||||
api = new BalenaAPIMock();
|
||||
api.expectGetWhoAmI({ optional: true, persist: true });
|
||||
});
|
||||
|
||||
this.afterEach(() => {
|
||||
// Check all expected api calls have been made and clean up.
|
||||
api.done();
|
||||
});
|
||||
|
||||
it('should raise ExpectedError if a Dockerfile cannot be found', async () => {
|
||||
const projectPath = path.join(
|
||||
projectsPath,
|
||||
|
@ -68,11 +68,13 @@ describe('balena device', function() {
|
||||
});
|
||||
|
||||
it('should list device details for provided uuid', async () => {
|
||||
api.expectGetWhoAmI({ optional: true });
|
||||
api.expectGetWhoAmI({ optional: true, persist: true });
|
||||
api.expectGetMixpanel({ optional: true });
|
||||
|
||||
api.expectGetDeviceStatus();
|
||||
api.scope
|
||||
.get(/^\/v5\/device/)
|
||||
.get(
|
||||
/^\/v5\/device\?.+&\$expand=belongs_to__application\(\$select=app_name\)/,
|
||||
)
|
||||
.replyWithFile(200, path.join(apiResponsePath, 'device.json'), {
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
@ -91,11 +93,13 @@ describe('balena device', function() {
|
||||
it('correctly handles devices with missing application', async () => {
|
||||
// Devices with missing applications will have application name set to `N/a`.
|
||||
// e.g. When user has a device associated with app that user is no longer a collaborator of.
|
||||
api.expectGetWhoAmI({ optional: true });
|
||||
api.expectGetWhoAmI({ optional: true, persist: true });
|
||||
api.expectGetMixpanel({ optional: true });
|
||||
|
||||
api.expectGetDeviceStatus();
|
||||
api.scope
|
||||
.get(/^\/v5\/device/)
|
||||
.get(
|
||||
/^\/v5\/device\?.+&\$expand=belongs_to__application\(\$select=app_name\)/,
|
||||
)
|
||||
.replyWithFile(
|
||||
200,
|
||||
path.join(apiResponsePath, 'device-missing-app.json'),
|
||||
|
8
tests/test-data/api-response/device-status.json
Normal file
8
tests/test-data/api-response/device-status.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"d": [
|
||||
{
|
||||
"overall_status": "offline",
|
||||
"__metadata": {}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user