mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-13 06:02:57 +00:00
Update balena-config-json to rely on the balena-image-fs helpers
Update balena-config-json from 4.2.2 to 4.2.7 Update balena-image-fs from 7.5.0 to 7.5.2 Change-type: patch
This commit is contained in:
parent
42d9cbb48d
commit
4fcedd0607
18
npm-shrinkwrap.json
generated
18
npm-shrinkwrap.json
generated
@ -16,10 +16,10 @@
|
||||
"@balena/es-version": "^1.0.1",
|
||||
"@oclif/core": "^4.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"balena-config-json": "^4.2.2",
|
||||
"balena-config-json": "^4.2.7",
|
||||
"balena-device-init": "^8.1.3",
|
||||
"balena-errors": "^4.7.3",
|
||||
"balena-image-fs": "^7.5.0",
|
||||
"balena-image-fs": "^7.5.2",
|
||||
"balena-preload": "^18.0.1",
|
||||
"balena-sdk": "^21.3.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
@ -7364,12 +7364,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/balena-config-json": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/balena-config-json/-/balena-config-json-4.2.2.tgz",
|
||||
"integrity": "sha512-dI/vZ+1Zgz8X/PEBEtBqGqi4eWDtD0e05LAOAIfdTtbYJK5DJhMSq7Is3IKDWgZNejDI+NpbDmRok45tqCmiag==",
|
||||
"version": "4.2.7",
|
||||
"resolved": "https://registry.npmjs.org/balena-config-json/-/balena-config-json-4.2.7.tgz",
|
||||
"integrity": "sha512-cnRsRyKiPojETc/Xq9yN25d78ihGbFp1lJPeGzVKcuNn2PKZ6f6N3SMNuJA7BbFNMKrDhpEhGn274jCWklskaA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"balena-image-fs": "^7.4.0",
|
||||
"balena-image-fs": "^7.5.0",
|
||||
"file-disk": "^8.0.1",
|
||||
"partitioninfo": "^6.0.2"
|
||||
}
|
||||
@ -7428,9 +7428,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/balena-image-fs": {
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/balena-image-fs/-/balena-image-fs-7.5.0.tgz",
|
||||
"integrity": "sha512-JVydPTG7hiaX6uAGxzc2HWlVASqXAnb1Ypg1zOU8M6H1US6cbcv3L2ZixHla9yzQnZOy4+SLgV4wc9A4T0CPcQ==",
|
||||
"version": "7.5.2",
|
||||
"resolved": "https://registry.npmjs.org/balena-image-fs/-/balena-image-fs-7.5.2.tgz",
|
||||
"integrity": "sha512-bOxnUaJWA26wNlOMc5QScBvqGLQUWw/K0GK/VDgu5tGsZdN4rtdIPSbhXcKBw+0gcNPUumYDtdDPipaOH1kREA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"ext2fs": "^4.2.4",
|
||||
|
@ -196,10 +196,10 @@
|
||||
"@balena/es-version": "^1.0.1",
|
||||
"@oclif/core": "^4.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"balena-config-json": "^4.2.2",
|
||||
"balena-config-json": "^4.2.7",
|
||||
"balena-device-init": "^8.1.3",
|
||||
"balena-errors": "^4.7.3",
|
||||
"balena-image-fs": "^7.5.0",
|
||||
"balena-image-fs": "^7.5.2",
|
||||
"balena-preload": "^18.0.1",
|
||||
"balena-sdk": "^21.3.0",
|
||||
"balena-semver": "^2.3.0",
|
||||
|
@ -64,7 +64,12 @@ export default class ConfigInjectCmd extends Command {
|
||||
);
|
||||
|
||||
const config = await import('balena-config-json');
|
||||
await config.write(drive, '', configJSON);
|
||||
await config.write(
|
||||
drive,
|
||||
// Will be removed in the next major of balena-config-json
|
||||
undefined,
|
||||
configJSON,
|
||||
);
|
||||
|
||||
console.info('Done');
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ export default class ConfigReadCmd extends Command {
|
||||
await safeUmount(drive);
|
||||
|
||||
const config = await import('balena-config-json');
|
||||
const configJSON = await config.read(drive, '');
|
||||
const configJSON = await config.read(drive);
|
||||
|
||||
if (options.json) {
|
||||
console.log(JSON.stringify(configJSON, null, 4));
|
||||
|
@ -62,7 +62,7 @@ export default class ConfigReconfigureCmd extends Command {
|
||||
await safeUmount(drive);
|
||||
|
||||
const config = await import('balena-config-json');
|
||||
const { uuid } = await config.read(drive, '');
|
||||
const { uuid } = await config.read(drive);
|
||||
await safeUmount(drive);
|
||||
|
||||
if (!uuid) {
|
||||
|
@ -64,14 +64,19 @@ export default class ConfigWriteCmd extends Command {
|
||||
await safeUmount(drive);
|
||||
|
||||
const config = await import('balena-config-json');
|
||||
const configJSON = await config.read(drive, '');
|
||||
const configJSON = await config.read(drive);
|
||||
|
||||
console.info(`Setting ${params.key} to ${params.value}`);
|
||||
ConfigWriteCmd.updateConfigJson(configJSON, params.key, params.value);
|
||||
|
||||
await denyMount(drive, async () => {
|
||||
await safeUmount(drive);
|
||||
await config.write(drive, '', configJSON);
|
||||
await config.write(
|
||||
drive,
|
||||
// Will be removed in the next major of balena-config-json
|
||||
undefined,
|
||||
configJSON,
|
||||
);
|
||||
});
|
||||
|
||||
console.info('Done');
|
||||
|
@ -192,7 +192,7 @@ Can be repeated to add multiple certificates.\
|
||||
// Next verify that config.json enables secureboot.
|
||||
if (isSecureBoot) {
|
||||
const { read } = await import('balena-config-json');
|
||||
const config = await read(params.image, '');
|
||||
const config = await read(params.image);
|
||||
if (config.installer?.secureboot === true) {
|
||||
throw new ExpectedError("Can't preload image with secure boot enabled");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user