v14 preparations: Fix TypeError produced by 'npx oclif manifest'

Change-type: patch
This commit is contained in:
Paulo Castro 2022-01-08 01:16:45 +00:00
parent 58799915a9
commit d1e66bc1a5
5 changed files with 16 additions and 12 deletions

View File

@ -57,7 +57,7 @@ export default class ConfigInjectCmd extends Command {
public static usage = 'config inject <file>';
public static flags: flags.Input<FlagsDef> = {
type: cf.deviceTypeIgnored,
...cf.deviceTypeIgnored,
drive: cf.driveOrImg,
help: cf.help,
};

View File

@ -47,7 +47,7 @@ export default class ConfigReadCmd extends Command {
public static usage = 'config read';
public static flags: flags.Input<FlagsDef> = {
type: cf.deviceTypeIgnored,
...cf.deviceTypeIgnored,
drive: cf.driveOrImg,
help: cf.help,
json: cf.json,

View File

@ -50,7 +50,7 @@ export default class ConfigReconfigureCmd extends Command {
public static usage = 'config reconfigure';
public static flags: flags.Input<FlagsDef> = {
type: cf.deviceTypeIgnored,
...cf.deviceTypeIgnored,
drive: cf.driveOrImg,
advanced: flags.boolean({
description: 'show advanced commands',

View File

@ -64,7 +64,7 @@ export default class ConfigWriteCmd extends Command {
public static usage = 'config write <key> <value>';
public static flags: flags.Input<FlagsDef> = {
type: cf.deviceTypeIgnored,
...cf.deviceTypeIgnored,
drive: cf.driveOrImg,
help: cf.help,
};

View File

@ -97,14 +97,18 @@ export const deviceType = flags.string({
required: true,
});
export const deviceTypeIgnored = isV14()
? undefined
: flags.string({
description: 'ignored - no longer required',
char: 't',
required: false,
hidden: true,
});
export const deviceTypeIgnored = {
...(isV14()
? {}
: {
type: flags.string({
description: 'ignored - no longer required',
char: 't',
required: false,
hidden: true,
}),
}),
};
export const json: IBooleanFlag<boolean> = flags.boolean({
char: 'j',