dispose method

Future<void> dispose()

Disposes every registered command (de-duplicated), releasing resources such as open HTTP clients/sockets so they cannot keep the process alive after the interactive session ends. Errors from individual commands are ignored so one failure does not block the rest.

Implementation

Future<void> dispose() async {
  for (final command in commands) {
    try {
      await command.dispose();
    } catch (_) {}
  }
}