mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Fix typings in release
and release list
commands
This commit is contained in:
parent
2ab635f49a
commit
602e63c8a9
@ -86,7 +86,7 @@ export default class ReleaseCmd extends Command {
|
|||||||
balena: BalenaSdk.BalenaSDK,
|
balena: BalenaSdk.BalenaSDK,
|
||||||
options: FlagsDef,
|
options: FlagsDef,
|
||||||
) {
|
) {
|
||||||
const fields: Array<keyof BalenaSdk.Release> = [
|
const fields = [
|
||||||
'id',
|
'id',
|
||||||
'commit',
|
'commit',
|
||||||
'created_at',
|
'created_at',
|
||||||
@ -96,7 +96,7 @@ export default class ReleaseCmd extends Command {
|
|||||||
'build_log',
|
'build_log',
|
||||||
'start_timestamp',
|
'start_timestamp',
|
||||||
'end_timestamp',
|
'end_timestamp',
|
||||||
];
|
] satisfies BalenaSdk.PineOptions<BalenaSdk.Release>['$select'];
|
||||||
|
|
||||||
const release = await balena.models.release.get(commitOrId, {
|
const release = await balena.models.release.get(commitOrId, {
|
||||||
...(!options.json && { $select: fields }),
|
...(!options.json && { $select: fields }),
|
||||||
|
@ -56,14 +56,14 @@ export default class ReleaseListCmd extends Command {
|
|||||||
public async run() {
|
public async run() {
|
||||||
const { args: params, flags: options } = await this.parse(ReleaseListCmd);
|
const { args: params, flags: options } = await this.parse(ReleaseListCmd);
|
||||||
|
|
||||||
const fields: Array<keyof BalenaSdk.Release> = [
|
const fields = [
|
||||||
'id',
|
'id',
|
||||||
'commit',
|
'commit',
|
||||||
'created_at',
|
'created_at',
|
||||||
'status',
|
'status',
|
||||||
'semver',
|
'semver',
|
||||||
'is_final',
|
'is_final',
|
||||||
];
|
] satisfies BalenaSdk.PineOptions<BalenaSdk.Release>['$select'];
|
||||||
|
|
||||||
const balena = getBalenaSdk();
|
const balena = getBalenaSdk();
|
||||||
const { getFleetSlug } = await import('../../utils/sdk');
|
const { getFleetSlug } = await import('../../utils/sdk');
|
||||||
|
Loading…
Reference in New Issue
Block a user