ConstructFlag class sealed

A command-line flag understood by both the outer revali CLI and the inner construct runner that executes inside the generated entrypoint.

Each shared flag is declared exactly once — here — and both parsers are built from the same list. The two commands used to declare their flags independently, and the outer command forwarded them by filtering the raw argument strings. That had two problems this design removes structurally:

  • --flag=value is a single token, so it never matched the --flag the filter looked for. revali dev --cert=a.pem leaked --cert=a.pem into the inner parser, which does not declare cert, and failed to parse.
  • Every new flag was a three-place edit: declare inner, declare outer, and update the outer-only strip list. Missing the third leaked the flag.

forward emits from parsed results rather than raw strings, so a flag absent from the shared list cannot reach the inner runner at all.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
help String
final
hide bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

declare(ArgParser parser) → void
Adds this flag to parser. Called for both the outer and inner command.
forward(ArgResults results, List<String> out) → void
Appends this flag to out if it was explicitly passed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited