CliVersion class

Routed CLI core utilities.

This library provides:

  • A resilient version resolver for the CLI.
  • Lightweight logging utilities for CLI commands.
  • Basic dev server helpers intended to be used by the executable.
  • Simple helpers to keep CLI concerns decoupled from implementation details.

Future work:

  • Integrate hot reload control using the hotreloader package.
  • Add project scaffolding, build, route listing, and update utilities. Provides methods to resolve the CLI version in a robust manner.

Priority:

  1. Compile-time env var "ROUTED_CLI_VERSION"
  2. pubspec.yaml found by walking up from Directory.current
  3. Fallback to defaultVersion

Constructors

CliVersion()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

resolve({Directory? start}) Future<String>
Resolve the CLI version string.

Constants

defaultVersion → const String
The default fallback version when no other source is available.
envKey → const String
The environment key used for embedding the version at build time.