rename foundUri

This commit is contained in:
Henry Hiles 2025-08-01 16:02:28 -04:00
commit 0ef06d3c9b
No known key found for this signature in database
5 changed files with 20 additions and 20 deletions

View file

@ -11,7 +11,7 @@ void main(List<String> argsRaw) async {
final parser = ConfigParser() final parser = ConfigParser()
..addOption("socket", abbr: "s", mandatory: true) ..addOption("socket", abbr: "s", mandatory: true)
..addOption("homeserver", abbr: "h", mandatory: true) ..addOption("homeserver", abbr: "h", mandatory: true)
..addOption("foundUri", abbr: "f", mandatory: true) ..addOption("successUri", abbr: "s", mandatory: true)
..addOption("name", abbr: "n", mandatory: true) ..addOption("name", abbr: "n", mandatory: true)
..addOption("adminRoom", abbr: "a", mandatory: true) ..addOption("adminRoom", abbr: "a", mandatory: true)
..addOption("botPasswordFile", abbr: "b", mandatory: true) ..addOption("botPasswordFile", abbr: "b", mandatory: true)

View file

@ -59,7 +59,7 @@ class ApiHelper {
); );
} }
return Response.found(settings.foundUri); return Response.found(settings.successUri);
} }
static final provider = Provider<ApiHelper>(ApiHelper.new); static final provider = Provider<ApiHelper>(ApiHelper.new);

View file

@ -8,7 +8,7 @@ abstract class Settings with _$Settings {
const factory Settings({ const factory Settings({
required String socket, required String socket,
required Uri homeserver, required Uri homeserver,
required Uri foundUri, required Uri successUri,
required String name, required String name,
required String adminRoom, required String adminRoom,
required String botPasswordFile, required String botPasswordFile,

View file

@ -16,7 +16,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$Settings { mixin _$Settings {
String get socket; Uri get homeserver; Uri get foundUri; String get name; String get adminRoom; String get botPasswordFile; String get smtpPasswordFile; String? get inviteTo; String get socket; Uri get homeserver; Uri get successUri; String get name; String get adminRoom; String get botPasswordFile; String get smtpPasswordFile; String? get inviteTo;
/// Create a copy of Settings /// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@ -29,16 +29,16 @@ $SettingsCopyWith<Settings> get copyWith => _$SettingsCopyWithImpl<Settings>(thi
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.foundUri, foundUri) || other.foundUri == foundUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo)); return identical(this, other) || (other.runtimeType == runtimeType&&other is Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.successUri, successUri) || other.successUri == successUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,socket,homeserver,foundUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo); int get hashCode => Object.hash(runtimeType,socket,homeserver,successUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo);
@override @override
String toString() { String toString() {
return 'Settings(socket: $socket, homeserver: $homeserver, foundUri: $foundUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)'; return 'Settings(socket: $socket, homeserver: $homeserver, successUri: $successUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)';
} }
@ -49,7 +49,7 @@ abstract mixin class $SettingsCopyWith<$Res> {
factory $SettingsCopyWith(Settings value, $Res Function(Settings) _then) = _$SettingsCopyWithImpl; factory $SettingsCopyWith(Settings value, $Res Function(Settings) _then) = _$SettingsCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String socket, Uri homeserver, Uri foundUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo String socket, Uri homeserver, Uri successUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo
}); });
@ -66,11 +66,11 @@ class _$SettingsCopyWithImpl<$Res>
/// Create a copy of Settings /// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? socket = null,Object? homeserver = null,Object? foundUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? socket = null,Object? homeserver = null,Object? successUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable
as Uri,foundUri: null == foundUri ? _self.foundUri : foundUri // ignore: cast_nullable_to_non_nullable as Uri,successUri: null == successUri ? _self.successUri : successUri // ignore: cast_nullable_to_non_nullable
as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable
as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable
@ -87,12 +87,12 @@ as String?,
@JsonSerializable() @JsonSerializable()
class _Settings implements Settings { class _Settings implements Settings {
const _Settings({required this.socket, required this.homeserver, required this.foundUri, required this.name, required this.adminRoom, required this.botPasswordFile, required this.smtpPasswordFile, required this.inviteTo}); const _Settings({required this.socket, required this.homeserver, required this.successUri, required this.name, required this.adminRoom, required this.botPasswordFile, required this.smtpPasswordFile, required this.inviteTo});
factory _Settings.fromJson(Map<String, dynamic> json) => _$SettingsFromJson(json); factory _Settings.fromJson(Map<String, dynamic> json) => _$SettingsFromJson(json);
@override final String socket; @override final String socket;
@override final Uri homeserver; @override final Uri homeserver;
@override final Uri foundUri; @override final Uri successUri;
@override final String name; @override final String name;
@override final String adminRoom; @override final String adminRoom;
@override final String botPasswordFile; @override final String botPasswordFile;
@ -112,16 +112,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.foundUri, foundUri) || other.foundUri == foundUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.successUri, successUri) || other.successUri == successUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,socket,homeserver,foundUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo); int get hashCode => Object.hash(runtimeType,socket,homeserver,successUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo);
@override @override
String toString() { String toString() {
return 'Settings(socket: $socket, homeserver: $homeserver, foundUri: $foundUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)'; return 'Settings(socket: $socket, homeserver: $homeserver, successUri: $successUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)';
} }
@ -132,7 +132,7 @@ abstract mixin class _$SettingsCopyWith<$Res> implements $SettingsCopyWith<$Res>
factory _$SettingsCopyWith(_Settings value, $Res Function(_Settings) _then) = __$SettingsCopyWithImpl; factory _$SettingsCopyWith(_Settings value, $Res Function(_Settings) _then) = __$SettingsCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String socket, Uri homeserver, Uri foundUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo String socket, Uri homeserver, Uri successUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo
}); });
@ -149,11 +149,11 @@ class __$SettingsCopyWithImpl<$Res>
/// Create a copy of Settings /// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? socket = null,Object? homeserver = null,Object? foundUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? socket = null,Object? homeserver = null,Object? successUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) {
return _then(_Settings( return _then(_Settings(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable
as Uri,foundUri: null == foundUri ? _self.foundUri : foundUri // ignore: cast_nullable_to_non_nullable as Uri,successUri: null == successUri ? _self.successUri : successUri // ignore: cast_nullable_to_non_nullable
as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable
as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable

View file

@ -9,7 +9,7 @@ part of 'settings.dart';
_Settings _$SettingsFromJson(Map<String, dynamic> json) => _Settings( _Settings _$SettingsFromJson(Map<String, dynamic> json) => _Settings(
socket: json['socket'] as String, socket: json['socket'] as String,
homeserver: Uri.parse(json['homeserver'] as String), homeserver: Uri.parse(json['homeserver'] as String),
foundUri: Uri.parse(json['foundUri'] as String), successUri: Uri.parse(json['successUri'] as String),
name: json['name'] as String, name: json['name'] as String,
adminRoom: json['adminRoom'] as String, adminRoom: json['adminRoom'] as String,
botPasswordFile: json['botPasswordFile'] as String, botPasswordFile: json['botPasswordFile'] as String,
@ -20,7 +20,7 @@ _Settings _$SettingsFromJson(Map<String, dynamic> json) => _Settings(
Map<String, dynamic> _$SettingsToJson(_Settings instance) => <String, dynamic>{ Map<String, dynamic> _$SettingsToJson(_Settings instance) => <String, dynamic>{
'socket': instance.socket, 'socket': instance.socket,
'homeserver': instance.homeserver.toString(), 'homeserver': instance.homeserver.toString(),
'foundUri': instance.foundUri.toString(), 'successUri': instance.successUri.toString(),
'name': instance.name, 'name': instance.name,
'adminRoom': instance.adminRoom, 'adminRoom': instance.adminRoom,
'botPasswordFile': instance.botPasswordFile, 'botPasswordFile': instance.botPasswordFile,