from static method
Returns the invocation that baseCommand identifies.
A null or empty name is the direct scloud invocation.
Implementation
static BaseCommandInvocation from(final String? baseCommand) {
final name = baseCommand?.trim().toLowerCase();
if (name == null || name.isEmpty) {
return BaseCommandInvocation.scloud;
}
return values.firstWhere(
(final invocation) => invocation.reportedName == name,
orElse: () => BaseCommandInvocation.other,
);
}