VariableUpsertSubcommand constructor

VariableUpsertSubcommand()

Implementation

VariableUpsertSubcommand() {
  argParser
    ..addOption(
      'translation-id',
      help: 'Translation key ID. [Required]',
      mandatory: true,
    )
    ..addOption(
      'name',
      abbr: 'n',
      help: 'Variable name in camelCase (e.g. count, userName, amount). [Required]',
      mandatory: true,
    )
    ..addOption(
      'format',
      abbr: 'f',
      help:
          'Variable format (text, number, measurement, date, gender, plural, static, custom) [Optional, default: text].',
      defaultsTo: 'text',
      allowed: [
        'text',
        'number',
        'measurement',
        'date',
        'gender',
        'plural',
        'static',
        'custom',
      ],
    )
    ..addOption(
      'id',
      help: 'Variable ID [Optional, leave empty to create new].',
    )
    ..addOption(
      'position',
      abbr: 'p',
      help: 'Argument position index in method signature [Optional, default: 0].',
      defaultsTo: '0',
    )
    ..addMultiOption(
      'custom-fields',
      help: 'Custom field names if format is custom [Optional].',
    );
}