From 77cf4af1666dbdef0478c5d6f3aeb0df4b54b44b Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 23 May 2023 13:21:51 +0300 Subject: [PATCH 1/3] Update balena-sdk to 17.0.0 Update balena-sdk from 16.45.1 to 17.0.0 Change-type: patch --- lib/commands/config/generate.ts | 5 +- lib/commands/deploy.ts | 2 +- lib/commands/devices/index.ts | 13 +- lib/commands/fleet/create.ts | 14 +- lib/commands/note.ts | 2 +- lib/commands/push.ts | 2 +- lib/utils/config.ts | 12 +- lib/utils/helpers.ts | 5 +- lib/utils/patterns.ts | 27 --- lib/utils/pine.ts | 4 +- lib/utils/promote.ts | 2 +- npm-shrinkwrap.json | 337 +++++++++++++++++++++++++++++--- package.json | 2 +- 13 files changed, 338 insertions(+), 89 deletions(-) diff --git a/lib/commands/config/generate.ts b/lib/commands/config/generate.ts index cf8524c7..9f337a60 100644 --- a/lib/commands/config/generate.ts +++ b/lib/commands/config/generate.ts @@ -200,9 +200,8 @@ export default class ConfigGenerateCmd extends Command { } } - const deviceManifest = await balena.models.device.getManifestBySlug( - deviceType, - ); + const deviceManifest = + await balena.models.config.getDeviceTypeManifestBySlug(deviceType); const { validateSecureBootOptionAndWarn } = await import( '../../utils/config' diff --git a/lib/commands/deploy.ts b/lib/commands/deploy.ts index 86712c63..91efd6b9 100644 --- a/lib/commands/deploy.ts +++ b/lib/commands/deploy.ts @@ -235,7 +235,7 @@ ${dockerignoreHelp} releaseTagValues, ); if (options.note) { - await sdk.models.release.note(release.id, options.note); + await sdk.models.release.setNote(release.id, options.note); } } diff --git a/lib/commands/devices/index.ts b/lib/commands/devices/index.ts index 828287c0..db8f7d60 100644 --- a/lib/commands/devices/index.ts +++ b/lib/commands/devices/index.ts @@ -82,7 +82,11 @@ export default class DevicesCmd extends Command { const { flags: options } = this.parse(DevicesCmd); const balena = getBalenaSdk(); - const devicesOptions = { ...devicesSelectFields, ...expandForAppName }; + const devicesOptions = { + ...devicesSelectFields, + ...expandForAppName, + $orderby: { device_name: 'asc' }, + } satisfies PineOptions; let devices; @@ -94,9 +98,10 @@ export default class DevicesCmd extends Command { devicesOptions, )) as ExtendedDevice[]; } else { - devices = (await balena.models.device.getAll( - devicesOptions, - )) as ExtendedDevice[]; + devices = (await balena.pine.get({ + resource: 'device', + options: devicesOptions, + })) as ExtendedDevice[]; } devices = devices.map(function (device) { diff --git a/lib/commands/fleet/create.ts b/lib/commands/fleet/create.ts index 208216f1..0d58227c 100644 --- a/lib/commands/fleet/create.ts +++ b/lib/commands/fleet/create.ts @@ -16,7 +16,6 @@ */ import { flags } from '@oclif/command'; -import type { Application } from 'balena-sdk'; import Command from '../../command'; import { ExpectedError } from '../../errors'; @@ -101,13 +100,17 @@ export default class FleetCreateCmd extends Command { options.organization?.toLowerCase() || (await this.getOrganization()); // Create application - let application: Application; try { - application = await getBalenaSdk().models.application.create({ + const application = await getBalenaSdk().models.application.create({ name: params.name, deviceType, organization, }); + + // Output + console.log( + `Fleet created: slug "${application.slug}", device type "${deviceType}"`, + ); } catch (err) { if ((err.message || '').toLowerCase().includes('unique')) { // BalenaRequestError: Request error: "organization" and "app_name" must be unique. @@ -123,11 +126,6 @@ export default class FleetCreateCmd extends Command { throw err; } - - // Output - console.log( - `Fleet created: slug "${application.slug}", device type "${deviceType}"`, - ); } async getOrganization() { diff --git a/lib/commands/note.ts b/lib/commands/note.ts index fc396d24..14f914cf 100644 --- a/lib/commands/note.ts +++ b/lib/commands/note.ts @@ -88,6 +88,6 @@ export default class NoteCmd extends Command { const balena = getBalenaSdk(); - return balena.models.device.note(options.device!, params.note); + return balena.models.device.setNote(options.device, params.note); } } diff --git a/lib/commands/push.ts b/lib/commands/push.ts index f7f8a8d6..8bed647d 100644 --- a/lib/commands/push.ts +++ b/lib/commands/push.ts @@ -358,7 +358,7 @@ export default class PushCmd extends Command { releaseTagValues, ); if (options.note) { - await sdk.models.release.note(releaseId, options.note); + await sdk.models.release.setNote(releaseId, options.note); } } else if (releaseTagKeys.length > 0) { throw new Error(stripIndent` diff --git a/lib/utils/config.ts b/lib/utils/config.ts index a2a52d5d..06c64542 100644 --- a/lib/utils/config.ts +++ b/lib/utils/config.ts @@ -200,18 +200,10 @@ export async function validateSecureBootOptionAndWarn( throw new ExpectedError(`Error: No device type provided`); } const sdk = getBalenaSdk(); - const releasePineOpts = { + const [osRelease] = await sdk.models.os.getAllOsVersions(slug, { $select: 'contract', $filter: { raw_version: `${version.replace(/^v/, '')}` }, - } satisfies BalenaSdk.PineOptions; - // TODO: Remove the added type casting when the SDK returns the fully typed result - const [osRelease] = (await sdk.models.os.getAllOsVersions( - slug, - releasePineOpts, - )) as Array< - BalenaSdk.OsVersion & - BalenaSdk.PineTypedResult - >; + }); if (!osRelease) { throw new ExpectedError(`Error: No ${version} release for ${slug}`); } diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index f557cf43..ceada9ca 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -119,7 +119,10 @@ export async function getManifest( `The device type of the provided OS image ${manifest.slug}, does not match the expected device type ${deviceType}`, ); } - return manifest ?? (await sdk.models.device.getManifestBySlug(deviceType)); + return ( + manifest ?? + (await sdk.models.config.getDeviceTypeManifestBySlug(deviceType)) + ); } export const areDeviceTypesCompatible = async ( diff --git a/lib/utils/patterns.ts b/lib/utils/patterns.ts index 3b3e3bf2..c9cd326b 100644 --- a/lib/utils/patterns.ts +++ b/lib/utils/patterns.ts @@ -252,33 +252,6 @@ export async function awaitDeviceOsUpdate( return uuid; } -export function inferOrSelectDevice(preferredUuid: string) { - const balena = getBalenaSdk(); - return balena.models.device.getAll().then((devices) => { - const onlineDevices = devices.filter((device) => device.is_online); - if (_.isEmpty(onlineDevices)) { - throw new ExpectedError("You don't have any devices online"); - } - - const defaultUuid = _(onlineDevices).map('uuid').includes(preferredUuid) - ? preferredUuid - : onlineDevices[0].uuid; - - return getCliForm().ask({ - message: 'Select a device', - type: 'list', - default: defaultUuid, - choices: _.map(onlineDevices, (device) => ({ - name: `${device.device_name || 'Untitled'} (${device.uuid.slice( - 0, - 7, - )})`, - value: device.uuid, - })), - }); - }); -} - /* * Given fleetOrDevice, which may be * - a fleet name diff --git a/lib/utils/pine.ts b/lib/utils/pine.ts index 10fd718c..143da3e9 100644 --- a/lib/utils/pine.ts +++ b/lib/utils/pine.ts @@ -16,10 +16,10 @@ limitations under the License. import type { OptionalNavigationResource } from 'balena-sdk'; -export const getExpanded = (obj: OptionalNavigationResource) => +export const getExpanded = (obj: OptionalNavigationResource) => (Array.isArray(obj) && obj[0]) || undefined; -export const getExpandedProp = ( +export const getExpandedProp = ( obj: OptionalNavigationResource, key: K, ) => (Array.isArray(obj) && obj[0] && obj[0][key]) || undefined; diff --git a/lib/utils/promote.ts b/lib/utils/promote.ts index c0453db2..d7b4f4f4 100644 --- a/lib/utils/promote.ts +++ b/lib/utils/promote.ts @@ -427,7 +427,7 @@ async function generateApplicationConfig( ) { const { generateApplicationConfig: configGen } = await import('./config'); - const manifest = await sdk.models.device.getManifestBySlug( + const manifest = await sdk.models.config.getDeviceTypeManifestBySlug( app.is_for__device_type[0].slug, ); const opts = diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 9b0a3519..3ead1e32 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -24,7 +24,7 @@ "balena-image-fs": "^7.0.6", "balena-image-manager": "^8.0.0", "balena-preload": "^13.0.0", - "balena-sdk": "^16.44.2", + "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", "balena-settings-client": "^4.0.7", "balena-settings-storage": "^7.0.0", @@ -3952,15 +3952,16 @@ } }, "node_modules/balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-5.0.0.tgz", + "integrity": "sha512-Hw/eyvQGPwKGjWwNcuntbfoHMskzymvesW6PebSGtzAYd+TJuv6mRkmLS2qspnjACOR3KYyJElIipNCkeVczpQ==", "dependencies": { "balena-semver": "^2.0.0", - "tslib": "^2.0.0" + "tslib": "^2.0.0", + "typed-error": "^3.2.2" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/balena-image-fs": { @@ -3992,6 +3993,66 @@ "node": ">=12.0.0" } }, + "node_modules/balena-image-manager/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/balena-image-manager/node_modules/balena-hup-action-utils": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", + "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "dependencies": { + "balena-semver": "^2.0.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/balena-image-manager/node_modules/balena-sdk": { + "version": "16.45.1", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", + "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "dependencies": { + "@balena/es-version": "^1.0.0", + "@types/json-schema": "^7.0.9", + "@types/node": "^12.20.50", + "abortcontroller-polyfill": "^1.7.1", + "balena-auth": "^4.1.0", + "balena-errors": "^4.7.3", + "balena-hup-action-utils": "~4.1.0", + "balena-register-device": "^8.0.0", + "balena-request": "^11.5.5", + "balena-semver": "^2.3.0", + "balena-settings-client": "^4.0.6", + "date-fns": "^2.29.3", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", + "memoizee": "^0.4.15", + "ndjson": "^2.0.0", + "pinejs-client-core": "^6.12.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/balena-image-manager/node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/balena-preload": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-13.0.0.tgz", @@ -4018,6 +4079,11 @@ "node": ">=12" } }, + "node_modules/balena-preload/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, "node_modules/balena-preload/node_modules/archiver": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz", @@ -4035,6 +4101,46 @@ "node": ">= 6" } }, + "node_modules/balena-preload/node_modules/balena-hup-action-utils": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", + "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "dependencies": { + "balena-semver": "^2.0.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/balena-preload/node_modules/balena-sdk": { + "version": "16.45.1", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", + "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "dependencies": { + "@balena/es-version": "^1.0.0", + "@types/json-schema": "^7.0.9", + "@types/node": "^12.20.50", + "abortcontroller-polyfill": "^1.7.1", + "balena-auth": "^4.1.0", + "balena-errors": "^4.7.3", + "balena-hup-action-utils": "~4.1.0", + "balena-register-device": "^8.0.0", + "balena-request": "^11.5.5", + "balena-semver": "^2.3.0", + "balena-settings-client": "^4.0.6", + "date-fns": "^2.29.3", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", + "memoizee": "^0.4.15", + "ndjson": "^2.0.0", + "pinejs-client-core": "^6.12.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=12.0" + } + }, "node_modules/balena-preload/node_modules/compress-commons": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz", @@ -4075,6 +4181,21 @@ "node": ">= 6.9.0" } }, + "node_modules/balena-preload/node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/balena-preload/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -4148,21 +4269,21 @@ } }, "node_modules/balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-17.0.0.tgz", + "integrity": "sha512-CivFA2dGjV232nhPyc/1aA19EXLbZ5BAJ3EQ0TsA3xNx7M7fZr76Q9s47BDfAFgEO921dFxBZx30xqY1ifFI6g==", "dependencies": { "@balena/es-version": "^1.0.0", "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", + "@types/node": "^14.0.0", "abortcontroller-polyfill": "^1.7.1", "balena-auth": "^4.1.0", "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", + "balena-hup-action-utils": "~5.0.0", "balena-register-device": "^8.0.0", "balena-request": "^11.5.5", "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", + "balena-settings-client": "^5.0.0", "date-fns": "^2.29.3", "handlebars": "^4.7.7", "lodash": "^4.17.21", @@ -4172,13 +4293,33 @@ "tslib": "^2.1.0" }, "engines": { - "node": ">=12.0" + "node": ">=14.0" } }, + "node_modules/balena-sdk/node_modules/@types/js-yaml": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.11.1.tgz", + "integrity": "sha512-M5qhhfuTt4fwHGqqANNQilp3Htb5cHwBxlMHDUw/TYRVkEp3s3IIFSH3Fe9HIAeEtnO4p3SSowLmCVavdRYfpw==" + }, "node_modules/balena-sdk/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + "version": "14.18.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.47.tgz", + "integrity": "sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw==" + }, + "node_modules/balena-sdk/node_modules/balena-settings-client": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", + "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", + "dependencies": { + "@resin.io/types-hidepath": "1.0.1", + "@resin.io/types-home-or-tmp": "3.0.0", + "@types/js-yaml": "3.11.1", + "@types/lodash": "^4.14.150", + "hidepath": "^1.0.0", + "home-or-tmp": "^2.0.0", + "js-yaml": "^3.4.0", + "lodash": "^4.17.15" + } }, "node_modules/balena-sdk/node_modules/date-fns": { "version": "2.30.0", @@ -4195,6 +4336,18 @@ "url": "https://opencollective.com/date-fns" } }, + "node_modules/balena-sdk/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/balena-semver": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/balena-semver/-/balena-semver-2.3.0.tgz", @@ -25657,12 +25810,13 @@ } }, "balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-5.0.0.tgz", + "integrity": "sha512-Hw/eyvQGPwKGjWwNcuntbfoHMskzymvesW6PebSGtzAYd+TJuv6mRkmLS2qspnjACOR3KYyJElIipNCkeVczpQ==", "requires": { "balena-semver": "^2.0.0", - "tslib": "^2.0.0" + "tslib": "^2.0.0", + "typed-error": "^3.2.2" } }, "balena-image-fs": { @@ -25686,6 +25840,55 @@ "mime": "^2.4.6", "mkdirp": "^1.0.4", "rimraf": "^3.0.2" + }, + "dependencies": { + "@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "balena-hup-action-utils": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", + "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "requires": { + "balena-semver": "^2.0.0", + "tslib": "^2.0.0" + } + }, + "balena-sdk": { + "version": "16.45.1", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", + "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "requires": { + "@balena/es-version": "^1.0.0", + "@types/json-schema": "^7.0.9", + "@types/node": "^12.20.50", + "abortcontroller-polyfill": "^1.7.1", + "balena-auth": "^4.1.0", + "balena-errors": "^4.7.3", + "balena-hup-action-utils": "~4.1.0", + "balena-register-device": "^8.0.0", + "balena-request": "^11.5.5", + "balena-semver": "^2.3.0", + "balena-settings-client": "^4.0.6", + "date-fns": "^2.29.3", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", + "memoizee": "^0.4.15", + "ndjson": "^2.0.0", + "pinejs-client-core": "^6.12.0", + "tslib": "^2.1.0" + } + }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "requires": { + "@babel/runtime": "^7.21.0" + } + } } }, "balena-preload": { @@ -25711,6 +25914,11 @@ "unzipper": "^0.8.14" }, "dependencies": { + "@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, "archiver": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz", @@ -25725,6 +25933,40 @@ "zip-stream": "^2.1.2" } }, + "balena-hup-action-utils": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", + "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", + "requires": { + "balena-semver": "^2.0.0", + "tslib": "^2.0.0" + } + }, + "balena-sdk": { + "version": "16.45.1", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", + "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "requires": { + "@balena/es-version": "^1.0.0", + "@types/json-schema": "^7.0.9", + "@types/node": "^12.20.50", + "abortcontroller-polyfill": "^1.7.1", + "balena-auth": "^4.1.0", + "balena-errors": "^4.7.3", + "balena-hup-action-utils": "~4.1.0", + "balena-register-device": "^8.0.0", + "balena-request": "^11.5.5", + "balena-semver": "^2.3.0", + "balena-settings-client": "^4.0.6", + "date-fns": "^2.29.3", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", + "memoizee": "^0.4.15", + "ndjson": "^2.0.0", + "pinejs-client-core": "^6.12.0", + "tslib": "^2.1.0" + } + }, "compress-commons": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz", @@ -25761,6 +26003,14 @@ "readable-stream": "^3.4.0" } }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -25816,21 +26066,21 @@ } }, "balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-17.0.0.tgz", + "integrity": "sha512-CivFA2dGjV232nhPyc/1aA19EXLbZ5BAJ3EQ0TsA3xNx7M7fZr76Q9s47BDfAFgEO921dFxBZx30xqY1ifFI6g==", "requires": { "@balena/es-version": "^1.0.0", "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", + "@types/node": "^14.0.0", "abortcontroller-polyfill": "^1.7.1", "balena-auth": "^4.1.0", "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", + "balena-hup-action-utils": "~5.0.0", "balena-register-device": "^8.0.0", "balena-request": "^11.5.5", "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", + "balena-settings-client": "^5.0.0", "date-fns": "^2.29.3", "handlebars": "^4.7.7", "lodash": "^4.17.21", @@ -25840,10 +26090,30 @@ "tslib": "^2.1.0" }, "dependencies": { + "@types/js-yaml": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.11.1.tgz", + "integrity": "sha512-M5qhhfuTt4fwHGqqANNQilp3Htb5cHwBxlMHDUw/TYRVkEp3s3IIFSH3Fe9HIAeEtnO4p3SSowLmCVavdRYfpw==" + }, "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + "version": "14.18.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.47.tgz", + "integrity": "sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw==" + }, + "balena-settings-client": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", + "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", + "requires": { + "@resin.io/types-hidepath": "1.0.1", + "@resin.io/types-home-or-tmp": "3.0.0", + "@types/js-yaml": "3.11.1", + "@types/lodash": "^4.14.150", + "hidepath": "^1.0.0", + "home-or-tmp": "^2.0.0", + "js-yaml": "^3.4.0", + "lodash": "^4.17.15" + } }, "date-fns": { "version": "2.30.0", @@ -25852,6 +26122,15 @@ "requires": { "@babel/runtime": "^7.21.0" } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } } } }, diff --git a/package.json b/package.json index ccd54b5a..70d54c4a 100644 --- a/package.json +++ b/package.json @@ -207,7 +207,7 @@ "balena-image-fs": "^7.0.6", "balena-image-manager": "^8.0.0", "balena-preload": "^13.0.0", - "balena-sdk": "^16.44.2", + "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", "balena-settings-client": "^4.0.7", "balena-settings-storage": "^7.0.0", From e371b1e7598605e9493399ee328cb8b061de56cb Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 23 May 2023 10:28:18 +0300 Subject: [PATCH 2/3] Update balena-preload & balena-image-manager Update balena-image-manager from 8.0.1 to 9.0.0 Update balena-preload from 13.0.0 to 14.0.0 Change-type: patch --- lib/commands/preload.ts | 4 +- npm-shrinkwrap.json | 256 ++---------------------- package.json | 4 +- typings/balena-image-manager/index.d.ts | 27 --- typings/balena-preload/index.d.ts | 19 -- 5 files changed, 24 insertions(+), 286 deletions(-) delete mode 100644 typings/balena-image-manager/index.d.ts delete mode 100644 typings/balena-preload/index.d.ts diff --git a/lib/commands/preload.ts b/lib/commands/preload.ts index a50d4d82..ceda876e 100644 --- a/lib/commands/preload.ts +++ b/lib/commands/preload.ts @@ -242,7 +242,7 @@ Can be repeated to add multiple certificates.\ const dockerUtils = await import('../utils/docker'); const docker = await dockerUtils.getDocker(options); const preloader = new balenaPreload.Preloader( - null, + undefined, docker, fleetSlug, commit, @@ -512,7 +512,7 @@ Would you like to disable automatic updates for this fleet now?\ const application = options.slug ? await this.getAppWithReleases(balenaSdk, options.slug) - : await this.selectApplication(preloader.config.deviceType); + : await this.selectApplication(preloader.config!.deviceType); let commit: string; // commit hash or the strings 'latest' or 'current' diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 3ead1e32..f84c34b6 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -22,8 +22,8 @@ "balena-device-init": "^6.0.0", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", - "balena-image-manager": "^8.0.0", - "balena-preload": "^13.0.0", + "balena-image-manager": "^9.0.0", + "balena-preload": "^14.0.0", "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", "balena-settings-client": "^4.0.7", @@ -3980,86 +3980,26 @@ } }, "node_modules/balena-image-manager": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/balena-image-manager/-/balena-image-manager-8.0.1.tgz", - "integrity": "sha512-ShvuspPRO36J+ACQ6bE8t+RC7WstWnPvk6B5c9oTV2qzzegIZAMWvdqBG3tpCng+tBBeYjQ0IdwTDG/THQjVaA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/balena-image-manager/-/balena-image-manager-9.0.0.tgz", + "integrity": "sha512-DOtcpqnLhRcEETqFPlfM6XDmsgexr0ykahtrYki9DU0JNuK5OJlhgkE2/HgVOFWHWnslmcqnCTmGHkh7mJd1Dw==", "dependencies": { - "balena-sdk": "^16.8.0", + "balena-sdk": "^17.0.0", "mime": "^2.4.6", "mkdirp": "^1.0.4", "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/balena-image-manager/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, - "node_modules/balena-image-manager/node_modules/balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", - "dependencies": { - "balena-semver": "^2.0.0", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/balena-image-manager/node_modules/balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", - "dependencies": { - "@balena/es-version": "^1.0.0", - "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", - "abortcontroller-polyfill": "^1.7.1", - "balena-auth": "^4.1.0", - "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", - "balena-register-device": "^8.0.0", - "balena-request": "^11.5.5", - "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", - "date-fns": "^2.29.3", - "handlebars": "^4.7.7", - "lodash": "^4.17.21", - "memoizee": "^0.4.15", - "ndjson": "^2.0.0", - "pinejs-client-core": "^6.12.0", - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=12.0" - } - }, - "node_modules/balena-image-manager/node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "node": ">=16.0.0" } }, "node_modules/balena-preload": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-13.0.0.tgz", - "integrity": "sha512-UUmRAYtZ3IN1iq49qPQvuBHD3qh15M2N7aGcQ9SJfa+Nt84JbTY0EUn+CWRqZrsuGBrkFxHJlPeBNhyc+Wt9HA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-14.0.0.tgz", + "integrity": "sha512-LWA/WgckfWxI2VFrefatUlMsYuM+zVbUqoDhPx95VQh4ArJXxbo8s9ADgl/yQGt0e4qUciMu8fuzxaZXZvwS2A==", "dependencies": { "archiver": "^3.1.1", - "balena-sdk": "^16.0.0", + "balena-sdk": "^17.0.0", "bluebird": "^3.7.2", "compare-versions": "^3.6.0", "docker-progress": "^5.0.0", @@ -4076,14 +4016,9 @@ "unzipper": "^0.8.14" }, "engines": { - "node": ">=12" + "node": ">=16" } }, - "node_modules/balena-preload/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, "node_modules/balena-preload/node_modules/archiver": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz", @@ -4101,46 +4036,6 @@ "node": ">= 6" } }, - "node_modules/balena-preload/node_modules/balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", - "dependencies": { - "balena-semver": "^2.0.0", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/balena-preload/node_modules/balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", - "dependencies": { - "@balena/es-version": "^1.0.0", - "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", - "abortcontroller-polyfill": "^1.7.1", - "balena-auth": "^4.1.0", - "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", - "balena-register-device": "^8.0.0", - "balena-request": "^11.5.5", - "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", - "date-fns": "^2.29.3", - "handlebars": "^4.7.7", - "lodash": "^4.17.21", - "memoizee": "^0.4.15", - "ndjson": "^2.0.0", - "pinejs-client-core": "^6.12.0", - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=12.0" - } - }, "node_modules/balena-preload/node_modules/compress-commons": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz", @@ -4181,21 +4076,6 @@ "node": ">= 6.9.0" } }, - "node_modules/balena-preload/node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/balena-preload/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -25832,72 +25712,23 @@ } }, "balena-image-manager": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/balena-image-manager/-/balena-image-manager-8.0.1.tgz", - "integrity": "sha512-ShvuspPRO36J+ACQ6bE8t+RC7WstWnPvk6B5c9oTV2qzzegIZAMWvdqBG3tpCng+tBBeYjQ0IdwTDG/THQjVaA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/balena-image-manager/-/balena-image-manager-9.0.0.tgz", + "integrity": "sha512-DOtcpqnLhRcEETqFPlfM6XDmsgexr0ykahtrYki9DU0JNuK5OJlhgkE2/HgVOFWHWnslmcqnCTmGHkh7mJd1Dw==", "requires": { - "balena-sdk": "^16.8.0", + "balena-sdk": "^17.0.0", "mime": "^2.4.6", "mkdirp": "^1.0.4", "rimraf": "^3.0.2" - }, - "dependencies": { - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, - "balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", - "requires": { - "balena-semver": "^2.0.0", - "tslib": "^2.0.0" - } - }, - "balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", - "requires": { - "@balena/es-version": "^1.0.0", - "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", - "abortcontroller-polyfill": "^1.7.1", - "balena-auth": "^4.1.0", - "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", - "balena-register-device": "^8.0.0", - "balena-request": "^11.5.5", - "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", - "date-fns": "^2.29.3", - "handlebars": "^4.7.7", - "lodash": "^4.17.21", - "memoizee": "^0.4.15", - "ndjson": "^2.0.0", - "pinejs-client-core": "^6.12.0", - "tslib": "^2.1.0" - } - }, - "date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "requires": { - "@babel/runtime": "^7.21.0" - } - } } }, "balena-preload": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-13.0.0.tgz", - "integrity": "sha512-UUmRAYtZ3IN1iq49qPQvuBHD3qh15M2N7aGcQ9SJfa+Nt84JbTY0EUn+CWRqZrsuGBrkFxHJlPeBNhyc+Wt9HA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-14.0.0.tgz", + "integrity": "sha512-LWA/WgckfWxI2VFrefatUlMsYuM+zVbUqoDhPx95VQh4ArJXxbo8s9ADgl/yQGt0e4qUciMu8fuzxaZXZvwS2A==", "requires": { "archiver": "^3.1.1", - "balena-sdk": "^16.0.0", + "balena-sdk": "^17.0.0", "bluebird": "^3.7.2", "compare-versions": "^3.6.0", "docker-progress": "^5.0.0", @@ -25914,11 +25745,6 @@ "unzipper": "^0.8.14" }, "dependencies": { - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, "archiver": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz", @@ -25933,40 +25759,6 @@ "zip-stream": "^2.1.2" } }, - "balena-hup-action-utils": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/balena-hup-action-utils/-/balena-hup-action-utils-4.1.3.tgz", - "integrity": "sha512-98SK5oTPgTKWsbEmPk0juI/ivT5qADsj/y+/B39I47lbDfPuhF/kHpgMI+xQCtT/GS+Dy3omkgY4nEcRI4CeoQ==", - "requires": { - "balena-semver": "^2.0.0", - "tslib": "^2.0.0" - } - }, - "balena-sdk": { - "version": "16.45.1", - "resolved": "https://registry.npmjs.org/balena-sdk/-/balena-sdk-16.45.1.tgz", - "integrity": "sha512-pY3anTkmEcOp8GEgjkeJl8aj7SZBWifh4DSp8sUnryE0U7IGA3UcKggsfMjYsP1ZKvPlAvweNHQuUujfBOHbXg==", - "requires": { - "@balena/es-version": "^1.0.0", - "@types/json-schema": "^7.0.9", - "@types/node": "^12.20.50", - "abortcontroller-polyfill": "^1.7.1", - "balena-auth": "^4.1.0", - "balena-errors": "^4.7.3", - "balena-hup-action-utils": "~4.1.0", - "balena-register-device": "^8.0.0", - "balena-request": "^11.5.5", - "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.6", - "date-fns": "^2.29.3", - "handlebars": "^4.7.7", - "lodash": "^4.17.21", - "memoizee": "^0.4.15", - "ndjson": "^2.0.0", - "pinejs-client-core": "^6.12.0", - "tslib": "^2.1.0" - } - }, "compress-commons": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz", @@ -26003,14 +25795,6 @@ "readable-stream": "^3.4.0" } }, - "date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "requires": { - "@babel/runtime": "^7.21.0" - } - }, "readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", diff --git a/package.json b/package.json index 70d54c4a..f02053a4 100644 --- a/package.json +++ b/package.json @@ -205,8 +205,8 @@ "balena-device-init": "^6.0.0", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", - "balena-image-manager": "^8.0.0", - "balena-preload": "^13.0.0", + "balena-image-manager": "^9.0.0", + "balena-preload": "^14.0.0", "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", "balena-settings-client": "^4.0.7", diff --git a/typings/balena-image-manager/index.d.ts b/typings/balena-image-manager/index.d.ts deleted file mode 100644 index 75297d3f..00000000 --- a/typings/balena-image-manager/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @license - * Copyright 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. - */ - -declare module 'balena-image-manager' { - export function cleanCache(): Promise; - - export function get( - deviceType: string, - versionOrRange: string, - ): Promise; - - export function isESR(version: string): boolean; -} diff --git a/typings/balena-preload/index.d.ts b/typings/balena-preload/index.d.ts deleted file mode 100644 index 144136fa..00000000 --- a/typings/balena-preload/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -declare module 'balena-preload' { - export class Preloader { - constructor(...args: any[]); - - cleanup(): Promise; - - on(...args: any[]): void; - - preload(): Promise; - - prepare(): Promise; - - setAppIdAndCommit(appId: string | number, commit: string): Promise; - - config: any; - - stderr: any; - } -} From d9651c7393a928ea8069b2070071b4bdb55637e1 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 23 May 2023 13:08:42 +0300 Subject: [PATCH 3/3] Update balena-settings-client to 5.0.2 Change-type: patch --- npm-shrinkwrap.json | 155 ++++++++++++++------------------------------ package.json | 2 +- 2 files changed, 48 insertions(+), 109 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index f84c34b6..402763ce 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -26,7 +26,7 @@ "balena-preload": "^14.0.0", "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.7", + "balena-settings-client": "^5.0.2", "balena-settings-storage": "^7.0.0", "bluebird": "^3.7.2", "body-parser": "^1.19.1", @@ -1104,9 +1104,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz", - "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.9.tgz", + "integrity": "sha512-F3fZga2uv09wFdEjEQIJxXALXfz0+JaOb7SabvVMmjHxeVTuGW8wgE8Vp1Hd7O+zMTYtcfEISGRzPkeiaPPsvg==", "dev": true, "dependencies": { "@babel/types": "^7.21.5", @@ -1297,9 +1297,9 @@ } }, "node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.9.tgz", + "integrity": "sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1344,9 +1344,9 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.9.tgz", + "integrity": "sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1790,14 +1790,14 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@oclif/command": { - "version": "1.8.25", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.25.tgz", - "integrity": "sha512-teCfKH6GNF46fiCn/P5EMHX93RE3KJAW4i0sq3X9phrzs6807WRauhythdc8OKINxd+LpqwQ1i5bnaCKvLZRcQ==", + "version": "1.8.26", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.26.tgz", + "integrity": "sha512-IT9kOLFRMc3s6KJ1FymsNjbHShI211eVgAg+JMiDVl8LXwOJxYe8ybesgL1kpV9IUFByOBwZKNG2mmrVeNBHPg==", "dependencies": { "@oclif/config": "^1.18.2", "@oclif/errors": "^1.3.6", "@oclif/help": "^1.0.1", - "@oclif/parser": "^3.8.10", + "@oclif/parser": "^3.8.11", "debug": "^4.1.1", "semver": "^7.5.1" }, @@ -2014,14 +2014,14 @@ "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" }, "node_modules/@oclif/parser": { - "version": "3.8.10", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.10.tgz", - "integrity": "sha512-J4l/NcnfbIU84+NNdy6bxq9yJt4joFWNvpk59hq+uaQPUNtjmNJDVGuRvf6GUOxHNgRsVK1JRmd/Ez+v7Z9GqQ==", + "version": "3.8.11", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.11.tgz", + "integrity": "sha512-B3NweRn1yZw2g7xaF10Zh/zwlqTJJINfU+CRkqll+LaTisSNvZbW0RR9WGan26EqqLp4qzNjzX/e90Ew8l9NLw==", "dependencies": { "@oclif/errors": "^1.3.6", "@oclif/linewrap": "^1.0.0", "chalk": "^4.1.0", - "tslib": "^2.5.0" + "tslib": "^2.5.2" }, "engines": { "node": ">=8.0.0" @@ -3048,9 +3048,9 @@ } }, "node_modules/@types/node": { - "version": "16.18.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.31.tgz", - "integrity": "sha512-KPXltf4z4g517OlVJO9XQ2357CYw7fvuJ3ZuBynjXC5Jos9i+K7LvFb7bUIwtJXSZj0vTp9Q6NJBSQpkwwO8Zw==" + "version": "16.18.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.32.tgz", + "integrity": "sha512-zpnXe4dEz6PrWz9u7dqyRoq9VxwCvoXRPy/ewhmMa1CgEyVmtL1NJPQ2MX+4pf97vetquVKkpiMx0MwI8pjNOw==" }, "node_modules/@types/node-cleanup": { "version": "2.1.2", @@ -4176,31 +4176,11 @@ "node": ">=14.0" } }, - "node_modules/balena-sdk/node_modules/@types/js-yaml": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.11.1.tgz", - "integrity": "sha512-M5qhhfuTt4fwHGqqANNQilp3Htb5cHwBxlMHDUw/TYRVkEp3s3IIFSH3Fe9HIAeEtnO4p3SSowLmCVavdRYfpw==" - }, "node_modules/balena-sdk/node_modules/@types/node": { "version": "14.18.47", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.47.tgz", "integrity": "sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw==" }, - "node_modules/balena-sdk/node_modules/balena-settings-client": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", - "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", - "dependencies": { - "@resin.io/types-hidepath": "1.0.1", - "@resin.io/types-home-or-tmp": "3.0.0", - "@types/js-yaml": "3.11.1", - "@types/lodash": "^4.14.150", - "hidepath": "^1.0.0", - "home-or-tmp": "^2.0.0", - "js-yaml": "^3.4.0", - "lodash": "^4.17.15" - } - }, "node_modules/balena-sdk/node_modules/date-fns": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", @@ -4216,18 +4196,6 @@ "url": "https://opencollective.com/date-fns" } }, - "node_modules/balena-sdk/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/balena-semver": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/balena-semver/-/balena-semver-2.3.0.tgz", @@ -4240,9 +4208,9 @@ } }, "node_modules/balena-settings-client": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-4.0.7.tgz", - "integrity": "sha512-1ncEgufbAbzcfcffsTpi20asNdsOEZxACiQhv8naQp1mgw6INe/0FvSNX6St+XlXtuk1FqCnYNINGIjMoStOrA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", + "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", "dependencies": { "@resin.io/types-hidepath": "1.0.1", "@resin.io/types-home-or-tmp": "3.0.0", @@ -23263,9 +23231,9 @@ } }, "@babel/generator": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz", - "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.9.tgz", + "integrity": "sha512-F3fZga2uv09wFdEjEQIJxXALXfz0+JaOb7SabvVMmjHxeVTuGW8wgE8Vp1Hd7O+zMTYtcfEISGRzPkeiaPPsvg==", "dev": true, "requires": { "@babel/types": "^7.21.5", @@ -23414,9 +23382,9 @@ }, "dependencies": { "@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.9.tgz", + "integrity": "sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==", "dev": true }, "@babel/types": { @@ -23451,9 +23419,9 @@ }, "dependencies": { "@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.9.tgz", + "integrity": "sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==", "dev": true }, "@babel/types": { @@ -23824,14 +23792,14 @@ } }, "@oclif/command": { - "version": "1.8.25", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.25.tgz", - "integrity": "sha512-teCfKH6GNF46fiCn/P5EMHX93RE3KJAW4i0sq3X9phrzs6807WRauhythdc8OKINxd+LpqwQ1i5bnaCKvLZRcQ==", + "version": "1.8.26", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.26.tgz", + "integrity": "sha512-IT9kOLFRMc3s6KJ1FymsNjbHShI211eVgAg+JMiDVl8LXwOJxYe8ybesgL1kpV9IUFByOBwZKNG2mmrVeNBHPg==", "requires": { "@oclif/config": "^1.18.2", "@oclif/errors": "^1.3.6", "@oclif/help": "^1.0.1", - "@oclif/parser": "^3.8.10", + "@oclif/parser": "^3.8.11", "debug": "^4.1.1", "semver": "^7.5.1" } @@ -24000,14 +23968,14 @@ "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" }, "@oclif/parser": { - "version": "3.8.10", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.10.tgz", - "integrity": "sha512-J4l/NcnfbIU84+NNdy6bxq9yJt4joFWNvpk59hq+uaQPUNtjmNJDVGuRvf6GUOxHNgRsVK1JRmd/Ez+v7Z9GqQ==", + "version": "3.8.11", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.11.tgz", + "integrity": "sha512-B3NweRn1yZw2g7xaF10Zh/zwlqTJJINfU+CRkqll+LaTisSNvZbW0RR9WGan26EqqLp4qzNjzX/e90Ew8l9NLw==", "requires": { "@oclif/errors": "^1.3.6", "@oclif/linewrap": "^1.0.0", "chalk": "^4.1.0", - "tslib": "^2.5.0" + "tslib": "^2.5.2" }, "dependencies": { "chalk": { @@ -24925,9 +24893,9 @@ } }, "@types/node": { - "version": "16.18.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.31.tgz", - "integrity": "sha512-KPXltf4z4g517OlVJO9XQ2357CYw7fvuJ3ZuBynjXC5Jos9i+K7LvFb7bUIwtJXSZj0vTp9Q6NJBSQpkwwO8Zw==" + "version": "16.18.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.32.tgz", + "integrity": "sha512-zpnXe4dEz6PrWz9u7dqyRoq9VxwCvoXRPy/ewhmMa1CgEyVmtL1NJPQ2MX+4pf97vetquVKkpiMx0MwI8pjNOw==" }, "@types/node-cleanup": { "version": "2.1.2", @@ -25874,31 +25842,11 @@ "tslib": "^2.1.0" }, "dependencies": { - "@types/js-yaml": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.11.1.tgz", - "integrity": "sha512-M5qhhfuTt4fwHGqqANNQilp3Htb5cHwBxlMHDUw/TYRVkEp3s3IIFSH3Fe9HIAeEtnO4p3SSowLmCVavdRYfpw==" - }, "@types/node": { "version": "14.18.47", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.47.tgz", "integrity": "sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw==" }, - "balena-settings-client": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", - "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", - "requires": { - "@resin.io/types-hidepath": "1.0.1", - "@resin.io/types-home-or-tmp": "3.0.0", - "@types/js-yaml": "3.11.1", - "@types/lodash": "^4.14.150", - "hidepath": "^1.0.0", - "home-or-tmp": "^2.0.0", - "js-yaml": "^3.4.0", - "lodash": "^4.17.15" - } - }, "date-fns": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", @@ -25906,15 +25854,6 @@ "requires": { "@babel/runtime": "^7.21.0" } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } } } }, @@ -25930,9 +25869,9 @@ } }, "balena-settings-client": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-4.0.7.tgz", - "integrity": "sha512-1ncEgufbAbzcfcffsTpi20asNdsOEZxACiQhv8naQp1mgw6INe/0FvSNX6St+XlXtuk1FqCnYNINGIjMoStOrA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/balena-settings-client/-/balena-settings-client-5.0.2.tgz", + "integrity": "sha512-i3YKQeKJ3E4yAkB1emxMyp0hM7nSJxy5m1P2btRu5U3D6M2s3AdahB23dfdchDtx/riT9vTrcG4vZa2aKV2+kw==", "requires": { "@resin.io/types-hidepath": "1.0.1", "@resin.io/types-home-or-tmp": "3.0.0", diff --git a/package.json b/package.json index f02053a4..f74809fe 100644 --- a/package.json +++ b/package.json @@ -209,7 +209,7 @@ "balena-preload": "^14.0.0", "balena-sdk": "^17.0.0", "balena-semver": "^2.3.0", - "balena-settings-client": "^4.0.7", + "balena-settings-client": "^5.0.2", "balena-settings-storage": "^7.0.0", "bluebird": "^3.7.2", "body-parser": "^1.19.1",