reflectionGeneratorOptions top-level constant

List<OptionDefinition> const reflectionGeneratorOptions

Tool-specific options for tom_reflection_generator.

Standard options (--verbose/-v, --help/-h, --version, --nested, --dump-definitions, project-traversal flags) are contributed automatically by the framework via NavigationFeatures and must NOT be redeclared here.

Note: --package deliberately has no -p abbreviation — -p is reserved by the standard --project traversal option.

Implementation

const reflectionGeneratorOptions = <OptionDefinition>[
  OptionDefinition.flag(
    name: 'all',
    description: 'Process directory targets recursively',
  ),
  OptionDefinition.option(
    name: 'package',
    description:
        'Reflection package whose annotations trigger generation '
        '(default: tom_reflection)',
    valueName: 'name',
    defaultValue: 'tom_reflection',
  ),
  OptionDefinition.option(
    name: 'extension',
    abbr: 'e',
    description: 'Output file extension (default: .reflection.dart)',
    valueName: 'ext',
    defaultValue: '.reflection.dart',
  ),
  OptionDefinition.option(
    name: 'config',
    abbr: 'c',
    description:
        'build.yaml path used for the build-mode fallback (default: build.yaml)',
    valueName: 'path',
    defaultValue: 'build.yaml',
  ),
  OptionDefinition.flag(
    name: 'useAllCapabilities',
    description:
        'Use all capabilities instead of those declared on the reflector class',
  ),
  // Deliberately a distinct flag rather than the framework's --dry-run (which
  // this tool leaves disabled). Dry-run means "show what would happen and
  // succeed"; --check means "fail if it would change anything". The exit
  // status is the entire point, so it gets its own name.
  OptionDefinition.flag(
    name: 'check',
    description:
        'Verify committed *.reflection.dart files instead of writing them; '
        'fail if any differs from what would be generated',
  ),
  OptionDefinition.flag(
    name: 'no-cache',
    description: 'Disable analyzer summary caching for dependencies',
  ),
  OptionDefinition.flag(
    name: 'rebuild-cache',
    description: 'Force regeneration of all cached summaries',
  ),
  OptionDefinition.flag(
    name: 'show-cache-status',
    description: 'Show which packages have cached summaries, then stop',
  ),
  OptionDefinition.multi(
    name: 'cache-only',
    description: 'Restrict summary caching to the given package(s) (repeatable)',
    valueName: 'package',
  ),
];