From e8ac3ea960b1765470b496dbd714036d9b2ecd93 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Wed, 18 Dec 2024 19:22:50 +0200 Subject: [PATCH] Update balena-device-init to 8.0.0 Update balena-device-init from 7.0.1 to 8.0.0 Change-type: patch See: https://github.com/balena-io-modules/balena-device-init/pull/46 --- npm-shrinkwrap.json | 11 ++- package.json | 2 +- repo.yml | 2 + typings/balena-device-init/index.d.ts | 105 -------------------------- 4 files changed, 8 insertions(+), 112 deletions(-) delete mode 100644 typings/balena-device-init/index.d.ts diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 6db680aafc..41f05d7cda 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -17,7 +17,7 @@ "@oclif/core": "^4.1.0", "@sentry/node": "^6.16.1", "balena-config-json": "^4.2.0", - "balena-device-init": "^7.0.1", + "balena-device-init": "^8.0.0", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", "balena-preload": "^16.0.0", @@ -7037,13 +7037,12 @@ } }, "node_modules/balena-device-init": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/balena-device-init/-/balena-device-init-7.0.1.tgz", - "integrity": "sha512-C3p1VNmeMNtkTTgs5xFvBQFdeOMxVzv0EL53nhnUx4WsNXQYQitlTwTmaQ96pBjHnZ4q+w4w3/Ubebjhan8bnQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/balena-device-init/-/balena-device-init-8.0.0.tgz", + "integrity": "sha512-Kaitk9LA8oQsM1suwqYbVAeJrbmSRM4BbzsYJbczItulxRS6XadPWZeN3OLYEV5eUW2Es2SPdqQqkFvIBZriKg==", "dependencies": { "balena-image-fs": "^7.0.6", "balena-semver": "^2.2.0", - "bluebird": "^3.7.2", "lodash": "^4.17.15", "reconfix": "1.0.0-v0-1-0-fork-46760acff4d165f5238bfac5e464256ef1944476", "resin-device-operations": "^2.0.0", @@ -7051,7 +7050,7 @@ "string-to-stream": "^1.1.1" }, "engines": { - "node": ">=18" + "node": ">=20.6.0" } }, "node_modules/balena-device-init/node_modules/string-to-stream": { diff --git a/package.json b/package.json index 9463c04362..cfca352fae 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "@oclif/core": "^4.1.0", "@sentry/node": "^6.16.1", "balena-config-json": "^4.2.0", - "balena-device-init": "^7.0.1", + "balena-device-init": "^8.0.0", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", "balena-preload": "^16.0.0", diff --git a/repo.yml b/repo.yml index 790f5606e2..ed599b7b27 100644 --- a/repo.yml +++ b/repo.yml @@ -6,6 +6,8 @@ upstream: url: 'https://github.com/balena-io/balena-sdk' - repo: 'balena-config-json' url: 'https://github.com/balena-io-modules/balena-config-json' + - repo: 'balena-device-init' + url: 'https://github.com/balena-io-modules/balena-device-init' - repo: 'balena-image-manager' url: 'https://github.com/balena-io-modules/balena-image-manager' - repo: 'balena-preload' diff --git a/typings/balena-device-init/index.d.ts b/typings/balena-device-init/index.d.ts deleted file mode 100644 index fdf5fbf1a1..0000000000 --- a/typings/balena-device-init/index.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @license - * Copyright 2019 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-device-init' { - import type { DeviceTypeJson } from 'balena-sdk'; - - interface OperationState { - operation: - | CopyOperation - | ReplaceOperation - | RunScriptOperation - | BurnOperation; - percentage: number; - } - - interface Operation { - command: string; - } - - interface CopyOperation extends Operation { - command: 'copy'; - from: { path: string }; - to: { path: string }; - } - - interface ReplaceOperation extends Operation { - command: 'replace'; - copy: string; - replace: string; - file: { - path: string; - }; - } - - interface RunScriptOperation extends Operation { - command: 'run-script'; - script: string; - arguments?: string[]; - } - - interface BurnOperation extends Operation { - command: 'burn'; - image?: string; - } - - interface BurnProgress { - type: 'write' | 'check'; - percentage: number; - transferred: number; - length: number; - remaining: number; - eta: number; - runtime: number; - delta: number; - speed: number; - } - - interface InitializeEmitter { - on(event: 'stdout' | 'stderr', callback: (msg: string) => void): void; - on(event: 'state', callback: (state: OperationState) => void): void; - on(event: 'burn', callback: (state: BurnProgress) => void): void; - on(event: 'end', callback: () => void): void; - on(event: 'error', callback: (error: Error) => void): void; - } - - // As of writing this, these are Bluebird promises, but we are typing then - // as normal Promises so that we do not rely on Bluebird specific methods, - // so that the CLI will not require any change once the package drops Bluebird. - - export function configure( - image: string, - manifest: DeviceTypeJson.DeviceType, - config: object, - options?: object, - ): Promise; - - export function initialize( - image: string, - manifest: DeviceTypeJson.DeviceType, - config: object, - ): Promise; - - export function getImageOsVersion( - image: string, - manifest: DeviceTypeJson.DeviceType, - ): Promise; - - export function getImageManifest( - image: string, - ): Promise; -}