diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3c3629e6..00000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.gitignore b/.gitignore index 36b1b2d4..765a30aa 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ build **/.tmp **/*.dart_tool .nx/cache +.nx/workspace-data **/target **/.gradle diff --git a/.prettierignore b/.prettierignore index 31d08dd9..e0af9d4b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,4 +2,5 @@ /dist /coverage /.nx/cache -/tests/test-files \ No newline at end of file +/tests/test-files +/.nx/workspace-data \ No newline at end of file diff --git a/README.md b/README.md index 17fcd48d..68895175 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Below are the language client generators that are planned to have first party su | [Dart](languages/dart/dart-codegen/) | ✅ | ✅ | | Rust | 🚧 | 🚧 | | [Kotlin](languages/kotlin/kotlin-codegen/) | ✅ | ✅ | -| Swift | | | +| Swift | 🚧 | 🚧 | | Go | | | | Python | | | @@ -50,22 +50,17 @@ Before running this command. Make sure you have an arri config created already. ```ts // arri.config.ts -import { - defineConfig, - dartClientGenerator, - kotlinClientGenerator, - typescriptClientGenerator, -} from "arri"; +import { defineConfig, generators } from "arri"; export default defineConfig({ generators: [ - dartClientGenerator({ + generators.dartClient({ // options }), - kotlinClientGenerator({ + generators.kotlinClient({ // options }), - typescriptClientGenerator({ + generators.typescriptClient({ // options }), ], @@ -133,7 +128,7 @@ JSON app definitions are something that would normally be automatically generate ```json { - "arriSchemaVersion": "", + "schemaVersion": "", "procedures": { "sayHello": { "transport": "http", diff --git a/internal/project.json b/internal/project.json index 60c5c38a..13fd655b 100644 --- a/internal/project.json +++ b/internal/project.json @@ -2,10 +2,9 @@ "name": "internal-scripts", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], + "executor": "nx:run-commands", "options": { - "lintFilePatterns": ["internal/**/*.ts"] + "command": "pnpm eslint internal" } } } diff --git a/internal/scripts/generate-test-utils.ts b/internal/scripts/generate-test-utils.ts index 6ffffbd5..9c0e126c 100644 --- a/internal/scripts/generate-test-utils.ts +++ b/internal/scripts/generate-test-utils.ts @@ -133,7 +133,7 @@ const BookParams = a.object( type BookParams = a.infer; const def: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", info: { version: "20", }, diff --git a/languages/dart/dart-client/lib/arri_client.dart b/languages/dart/dart-client/lib/arri_client.dart index de52514e..3f5b67d5 100644 --- a/languages/dart/dart-client/lib/arri_client.dart +++ b/languages/dart/dart-client/lib/arri_client.dart @@ -4,5 +4,109 @@ export "errors.dart"; export 'parsing.dart'; export 'request.dart'; export 'sse.dart'; -export 'utils.dart'; export 'ws.dart'; + +abstract class ArriModel { + Map toJson(); + String toJsonString(); + String toUrlQueryParams(); + ArriModel copyWith(); + List get props; +} + +bool listsAreEqual(List? list1, List? list2, {bool log = false}) { + if (list1 == null || list2 == null) { + return list1 == null && list2 == null; + } + final length = list1.length; + if (list2.length != length) return false; + for (var i = 0; i < length; i++) { + final item1 = list1[i]; + final item2 = list2[i]; + if (log) { + print("1 $item1"); + print("2 $item2"); + } + if (item1 is Map) { + if (!mapsAreEqual(item1, item2, log: log)) { + if (log) print("$item1 != $item2"); + return false; + } + } else if (item1 is List) { + if (!listsAreEqual(item1, item2, log: log)) return false; + } else if (item1.runtimeType != item2.runtimeType) { + if (log) print("$item1 != $item2"); + return false; + } else if (item1 is DateTime) { + if (!item1.isAtSameMomentAs(item2)) { + if (log) print("$item1 != $item2"); + return false; + } + } else if (item1 != item2) { + if (log) print("$item1 != $item2"); + return false; + } + } + return true; +} + +bool mapsAreEqual(Map? map1, Map? map2, {bool log = false}) { + if (map1 == null || map2 == null) { + return map1 == null && map2 == null; + } + final length = map1.length; + if (map2.length != length) return false; + for (final entry in map1.entries) { + if (!map2.containsKey(entry.key)) return false; + final value1 = entry.value; + final value2 = map2[entry.key]; + + if (value1 is Map) { + if (!mapsAreEqual(value1, value2, log: log)) return false; + } else if (value1 is List) { + if (!listsAreEqual(value1, value2, log: log)) return false; + } else if (value1.runtimeType != value2.runtimeType) { + if (log) print("$value1 != $value2"); + return false; + } else if (value1 is DateTime) { + if (!value1.isAtSameMomentAs(value2)) { + if (log) print("$value1 != $value2"); + return false; + } + } else if (value1 != value2) { + if (log) print("$value1 != $value2"); + return false; + } + } + return true; +} + +int listToHashCode(List items) { + int result = 0; + for (final item in items) { + if (item is List) { + result += listToHashCode(item); + } else if (item is Map) { + result += mapToHashCode(item); + } else { + result += item.hashCode; + } + } + return result; +} + +int mapToHashCode(Map input) { + int result = 0; + for (final entry in input.entries) { + result += entry.key.hashCode; + final value = entry.value; + if (value is List) { + result += listToHashCode(value); + } else if (value is Map) { + result += mapToHashCode(value); + } else { + result += value.hashCode; + } + } + return result; +} diff --git a/languages/dart/dart-client/lib/sse.dart b/languages/dart/dart-client/lib/sse.dart index 109ecc2d..7e67ca54 100644 --- a/languages/dart/dart-client/lib/sse.dart +++ b/languages/dart/dart-client/lib/sse.dart @@ -5,11 +5,9 @@ import 'package:arri_client/errors.dart'; import 'package:arri_client/request.dart'; import 'package:http/http.dart' as http; -typedef SseHookOnData = void Function(T data, EventSource connection); +typedef SseHookOnMessage = void Function(T data, EventSource connection); typedef SseHookOnError = void Function( ArriError error, EventSource connection); -typedef SseHookOnConnectionError = void Function( - ArriError error, EventSource connection); typedef SseHookOnOpen = void Function( http.StreamedResponse response, EventSource connection); typedef SseHookOnClose = void Function(EventSource connection); @@ -23,11 +21,10 @@ EventSource parsedArriSseRequest( FutureOr> Function()? headers, Duration? retryDelay, int? maxRetryCount, - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, + SseHookOnMessage? onMessage, SseHookOnOpen? onOpen, SseHookOnClose? onClose, + SseHookOnError? onError, String? lastEventId, String? clientVersion, }) { @@ -46,12 +43,11 @@ EventSource parsedArriSseRequest( }, retryDelay: retryDelay ?? Duration.zero, maxRetryCount: maxRetryCount, - onData: onData, - onError: onError, - onConnectionError: onConnectionError, - onClose: onClose, - onOpen: onOpen, lastEventId: lastEventId, + onMessage: onMessage, + onOpen: onOpen, + onClose: onClose, + onError: onError, ); } @@ -71,9 +67,8 @@ class EventSource { bool _closedByClient = false; // hooks - late final void Function(T data) _onData; + late final void Function(T data) _onMessage; late final void Function(ArriError error) _onError; - late final void Function(ArriError error) _onConnectionError; late final void Function(http.StreamedResponse response) _onOpen; late final void Function() _onClose; @@ -87,11 +82,10 @@ class EventSource { Duration retryDelay = Duration.zero, int? maxRetryCount, // hooks - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnClose? onClose, + SseHookOnMessage? onMessage, SseHookOnOpen? onOpen, + SseHookOnClose? onClose, + SseHookOnError? onError, this.lastEventId, }) : _headers = headers, _params = params, @@ -100,18 +94,14 @@ class EventSource { this._httpClient = httpClient ?? http.Client(); // set hooks - _onData = (data) { - onData?.call(data, this); + _onMessage = (data) { + onMessage?.call(data, this); _streamController?.add(data); }; _onError = (err) { onError?.call(err, this); _streamController?.addError(err); }; - _onConnectionError = (err) { - onConnectionError?.call(err, this); - _streamController?.addError(err); - }; _onOpen = (response) { onOpen?.call(response, this); }; @@ -198,10 +188,7 @@ class EventSource { case SseRawEvent(): break; case SseMessageEvent(): - _onData(event.data); - break; - case SseErrorEvent(): - _onError(event.data); + _onMessage(event.data); break; case SseDoneEvent(): close(); @@ -229,9 +216,9 @@ class EventSource { return; } if (err is ArriError) { - _onConnectionError.call(err); + _onError.call(err); } else if (err is http.ClientException) { - _onConnectionError( + _onError( ArriError( code: 0, message: err.message, @@ -239,7 +226,7 @@ class EventSource { ), ); } else { - _onConnectionError.call( + _onError.call( ArriError( code: 0, message: "Unknown error connecting to $url", @@ -339,8 +326,6 @@ sealed class SseEvent { switch (sse.event) { case "message": return SseMessageEvent.fromRawSseEvent(sse, parser); - case "error": - return SseErrorEvent.fromRawSseEvent(sse); case "done": return SseDoneEvent.fromRawSseEvent(sse); default: @@ -393,19 +378,6 @@ class SseMessageEvent extends SseEvent { } } -class SseErrorEvent extends SseEvent { - final ArriError data; - const SseErrorEvent({super.id, super.event, required this.data}); - - factory SseErrorEvent.fromRawSseEvent(SseRawEvent event) { - return SseErrorEvent( - id: event.id, - event: event.event, - data: ArriError.fromString(event.data), - ); - } -} - class SseDoneEvent extends SseEvent { final String data = ""; const SseDoneEvent({super.id, super.event}); diff --git a/languages/dart/dart-client/lib/utils.dart b/languages/dart/dart-client/lib/utils.dart deleted file mode 100644 index b7e32ce3..00000000 --- a/languages/dart/dart-client/lib/utils.dart +++ /dev/null @@ -1,4 +0,0 @@ -class ArriBox { - final T value; - const ArriBox(this.value); -} diff --git a/languages/dart/dart-client/pubspec.yaml b/languages/dart/dart-client/pubspec.yaml index 95810d91..eba8689a 100644 --- a/languages/dart/dart-client/pubspec.yaml +++ b/languages/dart/dart-client/pubspec.yaml @@ -1,6 +1,6 @@ name: arri_client description: Client library needed for the code generated by the arri server library. -version: "0.49.1" +version: "0.51.0" repository: https://github.com/modiimedia/arri issue_tracker: https://github.com/modiimedia/arri/issues environment: diff --git a/languages/dart/dart-client/test/arri_client_test.dart b/languages/dart/dart-client/test/arri_client_test.dart index ee99876c..9168649a 100644 --- a/languages/dart/dart-client/test/arri_client_test.dart +++ b/languages/dart/dart-client/test/arri_client_test.dart @@ -20,7 +20,7 @@ main() { parsedArriSseRequest(nonExistentUrl, method: HttpMethod.get, parser: (input) => input, - onConnectionError: (err, event) { + onError: (err, event) { errCount++; if (errCount == 5) { event.close(); @@ -78,9 +78,6 @@ data: {"hello":"wo"""; event: message data: {"hello": "world"} -event: error -data: {"code": 500, "message": "Unknown Error"} - event: ping data: @@ -92,7 +89,7 @@ data: {"hello":"""; } throw Exception("Unable to parse data"); }); - expect(result.events.length, equals(4)); + expect(result.events.length, equals(3)); expect(result.leftoverData, equals("data: {\"hello\":")); final msg1 = result.events[0]; switch (msg1) { @@ -113,19 +110,9 @@ data: {"hello":"""; } final msg3 = result.events[2]; switch (msg3) { - case SseErrorEvent>(): - expect(msg3.data.code, equals(500)); - expect(msg3.data.message, equals("Unknown Error")); - expect(msg3.data.data, equals(null)); - expect(msg3.data.stack, equals(null)); - default: - throw Exception("Expected SseErrorEvent"); - } - final msg4 = result.events[3]; - switch (msg4) { case SseRawEvent>(): - expect(msg4.data, equals("")); - expect(msg4.event, equals("ping")); + expect(msg3.data, equals("")); + expect(msg3.event, equals("ping")); break; default: throw Exception("Expected SseRawEvent"); diff --git a/languages/dart/dart-codegen-reference/analysis_options.yaml b/languages/dart/dart-codegen-reference/analysis_options.yaml new file mode 100644 index 00000000..adf4714b --- /dev/null +++ b/languages/dart/dart-codegen-reference/analysis_options.yaml @@ -0,0 +1,3 @@ +linter: + rules: + - hash_and_equals diff --git a/languages/dart/dart-codegen-reference/lib/main.dart b/languages/dart/dart-codegen-reference/lib/main.dart new file mode 100644 index 00000000..6d1a7186 --- /dev/null +++ b/languages/dart/dart-codegen-reference/lib/main.dart @@ -0,0 +1,11 @@ +import 'package:arri_codegen_dart_reference/reference_client.dart'; + +main() { + final now = DateTime.now(); + final input1 = Book(id: "1", name: "", createdAt: now, updatedAt: now); + final input2 = Book(id: "1", name: "", createdAt: now, updatedAt: now); + print(input2); + print(input1 == input2); + final input3 = ObjectWithEveryType.empty(); + print(input3.hashCode); +} diff --git a/languages/dart/dart-codegen-reference/lib/reference_client.dart b/languages/dart/dart-codegen-reference/lib/reference_client.dart new file mode 100644 index 00000000..ed8d4afe --- /dev/null +++ b/languages/dart/dart-codegen-reference/lib/reference_client.dart @@ -0,0 +1,1575 @@ +// this file was autogenerated by arri +// ignore_for_file: type=lint, unused_field +import 'dart:async'; +import 'dart:convert'; +import 'package:arri_client/arri_client.dart'; +import 'package:http/http.dart' as http; + +class ExampleClient { + final http.Client? _httpClient; + final String _baseUrl; + final String _clientVersion = "20"; + late final FutureOr> Function()? _headers; + ExampleClient({ + http.Client? httpClient, + required String baseUrl, + FutureOr> Function()? headers, + }) : _httpClient = httpClient, + _baseUrl = baseUrl, + _headers = headers; + + Future sendObject(NestedObject params) async { + return parsedArriRequest( + "$_baseUrl/send-object", + method: HttpMethod.post, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => NestedObject.fromJsonString(body), + ); + } + + ExampleClientBooksService get books => ExampleClientBooksService( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + ); +} + +class ExampleClientBooksService { + final http.Client? _httpClient; + final String _baseUrl; + final String _clientVersion = "20"; + late final FutureOr> Function()? _headers; + ExampleClientBooksService({ + http.Client? httpClient, + required String baseUrl, + FutureOr> Function()? headers, + }) : _httpClient = httpClient, + _baseUrl = baseUrl, + _headers = headers; + + Future getBook(BookParams params) async { + return parsedArriRequest( + "$_baseUrl/books/get-book", + method: HttpMethod.get, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => Book.fromJsonString(body), + ); + } + + Future createBook(Book params) async { + return parsedArriRequest( + "$_baseUrl/books/create-book", + method: HttpMethod.post, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => Book.fromJsonString(body), + ); + } + + EventSource watchBook( + BookParams params, { + void Function(Book data, EventSource connection)? onMessage, + void Function(http.StreamedResponse response, EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function(ArriError error, EventSource connection)? onError, + Duration? retryDelay, + int? maxRetryCount, + String? lastEventId, + }) { + return parsedArriSseRequest( + "$_baseUrl/books/watch-book", + method: HttpMethod.get, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, + params: params.toJson(), + parser: (body) => Book.fromJsonString(body), + onMessage: onMessage, + onOpen: onOpen, + onClose: onClose, + onError: onError, + ); + } + + Future> createConnection() { + return arriWebsocketRequest( + "$_baseUrl/books/create-connection", + headers: _headers, + clientVersion: _clientVersion, + parser: (msg) => Book.fromJsonString(msg), + serializer: (msg) => msg.toJsonString(), + ); + } +} + +class Book implements ArriModel { + final String id; + final String name; + final DateTime createdAt; + final DateTime updatedAt; + const Book({ + required this.id, + required this.name, + required this.createdAt, + required this.updatedAt, + }); + + factory Book.empty() { + return Book( + id: "", + name: "", + createdAt: DateTime.now(), + updatedAt: DateTime.now(), + ); + } + + factory Book.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final name = typeFromDynamic(_input_["name"], ""); + final createdAt = dateTimeFromDynamic(_input_["createdAt"], DateTime.now()); + final updatedAt = dateTimeFromDynamic(_input_["updatedAt"], DateTime.now()); + return Book( + id: id, + name: name, + createdAt: createdAt, + updatedAt: updatedAt, + ); + } + + factory Book.fromJsonString(String input) { + return Book.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "id": id, + "name": name, + "createdAt": createdAt.toUtc().toIso8601String(), + "updatedAt": updatedAt.toUtc().toIso8601String(), + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("name=$name"); + _queryParts_.add("createdAt=${createdAt.toUtc().toIso8601String()}"); + _queryParts_.add("updatedAt=${updatedAt.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); + } + + @override + Book copyWith({ + String? id, + String? name, + DateTime? createdAt, + DateTime? updatedAt, + }) { + return Book( + id: id ?? this.id, + name: name ?? this.name, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ); + } + + @override + List get props => [ + id, + name, + createdAt, + updatedAt, + ]; + + @override + bool operator ==(Object other) { + return other is Book && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "Book ${toJsonString()}"; + } +} + +class BookParams implements ArriModel { + final String bookId; + const BookParams({ + required this.bookId, + }); + + factory BookParams.empty() { + return BookParams( + bookId: "", + ); + } + + factory BookParams.fromJson(Map _input_) { + final bookId = typeFromDynamic(_input_["bookId"], ""); + return BookParams( + bookId: bookId, + ); + } + + factory BookParams.fromJsonString(String input) { + return BookParams.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "bookId": bookId, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("bookId=$bookId"); + return _queryParts_.join("&"); + } + + @override + BookParams copyWith({ + String? bookId, + }) { + return BookParams( + bookId: bookId ?? this.bookId, + ); + } + + @override + List get props => [ + bookId, + ]; + + @override + bool operator ==(Object other) { + return other is BookParams && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "BookParams ${toJsonString()}"; + } +} + +class NestedObject implements ArriModel { + final String id; + final String content; + const NestedObject({ + required this.id, + required this.content, + }); + + factory NestedObject.empty() { + return NestedObject( + id: "", + content: "", + ); + } + + factory NestedObject.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final content = typeFromDynamic(_input_["content"], ""); + return NestedObject( + id: id, + content: content, + ); + } + + factory NestedObject.fromJsonString(String input) { + return NestedObject.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "id": id, + "content": content, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("content=$content"); + return _queryParts_.join("&"); + } + + @override + NestedObject copyWith({ + String? id, + String? content, + }) { + return NestedObject( + id: id ?? this.id, + content: content ?? this.content, + ); + } + + @override + List get props => [ + id, + content, + ]; + + @override + bool operator ==(Object other) { + return other is NestedObject && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "NestedObject ${toJsonString()}"; + } +} + +class ObjectWithEveryType implements ArriModel { + final String string; + final bool boolean; + final DateTime timestamp; + final double float32; + final double float64; + final int int8; + final int uint8; + final int int16; + final int uint16; + final int int32; + final int uint32; + final BigInt int64; + final BigInt uint64; + final Enumerator k_enum; + final NestedObject object; + final List array; + final Map record; + final Discriminator discriminator; + final dynamic any; + const ObjectWithEveryType({ + required this.string, + required this.boolean, + required this.timestamp, + required this.float32, + required this.float64, + required this.int8, + required this.uint8, + required this.int16, + required this.uint16, + required this.int32, + required this.uint32, + required this.int64, + required this.uint64, + required this.k_enum, + required this.object, + required this.array, + required this.record, + required this.discriminator, + required this.any, + }); + factory ObjectWithEveryType.empty() { + return ObjectWithEveryType( + string: "", + boolean: false, + timestamp: DateTime.now(), + float32: 0.0, + float64: 0.0, + int8: 0, + uint8: 0, + int16: 0, + uint16: 0, + int32: 0, + uint32: 0, + int64: BigInt.zero, + uint64: BigInt.zero, + k_enum: Enumerator.foo, + object: NestedObject.empty(), + array: [], + record: {}, + discriminator: Discriminator.empty(), + any: null, + ); + } + factory ObjectWithEveryType.fromJson(Map _input_) { + final string = typeFromDynamic(_input_["string"], ""); + final boolean = typeFromDynamic(_input_["boolean"], false); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final float32 = doubleFromDynamic(_input_["float32"], 0.0); + final float64 = doubleFromDynamic(_input_["float64"], 0.0); + final int8 = intFromDynamic(_input_["int8"], 0); + final uint8 = intFromDynamic(_input_["uint8"], 0); + final int16 = intFromDynamic(_input_["int16"], 0); + final uint16 = intFromDynamic(_input_["uint16"], 0); + final int32 = intFromDynamic(_input_["int32"], 0); + final uint32 = intFromDynamic(_input_["uint32"], 0); + final int64 = bigIntFromDynamic(_input_["int64"], BigInt.zero); + final uint64 = bigIntFromDynamic(_input_["uint64"], BigInt.zero); + final k_enum = + Enumerator.fromString(typeFromDynamic(_input_["enum"], "")); + final object = _input_["object"] is Map + ? NestedObject.fromJson(_input_["object"]) + : NestedObject.empty(); + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : []; + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + typeFromDynamic(_val_, false), + ), + ) + : {}; + final discriminator = _input_["discriminator"] is Map + ? Discriminator.fromJson(_input_["discriminator"]) + : Discriminator.empty(); + final any = _input_["any"]; + return ObjectWithEveryType( + string: string, + boolean: boolean, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + k_enum: k_enum, + object: object, + array: array, + record: record, + discriminator: discriminator, + any: any, + ); + } + + factory ObjectWithEveryType.fromJsonString(String input) { + return ObjectWithEveryType.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "string": string, + "boolean": boolean, + "timestamp": timestamp.toUtc().toIso8601String(), + "float32": float32, + "float64": float64, + "int8": int8, + "uint8": uint8, + "int16": int16, + "uint16": uint16, + "int32": int32, + "uint32": uint32, + "int64": int64.toString(), + "uint64": uint64.toString(), + "enum": k_enum.serialValue, + "object": object.toJson(), + "array": array.map((_el_) => _el_).toList(), + "record": record.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ), + "discriminator": discriminator.toJson(), + "any": any, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + _queryParts_.add("float32=$float32"); + _queryParts_.add("float64=$float64"); + _queryParts_.add("int8=$int8"); + _queryParts_.add("uint8=$uint8"); + _queryParts_.add("int16=$int16"); + _queryParts_.add("uint16=$uint16"); + _queryParts_.add("int32=$int32"); + _queryParts_.add("uint32=$uint32"); + _queryParts_.add("int64=$int64"); + _queryParts_.add("uint64=$uint64"); + _queryParts_.add("enum=${k_enum.serialValue}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/object."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryType/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/discriminator."); + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithEveryType/any."); + return _queryParts_.join("&"); + } + + @override + ObjectWithEveryType copyWith({ + String? string, + bool? boolean, + DateTime? timestamp, + double? float32, + double? float64, + int? int8, + int? uint8, + int? int16, + int? uint16, + int? int32, + int? uint32, + BigInt? int64, + BigInt? uint64, + Enumerator? k_enum, + NestedObject? object, + List? array, + Map? record, + Discriminator? discriminator, + dynamic any, + }) { + return ObjectWithEveryType( + string: string ?? this.string, + boolean: boolean ?? this.boolean, + timestamp: timestamp ?? this.timestamp, + float32: float32 ?? this.float32, + float64: float64 ?? this.float64, + int8: int8 ?? this.int8, + uint8: uint8 ?? this.uint8, + int16: int16 ?? this.int16, + uint16: uint16 ?? this.uint16, + int32: int32 ?? this.int32, + uint32: uint32 ?? this.uint32, + int64: int64 ?? this.int64, + uint64: uint64 ?? this.uint64, + k_enum: k_enum ?? this.k_enum, + object: object ?? this.object, + array: array ?? this.array, + record: record ?? this.record, + discriminator: discriminator ?? this.discriminator, + any: any ?? this.any, + ); + } + + @override + List get props => [ + string, + boolean, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + k_enum, + object, + array, + record, + discriminator, + any, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryType && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryType ${toJsonString()}"; + } +} + +enum Enumerator implements Comparable { + foo("FOO"), + bar("BAR"), + baz("BAZ"); + + const Enumerator(this.serialValue); + final String serialValue; + + factory Enumerator.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; + } + } + return foo; + } + + @override + int compareTo(Enumerator other) => name.compareTo(other.name); +} + +sealed class Discriminator implements ArriModel { + String get typeName; + const Discriminator(); + + factory Discriminator.empty() { + return DiscriminatorA.empty(); + } + + factory Discriminator.fromJson(Map _input_) { + final typeName = typeFromDynamic(_input_["typeName"], ""); + switch (typeName) { + case "A": + return DiscriminatorA.fromJson(_input_); + case "B": + return DiscriminatorB.fromJson(_input_); + case "C": + return DiscriminatorC.fromJson(_input_); + default: + return Discriminator.empty(); + } + } + + factory Discriminator.fromJsonString(String input) { + return Discriminator.fromJson(json.decode(input)); + } +} + +class DiscriminatorA implements Discriminator { + final String id; + const DiscriminatorA({ + required this.id, + }); + + @override + String get typeName => "A"; + + factory DiscriminatorA.empty() { + return DiscriminatorA( + id: "", + ); + } + + factory DiscriminatorA.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + return DiscriminatorA( + id: id, + ); + } + + factory DiscriminatorA.fromJsonString(String input) { + return DiscriminatorA.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "typeName": typeName, + "id": id, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("typeName=$typeName"); + _queryParts_.add("id=$id"); + return _queryParts_.join("&"); + } + + @override + DiscriminatorA copyWith({ + String? id, + }) { + return DiscriminatorA( + id: id ?? this.id, + ); + } + + @override + List get props => [ + id, + ]; + + @override + bool operator ==(Object other) { + return other is DiscriminatorA && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "DiscriminatorA ${toJsonString()}"; + } +} + +class DiscriminatorB implements Discriminator { + final String id; + final String name; + const DiscriminatorB({ + required this.id, + required this.name, + }); + + @override + String get typeName => "B"; + + factory DiscriminatorB.empty() { + return DiscriminatorB( + id: "", + name: "", + ); + } + + factory DiscriminatorB.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final name = typeFromDynamic(_input_["name"], ""); + return DiscriminatorB( + id: id, + name: name, + ); + } + + factory DiscriminatorB.fromJsonString(String input) { + return DiscriminatorB.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "typeName": typeName, + "id": id, + "name": name, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("typeName=$typeName"); + _queryParts_.add("id=$id"); + _queryParts_.add("name=$name"); + return _queryParts_.join("&"); + } + + @override + DiscriminatorB copyWith({ + String? id, + String? name, + }) { + return DiscriminatorB( + id: id ?? this.id, + name: name ?? this.name, + ); + } + + @override + List get props => [ + id, + name, + ]; + + @override + bool operator ==(Object other) { + return other is DiscriminatorB && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "DiscriminatorB ${toJsonString()}"; + } +} + +class DiscriminatorC implements Discriminator { + final String id; + final String name; + final DateTime date; + const DiscriminatorC({ + required this.id, + required this.name, + required this.date, + }); + + @override + String get typeName => "C"; + + factory DiscriminatorC.empty() { + return DiscriminatorC( + id: "", + name: "", + date: DateTime.now(), + ); + } + + factory DiscriminatorC.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final name = typeFromDynamic(_input_["name"], ""); + final date = dateTimeFromDynamic(_input_["date"], DateTime.now()); + return DiscriminatorC( + id: id, + name: name, + date: date, + ); + } + + factory DiscriminatorC.fromJsonString(String input) { + return DiscriminatorC.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "typeName": typeName, + "id": id, + "name": name, + "date": date.toUtc().toIso8601String(), + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("typeName=$typeName"); + _queryParts_.add("id=$id"); + _queryParts_.add("name=$name"); + _queryParts_.add("date=${date.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); + } + + @override + DiscriminatorC copyWith({ + String? id, + String? name, + DateTime? date, + }) { + return DiscriminatorC( + id: id ?? this.id, + name: name ?? this.name, + date: date ?? this.date, + ); + } + + @override + List get props => [ + id, + name, + date, + ]; + + @override + bool operator ==(Object other) { + return other is DiscriminatorC && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "DiscriminatorC ${toJsonString()}"; + } +} + +class ObjectWithOptionalFields implements ArriModel { + final String? string; + final bool? boolean; + final DateTime? timestamp; + final double? float32; + final double? float64; + final int? int8; + final int? uint8; + final int? int16; + final int? uint16; + final int? int32; + final int? uint32; + final BigInt? int64; + final BigInt? uint64; + final Enumerator? k_enum; + final NestedObject? object; + final List? array; + final Map? record; + final Discriminator? discriminator; + final dynamic any; + const ObjectWithOptionalFields({ + this.string, + this.boolean, + this.timestamp, + this.float32, + this.float64, + this.int8, + this.uint8, + this.int16, + this.uint16, + this.int32, + this.uint32, + this.int64, + this.uint64, + this.k_enum, + this.object, + this.array, + this.record, + this.discriminator, + this.any, + }); + + factory ObjectWithOptionalFields.empty() { + return ObjectWithOptionalFields(); + } + + factory ObjectWithOptionalFields.fromJson(Map _input_) { + final string = nullableTypeFromDynamic(_input_["string"]); + final boolean = nullableTypeFromDynamic(_input_["boolean"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final float32 = nullableDoubleFromDynamic(_input_["float32"]); + final float64 = nullableDoubleFromDynamic(_input_["float64"]); + final int8 = nullableIntFromDynamic(_input_["int8"]); + final uint8 = nullableIntFromDynamic(_input_["uint8"]); + final int16 = nullableIntFromDynamic(_input_["int16"]); + final uint16 = nullableIntFromDynamic(_input_["uint16"]); + final int32 = nullableIntFromDynamic(_input_["int32"]); + final uint32 = nullableIntFromDynamic(_input_["uint32"]); + final int64 = nullableBigIntFromDynamic(_input_["int64"]); + final uint64 = nullableBigIntFromDynamic(_input_["uint64"]); + final k_enum = _input_["enum"] is String + ? Enumerator.fromString(_input_["enum"]) + : null; + final object = _input_["object"] is Map + ? NestedObject.fromJson(_input_["object"]) + : null; + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : null; + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + typeFromDynamic(_val_, false), + ), + ) + : null; + final discriminator = _input_["discriminator"] is Map + ? Discriminator.fromJson(_input_["discriminator"]) + : null; + final any = _input_["any"]; + return ObjectWithOptionalFields( + string: string, + boolean: boolean, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + k_enum: k_enum, + object: object, + array: array, + record: record, + discriminator: discriminator, + any: any, + ); + } + factory ObjectWithOptionalFields.fromJsonString(String input) { + return ObjectWithOptionalFields.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = {}; + if (string != null) _output_["string"] = string; + if (boolean != null) _output_["boolean"] = boolean; + if (timestamp != null) + _output_["timestamp"] = timestamp!.toUtc().toIso8601String(); + if (float32 != null) _output_["float32"] = float32; + if (float64 != null) _output_["float64"] = float64; + if (int8 != null) _output_["int8"] = int8; + if (uint8 != null) _output_["uint8"] = uint8; + if (int16 != null) _output_["int16"] = int16; + if (uint16 != null) _output_["uint16"] = uint16; + if (int32 != null) _output_["int32"] = int32; + if (uint32 != null) _output_["uint32"] = uint32; + if (int64 != null) _output_["int64"] = int64!.toString(); + if (uint64 != null) _output_["uint64"] = uint64!.toString(); + if (k_enum != null) _output_["enum"] = k_enum!.serialValue; + if (object != null) _output_["object"] = object!.toJson(); + if (array != null) _output_["array"] = array!.map((_el_) => _el_).toList(); + if (record != null) + _output_["record"] = record!.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ); + if (discriminator != null) + _output_["discriminator"] = discriminator!.toJson(); + if (any != null) _output_["any"] = any; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + if (string != null) _queryParts_.add("string=$string"); + if (boolean != null) _queryParts_.add("boolean=$boolean"); + if (timestamp != null) + _queryParts_.add("timestamp=${timestamp!.toUtc().toIso8601String()}"); + if (float32 != null) _queryParts_.add("float32=$float32"); + if (float64 != null) _queryParts_.add("float64=$float64"); + if (int8 != null) _queryParts_.add("int8=$int8"); + if (uint8 != null) _queryParts_.add("uint8=$uint8"); + if (int16 != null) _queryParts_.add("int16=$int16"); + if (uint16 != null) _queryParts_.add("uint16=$uint16"); + if (int32 != null) _queryParts_.add("int32=$int32"); + if (uint32 != null) _queryParts_.add("uint32=$uint32"); + if (int64 != null) _queryParts_.add("int64=$int64"); + if (uint64 != null) _queryParts_.add("uint64=$uint64"); + if (k_enum != null) _queryParts_.add("enum=${k_enum!.serialValue}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithOptionalFields/object."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithOptionalFields/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithOptionalFields/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithOptionalFields/discriminator."); + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithOptionalFields/any."); + return _queryParts_.join("&"); + } + + @override + ObjectWithOptionalFields copyWith({ + String? Function()? string, + bool? Function()? boolean, + DateTime? Function()? timestamp, + double? Function()? float32, + double? Function()? float64, + int? Function()? int8, + int? Function()? uint8, + int? Function()? int16, + int? Function()? uint16, + int? Function()? int32, + int? Function()? uint32, + BigInt? Function()? int64, + BigInt? Function()? uint64, + Enumerator? Function()? k_enum, + NestedObject? Function()? object, + List? Function()? array, + Map? Function()? record, + Discriminator? Function()? discriminator, + dynamic Function()? any, + }) { + return ObjectWithOptionalFields( + string: string != null ? string() : this.string, + boolean: boolean != null ? boolean() : this.boolean, + timestamp: timestamp != null ? timestamp() : this.timestamp, + float32: float32 != null ? float32() : this.float32, + float64: float64 != null ? float64() : this.float64, + int8: int8 != null ? int8() : this.int8, + uint8: uint8 != null ? uint8() : this.uint8, + int16: int16 != null ? int16() : this.int16, + uint16: uint16 != null ? uint16() : this.uint16, + int32: int32 != null ? int32() : this.int32, + uint32: uint32 != null ? uint32() : this.uint32, + int64: int64 != null ? int64() : this.int64, + uint64: uint64 != null ? uint64() : this.uint64, + k_enum: k_enum != null ? k_enum() : this.k_enum, + object: object != null ? object() : this.object, + array: array != null ? array() : this.array, + record: record != null ? record() : this.record, + discriminator: + discriminator != null ? discriminator() : this.discriminator, + any: any != null ? any() : this.any, + ); + } + + @override + List get props => [ + string, + boolean, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + k_enum, + object, + array, + record, + discriminator, + any, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithOptionalFields && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithOptionalFields ${toJsonString()}"; + } +} + +class ObjectWithNullableFields implements ArriModel { + final String? string; + final bool? boolean; + final DateTime? timestamp; + final double? float32; + final double? float64; + final int? int8; + final int? uint8; + final int? int16; + final int? uint16; + final int? int32; + final int? uint32; + final BigInt? int64; + final BigInt? uint64; + final Enumerator? k_enum; + final NestedObject? object; + final List? array; + final Map? record; + final Discriminator? discriminator; + final dynamic any; + const ObjectWithNullableFields({ + required this.string, + required this.boolean, + required this.timestamp, + required this.float32, + required this.float64, + required this.int8, + required this.uint8, + required this.int16, + required this.uint16, + required this.int32, + required this.uint32, + required this.int64, + required this.uint64, + required this.k_enum, + required this.object, + required this.array, + required this.record, + required this.discriminator, + required this.any, + }); + + factory ObjectWithNullableFields.empty() { + return ObjectWithNullableFields( + string: null, + boolean: null, + timestamp: null, + float32: null, + float64: null, + int8: null, + uint8: null, + int16: null, + uint16: null, + int32: null, + uint32: null, + int64: null, + uint64: null, + k_enum: null, + object: null, + array: null, + record: null, + discriminator: null, + any: null, + ); + } + + factory ObjectWithNullableFields.fromJson(Map _input_) { + final string = nullableTypeFromDynamic(_input_["string"]); + final boolean = nullableTypeFromDynamic(_input_["boolean"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final float32 = nullableDoubleFromDynamic(_input_["float32"]); + final float64 = nullableDoubleFromDynamic(_input_["float64"]); + final int8 = nullableIntFromDynamic(_input_["int8"]); + final uint8 = nullableIntFromDynamic(_input_["uint8"]); + final int16 = nullableIntFromDynamic(_input_["int16"]); + final uint16 = nullableIntFromDynamic(_input_["uint16"]); + final int32 = nullableIntFromDynamic(_input_["int32"]); + final uint32 = nullableIntFromDynamic(_input_["uint32"]); + final int64 = nullableBigIntFromDynamic(_input_["int64"]); + final uint64 = nullableBigIntFromDynamic(_input_["uint64"]); + final k_enum = _input_["enum"] is String + ? Enumerator.fromString(_input_["enum"]) + : null; + final object = _input_["object"] is Map + ? NestedObject.fromJson(_input_["object"]) + : null; + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : null; + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + typeFromDynamic(_val_, false), + ), + ) + : null; + final discriminator = _input_["discriminator"] is Map + ? Discriminator.fromJson(_input_["discriminator"]) + : null; + final any = _input_["any"]; + return ObjectWithNullableFields( + string: string, + boolean: boolean, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + k_enum: k_enum, + object: object, + array: array, + record: record, + discriminator: discriminator, + any: any, + ); + } + + factory ObjectWithNullableFields.fromJsonString(String input) { + return ObjectWithNullableFields.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "string": string, + "boolean": boolean, + "timestamp": timestamp?.toUtc().toIso8601String(), + "float32": float32, + "float64": float64, + "int8": int8, + "uint8": uint8, + "int16": int16, + "uint16": uint16, + "int32": int32, + "uint32": uint32, + "int64": int64?.toString(), + "uint64": uint64?.toString(), + "enum": k_enum?.serialValue, + "object": object?.toJson(), + "array": array?.map((_el_) => _el_).toList(), + "record": record?.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ), + "discriminator": discriminator?.toJson(), + "any": any, + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + _queryParts_.add("float32=$float32"); + _queryParts_.add("float64=$float64"); + _queryParts_.add("int8=$int8"); + _queryParts_.add("uint8=$uint8"); + _queryParts_.add("int16=$int16"); + _queryParts_.add("uint16=$uint16"); + _queryParts_.add("int32=$int32"); + _queryParts_.add("uint32=$uint32"); + _queryParts_.add("int64=$int64"); + _queryParts_.add("uint64=$uint64"); + _queryParts_.add("enum=${k_enum?.serialValue}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithNullableFields/object."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithNullableFields/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithNullableFields/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithNullableFields/discriminator."); + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithNullableFields/any."); + return _queryParts_.join("&"); + } + + @override + ObjectWithNullableFields copyWith({ + String? Function()? string, + bool? Function()? boolean, + DateTime? Function()? timestamp, + double? Function()? float32, + double? Function()? float64, + int? Function()? int8, + int? Function()? uint8, + int? Function()? int16, + int? Function()? uint16, + int? Function()? int32, + int? Function()? uint32, + BigInt? Function()? int64, + BigInt? Function()? uint64, + Enumerator? Function()? k_enum, + NestedObject? Function()? object, + List? Function()? array, + Map? Function()? record, + Discriminator? Function()? discriminator, + dynamic Function()? any, + }) { + return ObjectWithNullableFields( + string: string != null ? string() : this.string, + boolean: boolean != null ? boolean() : this.boolean, + timestamp: timestamp != null ? timestamp() : this.timestamp, + float32: float32 != null ? float32() : this.float32, + float64: float64 != null ? float64() : this.float64, + int8: int8 != null ? int8() : this.int8, + uint8: uint8 != null ? uint8() : this.uint8, + int16: int16 != null ? int16() : this.int16, + uint16: uint16 != null ? uint16() : this.uint16, + int32: int32 != null ? int32() : this.int32, + uint32: uint32 != null ? uint32() : this.uint32, + int64: int64 != null ? int64() : this.int64, + uint64: uint64 != null ? uint64() : this.uint64, + k_enum: k_enum != null ? k_enum() : this.k_enum, + object: object != null ? object() : this.object, + array: array != null ? array() : this.array, + record: record != null ? record() : this.record, + discriminator: + discriminator != null ? discriminator() : this.discriminator, + any: any != null ? any() : this.any, + ); + } + + @override + List get props => [ + string, + boolean, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + k_enum, + object, + array, + record, + discriminator, + any, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithNullableFields && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithNullableFields ${toJsonString()}"; + } +} + +class RecursiveObject implements ArriModel { + final RecursiveObject? left; + final RecursiveObject? right; + const RecursiveObject({ + required this.left, + required this.right, + }); + factory RecursiveObject.empty() { + return RecursiveObject( + left: null, + right: null, + ); + } + factory RecursiveObject.fromJson(Map _input_) { + final left = _input_["left"] is Map + ? RecursiveObject.fromJson(_input_["left"]) + : null; + final right = _input_["right"] is Map + ? RecursiveObject.fromJson(_input_["right"]) + : null; + return RecursiveObject( + left: left, + right: right, + ); + } + factory RecursiveObject.fromJsonString(String input) { + return RecursiveObject.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { + "left": left?.toJson(), + "right": right?.toJson(), + }; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveObject/left."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveObject/right."); + return _queryParts_.join("&"); + } + + @override + RecursiveObject copyWith({ + RecursiveObject? Function()? left, + RecursiveObject? Function()? right, + }) { + return RecursiveObject( + left: left != null ? left() : this.left, + right: right != null ? right() : this.right, + ); + } + + @override + List get props => [ + left, + right, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveObject && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveObject ${toJsonString()}"; + } +} diff --git a/languages/dart/dart-codegen-reference/lib/reference_client_test.dart b/languages/dart/dart-codegen-reference/lib/reference_client_test.dart new file mode 100644 index 00000000..473899f4 --- /dev/null +++ b/languages/dart/dart-codegen-reference/lib/reference_client_test.dart @@ -0,0 +1,251 @@ +import "dart:convert"; + +import "package:test/test.dart"; +import "dart:io"; +import "reference_client.dart"; + +void main() { + group("Book", () { + final input = Book( + id: "1", + name: "The Adventures of Tom Sawyer", + createdAt: DateTime.parse("2001-01-01T16:00:00.000Z"), + updatedAt: DateTime.parse("2001-01-01T16:00:00.000Z"), + ); + late String reference; + + setUpAll(() async { + reference = + await File("../../../tests/test-files/Book.json").readAsString(); + }); + test("toJson()", () { + expect(input.toJsonString(), equals(reference)); + }); + test("fromJson()", () { + expect(Book.fromJsonString(reference), equals(input)); + }); + test("toUrlQueryParams()", () { + expect( + input.toUrlQueryParams(), + equals( + "id=1&name=The Adventures of Tom Sawyer&createdAt=2001-01-01T16:00:00.000Z&updatedAt=2001-01-01T16:00:00.000Z"), + ); + }); + test("== operator", () { + expect(input.copyWith(createdAt: DateTime.now()) == input, equals(false)); + expect( + input.copyWith(), + equals(input), + ); + }); + }); + + group("NestedObject", () { + final input = NestedObject(id: "1", content: "hello world"); + final specialCharsInput = NestedObject( + id: "1", + content: + "double-quote: \" | backslash: \\ | backspace: \b | form-feed: \f | newline: \n | carriage-return: \r | tab: \t | unicode: \u0000", + ); + late final String noSpecialCharsReference; + late final String specialCharsReference; + setUpAll(() async { + noSpecialCharsReference = await File( + "../../../tests/test-files/NestedObject_NoSpecialChars.json") + .readAsString(); + specialCharsReference = + await File("../../../tests/test-files/NestedObject_SpecialChars.json") + .readAsString(); + }); + test("toJsonString()", () { + expect(input.toJsonString(), equals(noSpecialCharsReference)); + expect(specialCharsInput.toJsonString(), equals(specialCharsReference)); + }); + test("fromJsonString()", () { + expect( + NestedObject.fromJsonString(noSpecialCharsReference), equals(input)); + expect(NestedObject.fromJsonString(specialCharsReference), + equals(specialCharsInput)); + }); + test("toUrlQueryParams()", () { + expect(input.toUrlQueryParams(), equals("id=1&content=hello world")); + expect( + specialCharsInput.toUrlQueryParams(), + equals( + "id=1&content=double-quote: \" | backslash: \\ | backspace: \b | form-feed: \f | newline: \n | carriage-return: \r | tab: \t | unicode: \u0000"), + ); + }); + test("== operator", () { + expect(input.copyWith(content: "hello world!") == input, equals(false)); + expect(NestedObject(id: "1", content: "hello world"), equals(input)); + }); + }); + + group("ObjectWithEveryType", () { + final input = ObjectWithEveryType( + string: "", + boolean: false, + timestamp: DateTime.parse("2001-01-01T16:00:00.000Z"), + float32: 1.5, + float64: 1.5, + int8: 1, + uint8: 1, + int16: 10, + uint16: 10, + int32: 100, + uint32: 100, + int64: BigInt.from(1000), + uint64: BigInt.from(1000), + k_enum: Enumerator.baz, + object: NestedObject(id: "1", content: "hello world"), + array: [true, false, false], + record: {"A": true, "B": false}, + discriminator: DiscriminatorC( + id: "", + name: "", + date: DateTime.parse("2001-01-01T16:00:00.000Z"), + ), + any: "hello world", + ); + late final String reference; + final String emptyReference = "{}"; + setUpAll(() async { + reference = + await File("../../../tests/test-files/ObjectWithEveryType.json") + .readAsString(); + }); + test("fromJsonString()", () { + final now = DateTime.now(); + expect(ObjectWithEveryType.fromJsonString(reference), equals(input)); + expect( + ObjectWithEveryType.fromJsonString(emptyReference).copyWith( + timestamp: now, + discriminator: DiscriminatorC.empty().copyWith( + date: now, + ), + ), + equals( + ObjectWithEveryType.empty().copyWith( + timestamp: now, + discriminator: DiscriminatorC.empty().copyWith( + date: now, + ), + ), + ), + ); + }); + test("toJsonString()", () { + expect(input.toJsonString(), equals(reference)); + }); + }); + group("ObjectWithOptionalFields", () { + final noUndefinedInput = ObjectWithOptionalFields( + string: "", + boolean: false, + timestamp: DateTime.parse("2001-01-01T16:00:00.000Z"), + float32: 1.5, + float64: 1.5, + int8: 1, + uint8: 1, + int16: 10, + uint16: 10, + int32: 100, + uint32: 100, + int64: BigInt.from(1000), + uint64: BigInt.from(1000), + k_enum: Enumerator.baz, + object: NestedObject(id: "1", content: "hello world"), + array: [true, false, false], + record: { + "A": true, + "B": false, + }, + discriminator: DiscriminatorC( + id: "", name: "", date: DateTime.parse("2001-01-01T16:00:00.000Z")), + any: "hello world", + ); + late String allUndefinedReference; + late String noUndefinedReference; + setUpAll(() async { + allUndefinedReference = await File( + "../../../tests/test-files/ObjectWithOptionalFields_AllUndefined.json") + .readAsString(); + noUndefinedReference = await File( + "../../../tests/test-files/ObjectWithOptionalFields_NoUndefined.json") + .readAsString(); + }); + test("fromJsonString()", () { + expect( + ObjectWithOptionalFields.fromJsonString(allUndefinedReference), + equals(ObjectWithOptionalFields.empty()), + ); + expect( + ObjectWithOptionalFields.fromJsonString(noUndefinedReference), + equals(noUndefinedInput), + ); + }); + test("toJson()", () { + expect( + json.encode(ObjectWithOptionalFields.empty().toJson()), + equals(allUndefinedReference), + ); + expect( + json.encode(noUndefinedInput.toJson()), + equals(noUndefinedReference), + ); + }); + test("toJsonString()", () { + expect( + ObjectWithOptionalFields.empty().toJsonString(), + equals(allUndefinedReference), + ); + expect( + noUndefinedInput.toJsonString(), + equals(noUndefinedReference), + ); + }); + test("== operator", () { + expect( + ObjectWithOptionalFields.empty(), + equals(ObjectWithOptionalFields.empty()), + ); + final newInput = ObjectWithOptionalFields( + string: "", + boolean: false, + timestamp: DateTime.parse("2001-01-01T16:00:00.000Z"), + float32: 1.5, + float64: 1.5, + int8: 1, + uint8: 1, + int16: 10, + uint16: 10, + int32: 100, + uint32: 100, + int64: BigInt.from(1000), + uint64: BigInt.from(1000), + k_enum: Enumerator.baz, + object: NestedObject(id: "1", content: "hello world"), + array: [true, false, false], + record: { + "A": true, + "B": false, + }, + discriminator: DiscriminatorC( + id: "", name: "", date: DateTime.parse("2001-01-01T16:00:00.000Z")), + any: "hello world", + ); + expect( + noUndefinedInput, + equals(newInput), + ); + expect( + noUndefinedInput == newInput.copyWith(any: () => "hello world again"), + equals(false), + ); + expect( + noUndefinedInput == newInput.copyWith(array: () => [true, true, true]), + equals(false), + ); + }); + }); +} diff --git a/languages/dart/dart-codegen-reference/project.json b/languages/dart/dart-codegen-reference/project.json index d670dc7d..3dce985a 100644 --- a/languages/dart/dart-codegen-reference/project.json +++ b/languages/dart/dart-codegen-reference/project.json @@ -17,6 +17,14 @@ "command": "dart analyze", "cwd": "languages/dart/dart-codegen-reference" } + }, + "test": { + "executor": "nx:run-commands", + "inputs": ["{projectRoot}/lib/**/*"], + "options": { + "command": "dart test ./lib/reference_client_test.dart --reporter=expanded --chain-stack-traces", + "cwd": "languages/dart/dart-codegen-reference" + } } } } diff --git a/languages/dart/dart-codegen-reference/pubspec.lock b/languages/dart/dart-codegen-reference/pubspec.lock index 843713cd..55a0a360 100644 --- a/languages/dart/dart-codegen-reference/pubspec.lock +++ b/languages/dart/dart-codegen-reference/pubspec.lock @@ -31,7 +31,7 @@ packages: path: "../dart-client" relative: true source: path - version: "0.49.1" + version: "0.51.0" async: dependency: transitive description: diff --git a/languages/dart/dart-codegen-reference/reference_client.dart b/languages/dart/dart-codegen-reference/reference_client.dart deleted file mode 100644 index 796a299f..00000000 --- a/languages/dart/dart-codegen-reference/reference_client.dart +++ /dev/null @@ -1,700 +0,0 @@ -// this file was autogenerated by arri -// ignore_for_file: type=lint, unused_field -import "dart:async"; -import "dart:convert"; -import "package:arri_client/arri_client.dart"; -import "package:http/http.dart" as http; - -class TestClient { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = "11"; - late final FutureOr> Function()? _headers; - TestClient({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - - Future getStatus() { - return parsedArriRequest( - "$_baseUrl/status", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: null, - parser: (body) => GetStatusResponse.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } - - TestClientUsersService get users { - return TestClientUsersService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } -} - -class TestClientUsersService { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = "11"; - late final FutureOr> Function()? _headers; - TestClientUsersService({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - - TestClientUsersSettingsService get settings { - return TestClientUsersSettingsService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } - - /// Get a user by id - Future getUser(UserParams params) { - return parsedArriRequest( - "$_baseUrl/users/get-user", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: params.toJson(), - parser: (body) => User.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } - - /// Update a user - Future updateUser(UpdateUserParams params) { - return parsedArriRequest( - "$_baseUrl/users/update-user", - httpClient: _httpClient, - method: HttpMethod.post, - headers: _headers, - params: params.toJson(), - parser: (body) => User.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } - - /// Watch a user - EventSource watchUser( - UserParams params, { - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, - String? lastEventId, - }) { - return parsedArriSseRequest( - "$_baseUrl/users/watch-user", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: params.toJson(), - parser: (body) => User.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, - onOpen: onOpen, - onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, - ); - } - - Future> createConnection() { - return arriWebsocketRequest( - "$_baseUrl/users/create-connection", - headers: _headers, - parser: (body) => User.fromJson(json.decode(body)), - serializer: (body) => json.encode(body.toJson()), - clientVersion: _clientVersion, - ); - } -} - -class TestClientUsersSettingsService { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = "11"; - late final FutureOr> Function()? _headers; - TestClientUsersSettingsService({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - - @deprecated - Future getUserSettings() { - return parsedArriRequest( - "$_baseUrl/users/settings/get-user-settings", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: null, - parser: (body) {}, - clientVersion: _clientVersion, - ); - } -} - -class GetStatusResponse { - final String message; - const GetStatusResponse({ - required this.message, - }); - - factory GetStatusResponse.fromJson(Map json) { - return GetStatusResponse( - message: typeFromDynamic(json["message"], ""), - ); - } - - Map toJson() { - final __result = { - "message": message, - }; - return __result; - } - - GetStatusResponse copyWith({ - String? message, - }) { - return GetStatusResponse( - message: message ?? this.message, - ); - } -} - -class User { - final String id; - final UserRole role; - - /// A profile picture - final UserPhoto? photo; - final DateTime createdAt; - final int numFollowers; - final UserSettings settings; - final UserNotification? lastNotification; - final List recentNotifications; - final Map bookmarks; - final Map metadata; - final List randomList; - final BinaryTree binaryTree; - final String? bio; - const User({ - required this.id, - required this.role, - required this.photo, - required this.createdAt, - required this.numFollowers, - required this.settings, - required this.lastNotification, - required this.recentNotifications, - required this.bookmarks, - required this.metadata, - required this.randomList, - required this.binaryTree, - this.bio, - }); - - factory User.fromJson(Map json) { - return User( - id: typeFromDynamic(json["id"], ""), - role: UserRole.fromJson(json["role"]), - photo: json["photo"] is Map - ? UserPhoto.fromJson(json["photo"]) - : null, - createdAt: dateTimeFromDynamic( - json["createdAt"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - numFollowers: intFromDynamic(json["numFollowers"], 0), - settings: UserSettings.fromJson(json["settings"]), - lastNotification: json["lastNotification"] is Map - ? UserNotification.fromJson(json["lastNotification"]) - : null, - recentNotifications: json["recentNotifications"] is List - ? - // ignore: unnecessary_cast - (json["recentNotifications"] as List) - .map((item) => UserNotification.fromJson(item)) - .toList() as List - : [], - bookmarks: json["bookmarks"] is Map - ? (json["bookmarks"] as Map).map( - (key, value) => MapEntry(key, UserBookmarksValue.fromJson(value))) - : {}, - metadata: json["metadata"] is Map - ? (json["metadata"] as Map) - .map((key, value) => MapEntry(key, value)) - : {}, - randomList: json["randomList"] is List - ? - // ignore: unnecessary_cast - (json["randomList"] as List).map((item) => item).toList() - as List - : [], - binaryTree: BinaryTree.fromJson(json["binaryTree"]), - bio: nullableTypeFromDynamic(json["bio"]), - ); - } - - Map toJson() { - final __result = { - "id": id, - "role": role.value, - "photo": photo?.toJson(), - "createdAt": createdAt.toUtc().toIso8601String(), - "numFollowers": numFollowers, - "settings": settings.toJson(), - "lastNotification": lastNotification?.toJson(), - "recentNotifications": - recentNotifications.map((item) => item.toJson()).toList(), - "bookmarks": bookmarks.map((key, value) => MapEntry(key, value.toJson())), - "metadata": metadata.map((key, value) => MapEntry(key, value)), - "randomList": randomList.map((item) => item).toList(), - "binaryTree": binaryTree.toJson(), - }; - if (bio != null) { - __result["bio"] = bio; - } - return __result; - } - - User copyWith({ - String? id, - UserRole? role, - ArriBox? photo, - DateTime? createdAt, - int? numFollowers, - UserSettings? settings, - ArriBox? lastNotification, - List? recentNotifications, - Map? bookmarks, - Map? metadata, - List? randomList, - BinaryTree? binaryTree, - ArriBox? bio, - }) { - return User( - id: id ?? this.id, - role: role ?? this.role, - photo: photo != null ? photo.value : this.photo, - createdAt: createdAt ?? this.createdAt, - numFollowers: numFollowers ?? this.numFollowers, - settings: settings ?? this.settings, - lastNotification: lastNotification != null - ? lastNotification.value - : this.lastNotification, - recentNotifications: recentNotifications ?? this.recentNotifications, - bookmarks: bookmarks ?? this.bookmarks, - metadata: metadata ?? this.metadata, - randomList: randomList ?? this.randomList, - binaryTree: binaryTree ?? this.binaryTree, - bio: bio != null ? bio.value : this.bio, - ); - } -} - -enum UserRole implements Comparable { - standard("standard"), - admin("admin"); - - const UserRole(this.value); - final String value; - - factory UserRole.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; - } - } - return standard; - } - - @override - compareTo(UserRole other) => name.compareTo(other.name); -} - -/// A profile picture -class UserPhoto { - final String url; - final double width; - final double height; - final BigInt bytes; - - /// When the photo was last updated in nanoseconds - final BigInt nanoseconds; - const UserPhoto({ - required this.url, - required this.width, - required this.height, - required this.bytes, - required this.nanoseconds, - }); - factory UserPhoto.fromJson(Map json) { - return UserPhoto( - url: typeFromDynamic(json["url"], ""), - width: doubleFromDynamic(json["width"], 0), - height: doubleFromDynamic(json["height"], 0), - bytes: bigIntFromDynamic(json["bytes"], BigInt.zero), - nanoseconds: bigIntFromDynamic(json["nanoseconds"], BigInt.zero), - ); - } - - Map toJson() { - final __result = { - "url": url, - "width": width, - "height": height, - "bytes": bytes.toString(), - "nanoseconds": nanoseconds.toString(), - }; - return __result; - } - - UserPhoto copyWith({ - String? url, - double? width, - double? height, - BigInt? bytes, - BigInt? nanoseconds, - }) { - return UserPhoto( - url: url ?? this.url, - width: width ?? this.width, - height: height ?? this.height, - bytes: bytes ?? this.bytes, - nanoseconds: nanoseconds ?? this.nanoseconds, - ); - } -} - -class UserSettings { - final bool notificationsEnabled; - @deprecated - final UserSettingsPreferredTheme preferredTheme; - const UserSettings({ - required this.notificationsEnabled, - required this.preferredTheme, - }); - factory UserSettings.fromJson(Map json) { - return UserSettings( - notificationsEnabled: - typeFromDynamic(json["notificationsEnabled"], false), - preferredTheme: - UserSettingsPreferredTheme.fromJson(json["preferredTheme"]), - ); - } - - Map toJson() { - final __result = { - "notificationsEnabled": notificationsEnabled, - "preferredTheme": preferredTheme.value, - }; - return __result; - } - - UserSettings copyWith({ - bool? notificationsEnabled, - UserSettingsPreferredTheme? preferredTheme, - }) { - return UserSettings( - notificationsEnabled: notificationsEnabled ?? this.notificationsEnabled, - preferredTheme: preferredTheme ?? this.preferredTheme, - ); - } -} - -@deprecated -enum UserSettingsPreferredTheme - implements Comparable { - darkMode("dark-mode"), - lightMode("light-mode"), - system("system"); - - const UserSettingsPreferredTheme(this.value); - final String value; - - factory UserSettingsPreferredTheme.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; - } - } - return darkMode; - } - - @override - compareTo(UserSettingsPreferredTheme other) => name.compareTo(other.name); -} - -sealed class UserNotification { - final String notificationType; - const UserNotification({ - required this.notificationType, - }); - - factory UserNotification.fromJson(Map json) { - if (json["notificationType"] is! String) { - throw Exception( - "Unable to decode UserNotification. Expected String from \"notificationType\". Received ${json["notificationType"]}}", - ); - } - switch (json["notificationType"]) { - case "POST_LIKE": - return UserNotificationPostLike.fromJson(json); - case "POST_COMMENT": - return UserNotificationPostComment.fromJson(json); - } - throw Exception( - "Unable to decode UserNotification. \"${json["notificationType"]}\" doesn't match any of the accepted discriminator values.", - ); - } - - Map toJson(); -} - -class UserNotificationPostLike implements UserNotification { - @override - final String notificationType = "POST_LIKE"; - final String postId; - final String userId; - const UserNotificationPostLike({ - required this.postId, - required this.userId, - }); - - factory UserNotificationPostLike.fromJson(Map json) { - return UserNotificationPostLike( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), - ); - } - - @override - Map toJson() { - final __result = { - "notificationType": notificationType, - "postId": postId, - "userId": userId, - }; - return __result; - } - - UserNotificationPostLike copyWith({ - String? postId, - String? userId, - }) { - return UserNotificationPostLike( - postId: postId ?? this.postId, - userId: userId ?? this.userId, - ); - } -} - -class UserNotificationPostComment implements UserNotification { - @override - final String notificationType = "POST_COMMENT"; - final String postId; - final String userId; - final String commentText; - const UserNotificationPostComment({ - required this.postId, - required this.userId, - required this.commentText, - }); - - factory UserNotificationPostComment.fromJson(Map json) { - return UserNotificationPostComment( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), - commentText: typeFromDynamic(json["commentText"], ""), - ); - } - - @override - Map toJson() { - final __result = { - "notificationType": notificationType, - "postId": postId, - "userId": userId, - "commentText": commentText, - }; - return __result; - } - - UserNotificationPostComment copyWith({ - String? postId, - String? userId, - String? commentText, - }) { - return UserNotificationPostComment( - postId: postId ?? this.postId, - userId: userId ?? this.userId, - commentText: commentText ?? this.commentText, - ); - } -} - -class UserBookmarksValue { - final String postId; - final String userId; - const UserBookmarksValue({ - required this.postId, - required this.userId, - }); - factory UserBookmarksValue.fromJson(Map json) { - return UserBookmarksValue( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), - ); - } - Map toJson() { - final __result = { - "postId": postId, - "userId": userId, - }; - return __result; - } - - UserBookmarksValue copyWith({ - String? postId, - String? userId, - }) { - return UserBookmarksValue( - postId: postId ?? this.postId, - userId: userId ?? this.userId, - ); - } -} - -class BinaryTree { - final BinaryTree? left; - final BinaryTree? right; - const BinaryTree({ - required this.left, - required this.right, - }); - factory BinaryTree.fromJson(Map json) { - return BinaryTree( - left: json["left"] is Map - ? BinaryTree.fromJson(json["left"]) - : null, - right: json["right"] is Map - ? BinaryTree.fromJson(json["right"]) - : null, - ); - } - Map toJson() { - final __result = { - "left": left?.toJson(), - "right": right?.toJson(), - }; - return __result; - } - - BinaryTree copyWith({ - ArriBox? left, - ArriBox? right, - }) { - return BinaryTree( - left: left != null ? left.value : this.left, - right: right != null ? right.value : this.right, - ); - } -} - -class UserParams { - final String userId; - const UserParams({ - required this.userId, - }); - factory UserParams.fromJson(Map json) { - return UserParams( - userId: typeFromDynamic(json["userId"], ""), - ); - } - - Map toJson() { - final __result = { - "userId": userId, - }; - return __result; - } - - UserParams copyWith({ - String? userId, - }) { - return UserParams( - userId: userId ?? this.userId, - ); - } -} - -class UpdateUserParams { - final String id; - - /// A profile picture - final UserPhoto? photo; - final String? bio; - const UpdateUserParams({ - required this.id, - required this.photo, - this.bio, - }); - factory UpdateUserParams.fromJson(Map json) { - return UpdateUserParams( - id: typeFromDynamic(json["id"], ""), - photo: json["photo"] is Map - ? UserPhoto.fromJson(json["photo"]) - : null, - bio: nullableTypeFromDynamic(json["bio"]), - ); - } - - Map toJson() { - final __result = { - "id": id, - "photo": photo?.toJson(), - }; - if (bio != null) { - __result["bio"] = bio; - } - return __result; - } - - UpdateUserParams copyWith({ - String? id, - ArriBox? photo, - ArriBox? bio, - }) { - return UpdateUserParams( - id: id ?? this.id, - photo: photo != null ? photo.value : this.photo, - bio: bio != null ? bio.value : this.bio, - ); - } -} diff --git a/languages/dart/dart-codegen/README.md b/languages/dart/dart-codegen/README.md index 13f1a403..74d32e68 100644 --- a/languages/dart/dart-codegen/README.md +++ b/languages/dart/dart-codegen/README.md @@ -1,11 +1,108 @@ -# arri-codegen-dart +# Arri Dart Codegen + +## Setup + +### 1) Add the generator to your arri config + +```ts +// arri.config.ts +import { defineConfig, generators } from "arri"; + +export default defineConfig({ + generators: [ + generators.dartClient({ + clientName: "MyClient", + outputFile: "./client/src/my_client.g.dart", + }), + ], +}); +``` + +**Options:** + +| Name | Description | +| --------------------- | ------------------------------------------------------------- | +| clientName | The name of the generated client class (Defaults to "Client") | +| outputFile (required) | Path to the file that will be created by the generator | +| format | Run `dart format` on the generated file (Defaults to `true`) | +| modelPrefix | Add a prefix to the generated class names | + +### 2) Install the Dart client library + +The generated code relies on the Dart [arri_client](/languages/dart/dart-client/README.md) library. So be sure to install it wherever the generated code is being used. The version number should match your Arri CLI version. (run `arri version` to check). + +```bash +dart pub add arri_client +``` + +## Using the Generated Code + +### Initialize the client + +```dart +// this will match whatever you put in the arri config +import "./my_client.g.dart"; + +main() async { + final client = MyClient( + baseUrl: "https://example.com", + headers: () async { + return { + "Authorization": "", + }; + }, + ); + await client.myProcedure(); +} +``` + +The root client will be a class containing all of the services and procedures in a single class. If you only need a particular service, you can initialize just that service. + +```dart +final service = MyClientUsersService( + baseUrl: "https://example.com", + headers: () async { + return { + "Authorization": "", + }; + }, +); +``` + +### Using Arri Models + +All generated models will be immutable. They will have access to the following features: + +**Methods**: + +- `Map toJson()` +- `String toJsonString()` +- `String toUrlQueryParams()` +- `copyWith()` + +**Factory Methods**: + +- `empty()` +- `fromJson(Map input)` +- `fromJsonString(String input)` + +**Overrides**: + +- `==` operator (allows for deep equality checking) +- `hashMap` (allows for deep equality checking) +- `toString` (will print out all properties and values instead of `Instance of X`) This library was generated with [Nx](https://nx.dev). -## Building +## Development -Run `nx build arri-codegen-dart` to build the library. +```bash +# build the library +pnpm nx build codegen-dart -## Running unit tests +# test +pnpm nx test codegen-dart -Run `nx test arri-codegen-dart` to execute the unit tests via [Vitest](https://vitest.dev). +# lint +pnpm nx lint codegen-dart +``` diff --git a/languages/dart/dart-codegen/build.config.ts b/languages/dart/dart-codegen/build.config.ts index 2cf0c050..4c0291c7 100644 --- a/languages/dart/dart-codegen/build.config.ts +++ b/languages/dart/dart-codegen/build.config.ts @@ -12,7 +12,7 @@ const packageJson = JSON.parse( const deps = Object.keys(packageJson.dependencies as Record); export default defineBuildConfig({ - entries: ["./src/index"], + entries: [{ input: "./src/_index.ts", name: "index" }], rollup: { emitCJS: true, dts: { diff --git a/languages/dart/dart-codegen/package.json b/languages/dart/dart-codegen/package.json index 85e03251..87c01a67 100644 --- a/languages/dart/dart-codegen/package.json +++ b/languages/dart/dart-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-dart", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -16,6 +16,7 @@ "files": ["dist"], "dependencies": { "@arrirpc/codegen-utils": "workspace:*", - "@arrirpc/schema": "workspace:*" + "@arrirpc/schema": "workspace:*", + "pathe": "^1.1.2" } } diff --git a/languages/dart/dart-codegen/project.json b/languages/dart/dart-codegen/project.json index 8a42f40c..be4d8e85 100644 --- a/languages/dart/dart-codegen/project.json +++ b/languages/dart/dart-codegen/project.json @@ -22,21 +22,29 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint languages/dart/dart-codegen" + } }, "test": { "executor": "@nx/vite:test", "inputs": [ "{projectRoot}/src", - "{workspaceRoot}/languages/dart/dart-codegen-reference/reference_client.dart" + "{workspaceRoot}/languages/dart/dart-codegen-reference/lib/reference_client.dart" ], - "outputs": ["{workspaceRoot}/coverage/languages/dart/dart-codegen"], + "outputs": ["{projectRoot}/.temp/test-results"], "options": { "passWithNoTests": true, "reportsDirectory": "../../coverage/languages/dart/dart-codegen" } }, + "show-test-results": { + "executor": "nx:run-commands", + "options": { + "command": "pnpm vite preview --outDir languages/dart/dart-codegen/.temp/test-results" + } + }, "typecheck": { "executor": "nx:run-commands", "options": { diff --git a/languages/dart/dart-codegen/src/_common.ts b/languages/dart/dart-codegen/src/_common.ts new file mode 100644 index 00000000..44cceed2 --- /dev/null +++ b/languages/dart/dart-codegen/src/_common.ts @@ -0,0 +1,199 @@ +import { + camelCase, + pascalCase, + removeDisallowedChars, + Schema, +} from "@arrirpc/codegen-utils"; + +export interface CodegenContext { + clientName: string; + modelPrefix: string; + generatedTypes: string[]; + instancePath: string; + schemaPath: string; + clientVersion?: string; + isOptional?: boolean; + discriminatorParentId?: string; + discriminatorValue?: string; + discriminatorKey?: string; +} + +export interface DartProperty { + typeName: string; + isNullable: boolean; + content: string; + defaultValue: string; + fromJson: (input: string, key?: string) => string; + toJson: (input: string, target: string, key: string) => string; + toQueryString: (input: string, target: string, key: string) => string; +} + +export function outputIsNullable(schema: Schema, context: CodegenContext) { + if (schema.nullable) { + return true; + } + if (context.isOptional) { + return true; + } + return false; +} + +const reservedIdentifierKeywords: Record = { + abstract: 2, + as: 2, + assert: 0, + async: 3, + await: 1, + base: 3, + break: 0, + case: 0, + catch: 0, + class: 0, + const: 0, + continue: 0, + covariant: 2, + default: 0, + deferred: 2, + do: 0, + dynamic: 2, + else: 0, + enum: 0, + export: 2, + extends: 0, + extension: 2, + external: 2, + factory: 2, + false: 0, + final: 0, + finally: 0, + for: 0, + Function: 2, + get: 2, + hide: 3, + if: 0, + implements: 2, + import: 2, + in: 0, + interface: 2, + is: 0, + late: 2, + library: 2, + mixin: 2, + new: 0, + null: 0, + of: 3, + on: 3, + operator: 2, + part: 2, + required: 2, + rethrow: 0, + return: 0, + sealed: 3, + set: 2, + show: 3, + static: 2, + super: 0, + switch: 0, + sync: 3, + this: 0, + throw: 0, + true: 0, + try: 0, + type: 2, + typedef: 2, + var: 0, + void: 0, + when: 3, + with: 0, + while: 0, + yield: 1, +}; + +export function canUseIdentifier(input: string) { + const reservedId = reservedIdentifierKeywords[input]; + if (typeof reservedId === "undefined") { + return true; + } + switch (reservedId) { + case 0: + return false; + case 1: + return true; + case 2: + return true; + case 3: + return true; + default: + reservedId satisfies never; + throw new Error("Unhandled case"); + } +} + +export function sanitizeIdentifier(input: string): string { + const bannedCharacters = "!@#$%^&*()-=+[{}]\\|/?.><,;`~"; + const result = removeDisallowedChars(input, bannedCharacters); + const numbers = "0123456789"; + if (numbers.includes(result.charAt(0))) { + return `k_${result}`; + } + return result; +} + +export function canUseClassName(input: string) { + const reservedId = reservedIdentifierKeywords[input]; + if (typeof reservedId === "undefined") { + return true; + } + switch (reservedId) { + case 0: + return false; + case 1: + return false; + case 2: + return false; + case 3: + return true; + default: + reservedId satisfies never; + throw new Error("Unhandled case"); + } +} + +export function validDartIdentifier(input: string): string { + const finalIdentifier = sanitizeIdentifier( + camelCase(input, { normalize: true }), + ); + if (!canUseIdentifier(finalIdentifier)) { + return `k_${finalIdentifier}`; + } + return finalIdentifier; +} + +export function validDartClassName(input: string, modelPrefix: string): string { + const className = sanitizeIdentifier( + pascalCase(input, { normalize: true }), + ); + if (canUseClassName(className) || modelPrefix.length) { + return className; + } + return `Class${className}`; +} + +export function getDartClassName( + schema: Schema, + context: CodegenContext, +): string { + if (schema.metadata?.id) { + return validDartClassName(schema.metadata.id, context.modelPrefix); + } + if (context.discriminatorParentId) { + return validDartClassName( + `${context.discriminatorParentId}_${context.discriminatorValue}`, + context.modelPrefix, + ); + } + return validDartClassName( + context.instancePath.split("/").join("_"), + context.modelPrefix, + ); +} diff --git a/languages/dart/dart-codegen/src/_index.test.ts b/languages/dart/dart-codegen/src/_index.test.ts new file mode 100644 index 00000000..f4073645 --- /dev/null +++ b/languages/dart/dart-codegen/src/_index.test.ts @@ -0,0 +1,41 @@ +import { execSync } from "node:child_process"; +import { existsSync } from "node:fs"; +import fs from "node:fs/promises"; + +import { normalizeWhitespace } from "@arrirpc/codegen-utils"; +import path from "pathe"; + +import { createDartClient } from "./_index"; + +const tempDir = path.resolve(__dirname, "../.temp"); +beforeAll(async () => { + if (!existsSync(tempDir)) { + await fs.mkdir(tempDir); + } +}); + +test("Results match reference client", async () => { + const appDef = JSON.parse( + await fs.readFile( + path.resolve( + __dirname, + "../../../../tests/test-files/AppDefinition.json", + ), + "utf8", + ), + ); + const outputFile = path.resolve(tempDir, "dart_client.g.dart"); + const referenceFile = path.resolve( + __dirname, + "../../dart-codegen-reference/lib/reference_client.dart", + ); + const fileContent = createDartClient(appDef, { + clientName: "ExampleClient", + outputFile: path.resolve(__dirname, "../.temp/dart_client.g.dart"), + }); + await fs.writeFile(outputFile, fileContent); + execSync(`dart format ${outputFile}`, { stdio: "inherit" }); + const result = await fs.readFile(outputFile, "utf8"); + const reference = await fs.readFile(referenceFile, "utf8"); + expect(normalizeWhitespace(result)).toBe(normalizeWhitespace(reference)); +}); diff --git a/languages/dart/dart-codegen/src/_index.ts b/languages/dart/dart-codegen/src/_index.ts new file mode 100644 index 00000000..e48a054d --- /dev/null +++ b/languages/dart/dart-codegen/src/_index.ts @@ -0,0 +1,252 @@ +import { execSync } from "node:child_process"; +import fs from "node:fs/promises"; + +import { + AppDefinition, + defineGeneratorPlugin, + isRpcDefinition, + isSchemaFormDiscriminator, + isSchemaFormElements, + isSchemaFormEnum, + isSchemaFormProperties, + isSchemaFormRef, + isSchemaFormType, + isSchemaFormValues, + isServiceDefinition, + Schema, + unflattenProcedures, +} from "@arrirpc/codegen-utils"; +import path from "pathe"; + +import { + CodegenContext, + DartProperty, + validDartClassName, + validDartIdentifier, +} from "./_common"; +import { dartAnyFromSchema } from "./any"; +import { dartListFromSchema } from "./array"; +import { dartSealedClassFromSchema } from "./discriminator"; +import { dartEnumFromSchema } from "./enum"; +import { dartClassFromSchema } from "./object"; +import { + dartBigIntFromSchema, + dartBoolFromSchema, + dartDateTimeFromSchema, + dartDoubleFromSchema, + dartIntFromSchema, + dartStringFromSchema, +} from "./primitives"; +import { + dartRpcFromSchema, + dartServiceFromSchema, + getServiceName, +} from "./procedures"; +import { dartMapFromSchema } from "./record"; +import { dartRefFromSchema } from "./ref"; + +export interface DartClientGeneratorOptions { + outputFile: string; + clientName?: string; + modelPrefix?: string; + format?: boolean; +} + +export const dartClientGenerator = defineGeneratorPlugin( + (options: DartClientGeneratorOptions) => { + return { + async generator(def) { + if (!options.outputFile) { + throw new Error( + 'Missing "outputFile" cannot generate dart code', + ); + } + try { + const result = createDartClient(def, options); + const destination = path.resolve(options.outputFile); + await fs.writeFile(destination, result); + if (options.format !== false) { + execSync(`dart format ${destination}`, { + stdio: "inherit", + }); + } + } catch (err) { + console.error(err); + } + }, + options, + }; + }, +); + +export function createDartClient( + def: AppDefinition, + options: DartClientGeneratorOptions, +) { + const typeParts: string[] = []; + const context: CodegenContext = { + clientName: options.clientName ?? "Client", + modelPrefix: options.modelPrefix ?? "", + generatedTypes: [], + instancePath: "", + schemaPath: "", + clientVersion: def.info?.version, + }; + const services = unflattenProcedures(def.procedures); + const subServices: { key: string; name: string }[] = []; + const subServiceParts: string[] = []; + const rpcParts: string[] = []; + for (const key of Object.keys(services)) { + const subSchema = services[key]!; + if (isServiceDefinition(subSchema)) { + const service = dartServiceFromSchema(subSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: key, + schemaPath: `procedures.${key}`, + clientVersion: context.clientVersion, + }); + if (service) { + subServiceParts.push(service); + subServices.push({ + key: validDartIdentifier(key), + name: getServiceName(key, context.clientName), + }); + } + continue; + } + if (isRpcDefinition(subSchema)) { + const rpc = dartRpcFromSchema(subSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: key, + schemaPath: `procedures.${key}`, + }); + if (rpc) { + rpcParts.push(rpc); + } + continue; + } + console.warn(`Unknown schema in procedures at "${key}"`); + } + + for (const key of Object.keys(def.definitions)) { + const subDef = def.definitions[key]!; + const result = dartTypeFromSchema(subDef, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `/${key}`, + schemaPath: `/${key}`, + }); + if (result.content) { + typeParts.push(result.content); + } + } + if (rpcParts.length === 0 && subServiceParts.length === 0) { + const heading = `// this file was autogenerated by arri +// ignore_for_file: type=lint, unused_field, unnecessary_cast +import 'dart:convert'; +import 'package:arri_client/arri_client.dart';`; + + return `${heading} + +${typeParts.join("\n\n")}`; + } + const clientName = validDartClassName(context.clientName, ""); + return `// this file was autogenerated by arri +// ignore_for_file: type=lint, unused_field, unnecessary_cast +import 'dart:async'; +import 'dart:convert'; +import 'package:arri_client/arri_client.dart'; +import 'package:http/http.dart' as http; + +class ${clientName} { + final http.Client? _httpClient; + final String _baseUrl; + final String _clientVersion = "${context.clientVersion ?? ""}"; + late final FutureOr> Function()? _headers; + ${clientName}({ + http.Client? httpClient, + required String baseUrl, + FutureOr> Function()? headers, + }) : _httpClient = httpClient, + _baseUrl = baseUrl, + _headers = headers; + + ${rpcParts.join("\n\n")} + +${subServices + .map( + (service) => ` ${service.name} get ${service.key} => ${service.name}( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + );`, + ) + .join("\n\n")} +} + +${subServiceParts.join("\n\n")} + +${typeParts.join("\n\n")}`; +} + +export function dartTypeFromSchema( + schema: Schema, + context: CodegenContext, +): DartProperty { + if (isSchemaFormType(schema)) { + switch (schema.type) { + case "string": + return dartStringFromSchema(schema, context); + case "boolean": + return dartBoolFromSchema(schema, context); + case "timestamp": + return dartDateTimeFromSchema(schema, context); + case "float32": + case "float64": + return dartDoubleFromSchema(schema, context); + case "int8": + case "uint8": + case "int16": + case "uint16": + case "int32": + case "uint32": + return dartIntFromSchema(schema, context); + case "int64": + case "uint64": + return dartBigIntFromSchema(schema, context); + default: + schema.type satisfies never; + throw new Error(`Unhandled schema.type ${schema.type}`); + } + } + if (isSchemaFormEnum(schema)) { + return dartEnumFromSchema(schema, context); + } + + if (isSchemaFormProperties(schema)) { + return dartClassFromSchema(schema, context); + } + + if (isSchemaFormElements(schema)) { + return dartListFromSchema(schema, context); + } + + if (isSchemaFormValues(schema)) { + return dartMapFromSchema(schema, context); + } + + if (isSchemaFormDiscriminator(schema)) { + return dartSealedClassFromSchema(schema, context); + } + + if (isSchemaFormRef(schema)) { + return dartRefFromSchema(schema, context); + } + + return dartAnyFromSchema(schema, context); +} diff --git a/languages/dart/dart-codegen/src/any.ts b/languages/dart/dart-codegen/src/any.ts new file mode 100644 index 00000000..9a1877f6 --- /dev/null +++ b/languages/dart/dart-codegen/src/any.ts @@ -0,0 +1,27 @@ +import { SchemaFormEmpty } from "@arrirpc/codegen-utils"; + +import { CodegenContext, DartProperty, outputIsNullable } from "./_common"; + +export function dartAnyFromSchema( + schema: SchemaFormEmpty, + context: CodegenContext, +): DartProperty { + const typeName = `dynamic`; + const isNullable = outputIsNullable(schema, context); + const defaultValue = `null`; + return { + typeName, + isNullable: isNullable, + defaultValue, + fromJson(input) { + return `${input}`; + }, + toJson(input) { + return input; + }, + toQueryString() { + return `print("[WARNING] any's cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: "", + }; +} diff --git a/languages/dart/dart-codegen/src/array.ts b/languages/dart/dart-codegen/src/array.ts new file mode 100644 index 00000000..87af138e --- /dev/null +++ b/languages/dart/dart-codegen/src/array.ts @@ -0,0 +1,55 @@ +import { SchemaFormElements } from "@arrirpc/codegen-utils"; + +import { CodegenContext, DartProperty, outputIsNullable } from "./_common"; +import { dartTypeFromSchema } from "./_index"; + +export function dartListFromSchema( + schema: SchemaFormElements, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const innerType = dartTypeFromSchema(schema.elements, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `${context.instancePath}/[Element]`, + schemaPath: `${context.schemaPath}/elements`, + }); + const typeName = isNullable + ? `List<${innerType.typeName}>?` + : `List<${innerType.typeName}>`; + const defaultValue = isNullable ? "null" : "[]"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input) { + if (isNullable) { + return `${input} is List + ? (${input} as List) + .map((_el_) => ${innerType.fromJson(`_el_`)}) + .toList() + : null`; + } + return `${input} is List + ? (${input} as List) + .map((_el_) => ${innerType.fromJson(`_el_`)}) + .toList() + : <${innerType.typeName}>[]`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.map((_el_) => ${innerType.toJson("_el_", "", "")}).toList()`; + } + if (schema.nullable) { + return `${input}?.map((_el_) => ${innerType.toJson("_el_", "", "")}).toList()`; + } + return `${input}.map((_el_) => ${innerType.toJson("_el_", "", "")}).toList()`; + }, + toQueryString() { + return `print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: innerType.content, + }; +} diff --git a/languages/dart/dart-codegen/src/discriminator.ts b/languages/dart/dart-codegen/src/discriminator.ts new file mode 100644 index 00000000..f92ede25 --- /dev/null +++ b/languages/dart/dart-codegen/src/discriminator.ts @@ -0,0 +1,108 @@ +import { SchemaFormDiscriminator } from "@arrirpc/codegen-utils"; + +import { + CodegenContext, + DartProperty, + getDartClassName, + outputIsNullable, + validDartIdentifier, +} from "./_common"; +import { dartClassFromSchema } from "./object"; + +export function dartSealedClassFromSchema( + schema: SchemaFormDiscriminator, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const className = getDartClassName(schema, context); + const finalClassName = `${context.modelPrefix}${className}`; + const typeName = isNullable ? `${finalClassName}?` : finalClassName; + const defaultValue = isNullable ? `null` : `${finalClassName}.empty()`; + const discriminatorKey = schema.discriminator; + const subTypeParts: { name: string; value: string }[] = []; + const subContentParts: string[] = []; + for (const key of Object.keys(schema.mapping)) { + const subSchema = schema.mapping[key]!; + const discriminatorValue = key; + const subTypeResult = dartClassFromSchema(subSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: context.instancePath, + schemaPath: `${context.schemaPath}/mapping/${key}`, + discriminatorKey, + discriminatorValue, + discriminatorParentId: className, + }); + subTypeParts.push({ + name: subTypeResult.typeName, + value: discriminatorValue, + }); + if (subTypeResult.content) { + subContentParts.push(subTypeResult.content); + } + } + const result: DartProperty = { + typeName, + isNullable, + defaultValue, + fromJson(input) { + if (isNullable) { + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : null`; + } + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : ${finalClassName}.empty()`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.toJson()`; + } + if (schema.nullable) { + return `${input}?.toJson()`; + } + return `${input}.toJson()`; + }, + toQueryString() { + return `print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: "", + }; + if (context.generatedTypes.includes(className)) { + return result; + } + const discriminatorProp = validDartIdentifier(schema.discriminator); + result.content = `sealed class ${finalClassName} implements ArriModel { + String get ${discriminatorProp}; + const ${finalClassName}(); + + factory ${finalClassName}.empty() { + return ${subTypeParts[0]?.name}.empty(); + } + + factory ${finalClassName}.fromJson(Map _input_) { + final ${discriminatorProp} = typeFromDynamic(_input_["${schema.discriminator}"], ""); + switch (${discriminatorProp}) { +${subTypeParts + .map( + (type) => ` case "${type.value}": + return ${type.name}.fromJson(_input_);`, + ) + .join("\n")} + default: + return ${finalClassName}.empty(); + } + } + + factory ${finalClassName}.fromJsonString(String input) { + return ${finalClassName}.fromJson(json.decode(input)); + } +} + +${subContentParts.join("\n\n")}`; + context.generatedTypes.push(className); + return result; +} diff --git a/languages/dart/dart-codegen/src/enum.ts b/languages/dart/dart-codegen/src/enum.ts new file mode 100644 index 00000000..6b15df4b --- /dev/null +++ b/languages/dart/dart-codegen/src/enum.ts @@ -0,0 +1,82 @@ +import { camelCase, SchemaFormEnum } from "@arrirpc/codegen-utils"; + +import { + CodegenContext, + DartProperty, + getDartClassName, + outputIsNullable, +} from "./_common"; + +export function dartEnumFromSchema( + schema: SchemaFormEnum, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const enumName = getDartClassName(schema, context); + const typeName = isNullable ? `${enumName}?` : enumName; + const enumValues = schema.enum.map((val) => ({ + name: camelCase(val, { normalize: true }), + serialValue: val, + })); + if (!enumValues.length) { + throw new Error( + `Enum schemas must have at least one enum value. At ${context.instancePath}.`, + ); + } + const defaultValue = isNullable + ? "null" + : `${context.modelPrefix}${enumName}.${enumValues[0]?.name}`; + const output: DartProperty = { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `${input} is String ? ${context.modelPrefix}${enumName}.fromString(${input}) : null`; + } + return `${context.modelPrefix}${enumName}.fromString(typeFromDynamic(${input}, ""))`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.serialValue`; + } + if (schema.nullable) { + return `${input}?.serialValue`; + } + return `${input}.serialValue`; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=\${${input}!.serialValue}")`; + } + if (schema.nullable) { + return `${target}.add("${key}=\${${input}?.serialValue}")`; + } + return `${target}.add("${key}=\${${input}.serialValue}")`; + }, + content: "", + }; + if (context.generatedTypes.includes(enumName)) { + return output; + } + output.content = `enum ${context.modelPrefix}${enumName} implements Comparable<${context.modelPrefix}${enumName}> { +${enumValues.map((val) => ` ${val.name}("${val.serialValue}")`).join(",\n")}; + + const ${context.modelPrefix}${enumName}(this.serialValue); + final String serialValue; + + factory ${context.modelPrefix}${enumName}.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; + } + } + return ${enumValues[0]!.name}; + } + + @override + int compareTo(${enumName} other) => name.compareTo(other.name); +}`; + context.generatedTypes.push(enumName); + return output; +} diff --git a/languages/dart/dart-codegen/src/index.test.ts b/languages/dart/dart-codegen/src/index.test.ts deleted file mode 100644 index 1dd45599..00000000 --- a/languages/dart/dart-codegen/src/index.test.ts +++ /dev/null @@ -1,561 +0,0 @@ -import { normalizeWhitespace } from "@arrirpc/codegen-utils"; -import { TestAppDefinition } from "@arrirpc/codegen-utils/dist/testModels"; -import { a } from "@arrirpc/schema"; -import { execSync } from "child_process"; -import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; -import path from "pathe"; -import { test } from "vitest"; - -import { - createDartClient, - dartClassFromJtdSchema, - dartServiceFromDefinition, - dartTypeFromJtdSchema, -} from "."; - -describe("Service Generation", () => { - test("Service Generation", () => { - const result = dartServiceFromDefinition( - "User", - { - getUser: { - transport: "http", - path: "/users/get-user", - method: "get", - params: "UsersGetUserParams", - response: "User", - }, - updateUser: { - transport: "http", - path: "/users/update-user", - method: "post", - params: "UserUpdateData", - response: "User", - }, - settings: { - getUserSettings: { - transport: "http", - path: "/users/settings/get-user-settings", - method: "get", - params: "UserSettingsGetUserSettingsParams", - response: "UserSettingsGetUserSettingsResponse", - }, - }, - }, - { clientName: "", outputFile: "", versionNumber: "" }, - ); - expect(normalizeWhitespace(result)).toBe( - normalizeWhitespace(`class UserService { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = ""; - late final FutureOr> Function()? _headers; - UserService({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - UserSettingsService get settings { - return UserSettingsService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } - Future getUser(UsersGetUserParams params) { - return parsedArriRequest( - "$_baseUrl/users/get-user", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: params.toJson(), - parser: (body) => User.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } - Future updateUser(UserUpdateData params) { - return parsedArriRequest( - "$_baseUrl/users/update-user", - httpClient: _httpClient, - method: HttpMethod.post, - headers: _headers, - params: params.toJson(), - parser: (body) => User.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } -} -class UserSettingsService { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = ""; - late final FutureOr> Function()? _headers; - UserSettingsService({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - - Future getUserSettings(UserSettingsGetUserSettingsParams params) { - return parsedArriRequest( - "$_baseUrl/users/settings/get-user-settings", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: params.toJson(), - parser: (body) => UserSettingsGetUserSettingsResponse.fromJson( - json.decode(body), - ), - clientVersion: _clientVersion, - ); - } -}`), - ); - }); - - test("Service with No Params", () => { - const result = dartServiceFromDefinition( - "Posts", - { - getPost: { - transport: "http", - path: "/posts/get-post", - method: "get", - params: undefined, - response: undefined, - }, - }, - { clientName: "", outputFile: "", versionNumber: "" }, - ); - expect(normalizeWhitespace(result)).toBe( - normalizeWhitespace(`class PostsService { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = ""; - late final FutureOr> Function()? _headers; - PostsService({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - - Future getPost() { - return parsedArriRequest( - "$_baseUrl/posts/get-post", - httpClient: _httpClient, - method: HttpMethod.get, - headers: _headers, - params: null, - parser: (body) {}, - clientVersion: _clientVersion, - ); - } - }`), - ); - }); -}); - -describe("Model Generation", () => { - it("Generates a basic class with scalar fields", () => { - const User = a.object({ - id: a.string(), - name: a.string(), - email: a.optional(a.string()), - count: a.int32(), - createdAt: a.timestamp(), - lastSignedIn: a.nullable(a.timestamp()), - }); - const result = dartClassFromJtdSchema("User", User, { - isOptional: false, - existingClassNames: [], - }); - expect(normalizeWhitespace(result.content)).toBe( - normalizeWhitespace(` - class User { - final String id; - final String name; - final int count; - final DateTime createdAt; - final DateTime? lastSignedIn; - final String? email; - const User({ - required this.id, - required this.name, - required this.count, - required this.createdAt, - required this.lastSignedIn, - this.email, - }); - factory User.fromJson(Map json) { - return User( - id: typeFromDynamic(json["id"], ""), - name: typeFromDynamic(json["name"], ""), - count: intFromDynamic(json["count"], 0), - createdAt: dateTimeFromDynamic( - json["createdAt"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - lastSignedIn: nullableDateTimeFromDynamic(json["lastSignedIn"]), - email: nullableTypeFromDynamic(json["email"]), - ); - } - Map toJson() { - final __result = { - "id": id, - "name": name, - "count": count, - "createdAt": createdAt.toUtc().toIso8601String(), - "lastSignedIn": lastSignedIn?.toUtc().toIso8601String(), - }; - if (email != null) { - __result["email"] = email; - } - return __result; - } - User copyWith({ - String? id, - String? name, - int? count, - DateTime? createdAt, - ArriBox? lastSignedIn, - ArriBox? email, - }) { - return User( - id: id ?? this.id, - name: name ?? this.name, - count: count ?? this.count, - createdAt: createdAt ?? this.createdAt, - lastSignedIn: lastSignedIn != null ? lastSignedIn.value : this.lastSignedIn, - email: email != null ? email.value : this.email, - ); - } - } - `), - ); - }); - - it("Generates Classes with Nested Objects and Arrays", () => { - const User = a.object({ - id: a.string(), - createdAt: a.timestamp(), - followers: a.array( - a.object({ - id: a.string(), - followedTime: a.timestamp(), - }), - ), - settings: a.object({ - notifications: a.boolean(), - theme: a.stringEnum([ - "dark-mode", - "light-mode", - "system-default", - ]), - }), - }); - const result = dartClassFromJtdSchema("User", User, { - isOptional: false, - existingClassNames: [], - }); - expect(normalizeWhitespace(result.content)).toBe( - normalizeWhitespace(` - class User { - final String id; - final DateTime createdAt; - final List followers; - final UserSettings settings; - const User({ - required this.id, - required this.createdAt, - required this.followers, - required this.settings, - }); - factory User.fromJson(Map json) { - return User( - id: typeFromDynamic(json["id"], ""), - createdAt: dateTimeFromDynamic( - json["createdAt"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - followers: json["followers"] is List ? - // ignore: unnecessary_cast - (json["followers"] as List).map((item) => UserFollowersItem.fromJson(item)).toList() as List : [], - settings: UserSettings.fromJson(json["settings"]), - ); - } - Map toJson() { - final __result = { - "id": id, - "createdAt": createdAt.toUtc().toIso8601String(), - "followers": followers.map((item) => item.toJson()).toList(), - "settings": settings.toJson(), - }; - return __result; - } - User copyWith({ - String? id, - DateTime? createdAt, - List? followers, - UserSettings? settings, - }) { - return User( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - followers: followers ?? this.followers, - settings: settings ?? this.settings, - ); - } - } - class UserFollowersItem { - final String id; - final DateTime followedTime; - const UserFollowersItem({ - required this.id, - required this.followedTime, - }); - factory UserFollowersItem.fromJson(Map json) { - return UserFollowersItem( - id: typeFromDynamic(json["id"], ""), - followedTime: dateTimeFromDynamic( - json["followedTime"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - ); - } - Map toJson() { - final __result = { - "id": id, - "followedTime": followedTime.toUtc().toIso8601String(), - }; - return __result; - } - UserFollowersItem copyWith({ - String? id, - DateTime? followedTime, - }) { - return UserFollowersItem( - id: id ?? this.id, - followedTime: followedTime ?? this.followedTime, - ); - } - } - class UserSettings { - final bool notifications; - final UserSettingsTheme theme; - const UserSettings({ - required this.notifications, - required this.theme, - }); - factory UserSettings.fromJson(Map json) { - return UserSettings( - notifications: typeFromDynamic(json["notifications"], false), - theme: UserSettingsTheme.fromJson(json["theme"]), - ); - } - Map toJson() { - final __result = { - "notifications": notifications, - "theme": theme.value, - }; - return __result; - } - UserSettings copyWith({ - bool? notifications, - UserSettingsTheme? theme, - }) { - return UserSettings( - notifications: notifications ?? this.notifications, - theme: theme ?? this.theme, - ); - } - } - enum UserSettingsTheme implements Comparable { - darkMode("dark-mode"), - lightMode("light-mode"), - systemDefault("system-default"); - const UserSettingsTheme(this.value); - final String value; - factory UserSettingsTheme.fromJson(dynamic json) { - for(final v in values) { - if(v.value == json) { - return v; - } - } - return darkMode; - } - @override - compareTo(UserSettingsTheme other) => name.compareTo(other.name); - }`), - ); - }); - it("handles lists", () => { - const Model = a.object({ - items: a.array(a.number()), - nullableItems: a.nullable(a.array(a.string())), - objectItems: a.optional(a.array(a.object({ id: a.string() }))), - }); - const existingClassNames: string[] = []; - const result = dartTypeFromJtdSchema("Model", Model, { - isOptional: false, - existingClassNames, - }); - expect(normalizeWhitespace(result.content)).toBe( - normalizeWhitespace(`class Model { - final List items; - final List? nullableItems; - final List? objectItems; - const Model({ - required this.items, - required this.nullableItems, - this.objectItems, - }); - factory Model.fromJson(Map json) { - return Model( - items: json["items"] is List ? - // ignore: unnecessary_cast - (json["items"] as List).map((item) => doubleFromDynamic(item, 0)).toList() as List : [], - nullableItems: json["nullableItems"] is List ? - // ignore: unnecessary_cast - (json["nullableItems"] as List).map((item) => typeFromDynamic(item, "")).toList() as List? : null, - objectItems: json["objectItems"] is List ? - // ignore: unnecessary_cast - (json["objectItems"] as List).map((item) => ModelObjectItemsItem.fromJson(item)).toList() as List? : null, - ); - } - Map toJson() { - final __result = { - "items": items.map((item) => item).toList(), - "nullableItems": nullableItems?.map((item) => item).toList(), - }; - if (objectItems != null) { - __result["objectItems"] = objectItems?.map((item) => item.toJson()).toList(); - } - return __result; - } - Model copyWith({ - List? items, - ArriBox?>? nullableItems, - ArriBox?>? objectItems, - }) { - return Model( - items: items ?? this.items, - nullableItems: nullableItems != null ? nullableItems.value : this.nullableItems, - objectItems: objectItems != null ? objectItems.value : this.objectItems, - ); - } - } - class ModelObjectItemsItem { - final String id; - const ModelObjectItemsItem({ - required this.id, - }); - factory ModelObjectItemsItem.fromJson(Map json) { - return ModelObjectItemsItem( - id: typeFromDynamic(json["id"], ""), - ); - } - Map toJson() { - final __result = { - "id": id, - }; - return __result; - } - ModelObjectItemsItem copyWith({ - String? id, - }) { - return ModelObjectItemsItem( - id: id ?? this.id, - ); - } - } - `), - ); - }); - it("handles partials", () => { - const BaseSchema = a.object({ - id: a.string(), - name: a.string(), - createdAt: a.timestamp(), - tags: a.array(a.string()), - }); - const FinalSchema = a.partial(a.pick(BaseSchema, ["id", "tags"])); - const result = dartClassFromJtdSchema("Model", FinalSchema, { - existingClassNames: [], - isOptional: false, - }); - expect(normalizeWhitespace(result.content)).toBe( - normalizeWhitespace(`class Model { - final String? id; - final List? tags; - const Model({ - this.id, - this.tags, - }); - factory Model.fromJson(Map json) { - return Model( - id: nullableTypeFromDynamic(json["id"]), - tags: json["tags"] is List ? - // ignore: unnecessary_cast - (json["tags"] as List).map((item) => typeFromDynamic(item, "")).toList() as List? : null, - ); - } - Map toJson() { - final __result = { - - }; - if (id != null) { - __result["id"] = id; - } - if (tags != null) { - __result["tags"] = tags?.map((item) => item).toList(); - } - return __result; - } - Model copyWith({ - ArriBox? id, - ArriBox?>? tags, - }) { - return Model( - id: id != null ? id.value : this.id, - tags: tags != null ? tags.value : this.tags, - ); - } - }`), - ); - }); -}); - -it("Matches the dart example client", () => { - const tmpDir = path.resolve(__dirname, "../.temp"); - if (!existsSync(tmpDir)) { - mkdirSync(tmpDir); - } - const outputFilePath = path.resolve(tmpDir, "dart_client.rpc.dart"); - const result = createDartClient(TestAppDefinition, { - clientName: "TestClient", - outputFile: "", - }); - writeFileSync(outputFilePath, result); - execSync(`dart format ${outputFilePath}`); - const targetResult = readFileSync(outputFilePath, { encoding: "utf-8" }); - const expectedResult = readFileSync( - path.resolve( - __dirname, - "../../dart-codegen-reference/reference_client.dart", - ), - { encoding: "utf-8" }, - ); - expect(normalizeWhitespace(targetResult)).toBe( - normalizeWhitespace(expectedResult), - ); -}); diff --git a/languages/dart/dart-codegen/src/index.ts b/languages/dart/dart-codegen/src/index.ts deleted file mode 100644 index 2fcf49e8..00000000 --- a/languages/dart/dart-codegen/src/index.ts +++ /dev/null @@ -1,1237 +0,0 @@ -import { - type AppDefinition, - camelCase, - defineClientGeneratorPlugin, - type HttpRpcDefinition, - isRpcDefinition, - isSchemaFormDiscriminator, - isSchemaFormElements, - isSchemaFormEnum, - isSchemaFormProperties, - isSchemaFormRef, - isSchemaFormType, - isSchemaFormValues, - isServiceDefinition, - pascalCase, - type RpcDefinition, - type Schema, - type SchemaFormDiscriminator, - type SchemaFormElements, - type SchemaFormEnum, - type SchemaFormProperties, - type SchemaFormRef, - type SchemaFormType, - type SchemaFormValues, - type SchemaMetadata, - type ServiceDefinition, - unflattenProcedures, - type WsRpcDefinition, -} from "@arrirpc/codegen-utils"; -import { a } from "@arrirpc/schema"; -import { execSync } from "child_process"; -import { writeFileSync } from "fs"; - -function camelCaseWrapper(input: string) { - if (input.toUpperCase() === input) { - return camelCase(input, { normalize: true }); - } - return camelCase(input); -} - -export interface DartClientGeneratorOptions { - clientName: string; - outputFile: string; -} - -export const dartClientGenerator = defineClientGeneratorPlugin( - (options: DartClientGeneratorOptions) => { - return { - generator: async (def) => { - if (!options.clientName) { - throw new Error( - 'Missing "clientName" cannot generate dart client', - ); - } - if (!options.outputFile) { - throw new Error( - 'Missing "outputFile" cannot generate dart client', - ); - } - const numProcedures = Object.keys(def.procedures).length; - if (numProcedures <= 0) { - console.warn( - "No procedures found in definition file. Dart client will not be generated", - ); - } - const result = createDartClient(def, options); - writeFileSync(options.outputFile, result); - try { - execSync(`dart format ${options.outputFile}`); - } catch (err) { - console.error("Error formatting dart client", err); - } - }, - options, - }; - }, -); - -export class DartClientGenerator { - generatedModels: string[] = []; -} - -export function getAnnotations(metadata?: SchemaMetadata) { - const commentParts: string[] = []; - if (metadata?.description?.length) { - const parts = metadata.description.split("\n"); - for (const part of parts) { - commentParts.push(`/// ${part}`); - } - } - if (metadata?.isDeprecated) { - commentParts.push("@deprecated"); - } - - if (commentParts.length === 0) { - return ""; - } - return `${commentParts.join("\n")}\n`; -} - -export function createDartClient( - def: AppDefinition, - opts: DartClientGeneratorOptions, -): string { - const existingClassNames: string[] = []; - const clientVersion = def.info?.version ?? ""; - const services = unflattenProcedures(def.procedures); - const rpcParts: string[] = []; - const serviceGetterParts: string[] = []; - const serviceParts: string[] = []; - const modelParts: string[] = []; - for (const key of Object.keys(services)) { - const item = services[key]; - if (isRpcDefinition(item)) { - const rpc = dartRpcFromDefinition(key, item, opts); - if (rpc) { - rpcParts.push(rpc); - } - continue; - } - if (isServiceDefinition(item)) { - const serviceName: string = pascalCase(`${opts.clientName}_${key}`); - const service = dartServiceFromDefinition(serviceName, item, { - versionNumber: clientVersion, - ...opts, - }); - serviceParts.push(service); - serviceGetterParts.push(`${serviceName}Service get ${key} { - return ${serviceName}Service( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); -}`); - } - } - - for (const key of Object.keys(def.definitions)) { - const item = def.definitions[key]; - if ( - isSchemaFormProperties(item) || - isSchemaFormDiscriminator(item) || - isSchemaFormValues(item) - ) { - const result = dartTypeFromJtdSchema(key, item, { - isOptional: false, - existingClassNames, - }); - modelParts.push(result.content); - } - } - // do not create a client if there are not procedures - if (rpcParts.length === 0 && serviceGetterParts.length === 0) { - return `// this file was autogenerated by arri -// ignore_for_file: type=lint -import "package:arri_client/arri_client.dart"; - -${modelParts.join("\n")}`; - } - return `// this file was autogenerated by arri -// ignore_for_file: type=lint, unused_field -import "dart:async"; -import "dart:convert"; -import "package:arri_client/arri_client.dart"; -import "package:http/http.dart" as http; - -class ${opts.clientName} { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = "${def.info?.version ?? ""}"; - late final FutureOr> Function()? _headers; - ${opts.clientName}({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, -}) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - ${rpcParts.join("\n ")} - ${serviceGetterParts.join("\n ")} -} - -${serviceParts.join("\n")} - -${modelParts.join("\n")} -`; -} - -interface ServiceOptions extends DartClientGeneratorOptions { - versionNumber: string; -} - -export function dartServiceFromDefinition( - name: string, - def: ServiceDefinition, - opts: ServiceOptions, -): string { - const rpcParts: string[] = []; - const subServiceParts: Array<{ - name: string; - key: string; - content: string; - }> = []; - const serviceName = `${name}`; - Object.keys(def).forEach((key) => { - const item = def[key]; - if (isRpcDefinition(item)) { - const rpc = dartRpcFromDefinition(key, item, opts); - if (rpc) { - rpcParts.push(rpc); - } - return; - } - if (isServiceDefinition(item)) { - const subServiceName = pascalCase(`${serviceName}_${key}`); - const subService = dartServiceFromDefinition( - subServiceName, - item, - opts, - ); - subServiceParts.push({ - name: subServiceName, - key, - content: subService, - }); - } - }); - return `class ${serviceName}Service { - final http.Client? _httpClient; - final String _baseUrl; - final String _clientVersion = "${opts.versionNumber}"; - late final FutureOr> Function()? _headers; - ${serviceName}Service({ - http.Client? httpClient, - String baseUrl = "", - FutureOr> Function()? headers, - }) : _httpClient = httpClient, - _baseUrl = baseUrl, - _headers = headers; - ${subServiceParts - .map( - (sub) => `${sub.name}Service get ${sub.key} { - return ${sub.name}Service( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - }`, - ) - .join("\n")} - ${rpcParts.join("\n ")} -} -${subServiceParts.map((sub) => sub.content).join("\n")} -`; -} - -export function dartRpcFromDefinition( - key: string, - def: RpcDefinition, - opts: DartClientGeneratorOptions, -): string { - if (def.transport === "http") { - return dartHttpRpcFromSchema(key, def, opts); - } - if (def.transport === "ws") { - return dartWsRpcFromSchema(key, def, opts); - } - console.warn( - `[codegen-dart] WARNING: unsupported transport "${def.transport}". Skipping "${def.path}".`, - ); - return ""; -} - -export function dartHttpRpcFromSchema( - key: string, - def: HttpRpcDefinition, - _opts: DartClientGeneratorOptions, -): string { - let returnType: - | `Future` - | "Future" - | "Future" - | "Future" - | `Future<${string}>` - | `EventSource<${string}>` = `Future`; - let returnTypeName = "String"; - if (def.response) { - returnTypeName = pascalCase(def.response); - - if (def.isEventStream) { - returnType = `EventSource<${returnTypeName}>`; - } else { - returnType = `Future<${returnTypeName}>`; - } - } else { - returnType = "Future"; - } - let paramsInput = ""; - if (def.params) { - paramsInput = `${pascalCase(def.params)} params`; - } - let responseParser: string = "(body) => body;"; - switch (returnType) { - case "Future": - break; - case "Future": - responseParser = `(body) => Int.parse(body)`; - break; - case "Future": - responseParser = `(body) => Double.parse(body)`; - break; - case "Future": - responseParser = `(body) {}`; - break; - case "Future": - responseParser = `(body) { - switch(body) { - case "true": - case "1": - return true; - case "false": - case "0": - default: - return false; - } - }`; - break; - default: - responseParser = `(body) => ${returnTypeName}.fromJson( - json.decode(body), - )`; - break; - } - - if (def.isEventStream) { - const hookParts: string[] = [ - `SseHookOnData<${returnTypeName}>? onData`, - `SseHookOnError<${returnTypeName}>? onError`, - `SseHookOnConnectionError<${returnTypeName}>? onConnectionError`, - `SseHookOnOpen<${returnTypeName}>? onOpen`, - `SseHookOnClose<${returnTypeName}>? onClose`, - `String? lastEventId`, - ]; - return `${getAnnotations({ description: def.description, isDeprecated: def.isDeprecated })}${returnType} ${key}(${ - paramsInput.length ? `${paramsInput}, ` : "" - }{${hookParts.join(", ")},}) { - return parsedArriSseRequest<${returnTypeName}>( - "$_baseUrl${def.path}", - httpClient: _httpClient, - method: HttpMethod.${def.method}, - headers: _headers, - params: ${paramsInput.length ? `params.toJson()` : "null"}, - parser: ${responseParser}, - onData: onData, - onError: onError, - onConnectionError: onConnectionError, - onOpen: onOpen, - onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, - ); - }`; - } - return `${getAnnotations({ description: def.description, isDeprecated: def.isDeprecated })}${returnType} ${key}(${paramsInput}) { - return parsedArriRequest( - "$_baseUrl${def.path}", - httpClient: _httpClient, - method: HttpMethod.${def.method}, - headers: _headers, - params: ${paramsInput.length ? `params.toJson()` : "null"}, - parser: ${responseParser}, - clientVersion: _clientVersion, - ); - }`; -} - -export function dartWsRpcFromSchema( - key: string, - def: WsRpcDefinition, - _opts: DartClientGeneratorOptions, -): string { - const serverMsg = def.response - ? pascalCase(def.response, { normalize: true }) - : "Null"; - const clientMsg = def.params - ? pascalCase(def.params, { normalize: true }) - : "Null"; - const returnType = `Future>`; - const parser = def.response - ? `(body) => ${serverMsg}.fromJson(json.decode(body))` - : `(_) => null`; - const serializer = def.params - ? `(body) => json.encode(body.toJson())` - : `(_) => ""`; - return `${getAnnotations({ description: def.description, isDeprecated: def.isDeprecated })}${returnType} ${key}() { - return arriWebsocketRequest<${serverMsg}, ${clientMsg}>( - "$_baseUrl${def.path}", - headers: _headers, - parser: ${parser}, - serializer: ${serializer}, - clientVersion: _clientVersion, - ); - }`; -} - -export function dartTypeFromJtdSchema( - /** - * location in the tree i.e User.reviews.id - */ - nodePath: string, - def: Schema, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - if (isSchemaFormType(def)) { - return dartScalarFromJtdScalar(nodePath, def, additionalOptions); - } - if (isSchemaFormProperties(def)) { - return dartClassFromJtdSchema(nodePath, def, additionalOptions); - } - if (isSchemaFormElements(def)) { - return dartArrayFromJtdSchema(nodePath, def, additionalOptions); - } - if (isSchemaFormEnum(def)) { - return dartEnumFromJtdSchema(nodePath, def, additionalOptions); - } - if (isSchemaFormValues(def)) { - return dartMapFromJtdSchema(nodePath, def, additionalOptions); - } - if (isSchemaFormDiscriminator(def)) { - return dartSealedClassFromJtdSchema(nodePath, def, additionalOptions); - } - if (isSchemaFormRef(def)) { - return dartRefFromJtdSchema(nodePath, def, additionalOptions); - } - return dartDynamicFromAny(nodePath, a.any(), additionalOptions); -} - -export function dartClassFromJtdSchema( - nodePath: string, - def: SchemaFormProperties, - additionalOptions: ConversionAdditionalOptions & { - isException?: boolean; - discriminatorOptions?: { - discriminatorKey: string; - discriminatorValue: string; - discriminatorParentClassName: string; - }; - }, -): DartProperty { - const isException = additionalOptions?.isException ?? false; - const discOptions = additionalOptions?.discriminatorOptions; - const isDiscriminatorChild = - (discOptions?.discriminatorKey.length ?? 0) > 0; - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - let className = def.metadata?.id ? pascalCase(def.metadata.id) : undefined; - if (!className) { - const relativePath = nodePath.split(".").pop(); - if (additionalOptions.parentId && relativePath) { - className = pascalCase( - `${additionalOptions.parentId}_${relativePath}`, - ); - } else { - className = pascalCase(nodePath.split(".").join("_")); - } - } - const properties: { key: string; templates: DartProperty }[] = []; - const optionalProperties: { key: string; templates: DartProperty }[] = []; - const subContentParts: string[] = []; - if (!def.properties) { - return { - typeName: "", - fieldTemplate: "", - constructorTemplate: "", - fromJsonTemplate: () => "", - toJsonTemplate: () => "", - content: "", - }; - } - - for (const key of Object.keys(def.properties ?? {})) { - const keyPath = `${nodePath}.${key}`; - const prop = def.properties[key]!; - const mappedProp = dartTypeFromJtdSchema(keyPath, prop, { - parentId: className, - isOptional: false, - existingClassNames: additionalOptions.existingClassNames, - }); - properties.push({ - key, - templates: mappedProp, - }); - if (mappedProp?.content) { - subContentParts.push(mappedProp.content); - } - } - if (def.optionalProperties) { - for (const key of Object.keys(def.optionalProperties ?? {})) { - const keyPath = `${nodePath}.${key}`; - const prop = def.optionalProperties[key]!; - const mappedProp = dartTypeFromJtdSchema(keyPath, prop, { - parentId: className, - isOptional: true, - existingClassNames: additionalOptions.existingClassNames, - }); - optionalProperties.push({ key, templates: mappedProp }); - if (mappedProp?.content) { - subContentParts.push(mappedProp.content); - } - } - } - const fieldParts: string[] = []; - const constructorParts: string[] = []; - const fromJsonParts: string[] = []; - const copyWithParamParts: string[] = []; - const copyWithInitParts: string[] = []; - if (discOptions) { - fieldParts.push(`@override -final String ${camelCaseWrapper(discOptions.discriminatorKey)} = "${ - discOptions.discriminatorValue - }"`); - } - for (const prop of properties) { - fieldParts.push(prop.templates.fieldTemplate); - constructorParts.push(prop.templates.constructorTemplate); - const subJsonKey = prop.key; - const subKey = camelCaseWrapper(prop.key); - fromJsonParts.push( - `${subKey}: ${prop.templates.fromJsonTemplate( - `json["${subJsonKey}"]`, - )}`, - ); - if (prop.templates.typeName === "dynamic") { - copyWithParamParts.push(`dynamic ${subKey}`); - copyWithInitParts.push(`${subKey}: ${subKey} ?? this.${subKey}`); - } else { - if (prop.templates.typeName.endsWith("?")) { - copyWithParamParts.push( - `ArriBox<${prop.templates.typeName}>? ${subKey}`, - ); - copyWithInitParts.push( - `${subKey}: ${subKey} != null ? ${subKey}.value : this.${subKey}`, - ); - } else { - copyWithParamParts.push( - `${prop.templates.typeName}? ${subKey}`, - ); - copyWithInitParts.push( - `${subKey}: ${subKey} ?? this.${subKey}`, - ); - } - } - } - for (const prop of optionalProperties) { - fieldParts.push(prop.templates.fieldTemplate); - constructorParts.push(prop.templates.constructorTemplate); - const subKey = camelCaseWrapper(prop.key); - const subJsonKey = prop.key; - fromJsonParts.push( - `${subKey}: ${prop.templates.fromJsonTemplate( - `json["${subJsonKey}"]`, - )}`, - ); - if (prop.templates.typeName === "dynamic") { - copyWithParamParts.push(`dynamic ${subKey}`); - copyWithInitParts.push(`${subKey}: ${subKey} ?? this.${subKey}`); - } else { - if (prop.templates.typeName.endsWith("?")) { - copyWithParamParts.push( - `ArriBox<${prop.templates.typeName}>? ${subKey}`, - ); - copyWithInitParts.push( - `${subKey}: ${subKey} != null ? ${subKey}.value : this.${subKey}`, - ); - } else { - copyWithParamParts.push( - `${prop.templates.typeName}? ${subKey}`, - ); - copyWithInitParts.push( - `${subKey}: ${subKey} ?? this.${subKey}`, - ); - } - } - } - let classNamePart = `class ${className}`; - if (isDiscriminatorChild) { - classNamePart += ` implements ${discOptions?.discriminatorParentClassName}`; - } else if (isException) { - classNamePart += ` implements Exception`; - } - - let content = `${getAnnotations(def.metadata)}${classNamePart} { - ${fieldParts.join(";\n ")}; - const ${className}({ - ${constructorParts.join(",\n ")}, - }); - factory ${className}.fromJson(Map json) { - return ${className}( - ${fromJsonParts.join(",\n ")}, - ); - } - ${isDiscriminatorChild ? `@override` : ""} - Map toJson() { - final __result = {${ - isDiscriminatorChild - ? `\n "${discOptions?.discriminatorKey}": ${camelCaseWrapper( - discOptions?.discriminatorKey ?? "", - )},` - : "" - } - ${properties - .map( - (prop) => - `"${prop.key}": ${prop.templates.toJsonTemplate( - camelCaseWrapper(prop.key), - )}`, - ) - .join(",\n ")}${properties.length ? "," : ""} - }; - ${optionalProperties - .map( - (prop) => `if (${camelCaseWrapper(prop.key)} != null) { - __result["${prop.key}"] = ${prop.templates.toJsonTemplate( - camelCaseWrapper(prop.key), - )}; - }`, - ) - .join("\n")} - return __result; - } - ${className} copyWith({ - ${copyWithParamParts.join(",\n ")}, - }) { - return ${className}( - ${copyWithInitParts.join(",\n ")}, - ); - } -} -${subContentParts.join("\n")} - -`; - if (additionalOptions.existingClassNames.includes(className)) { - content = ""; - } else { - additionalOptions.existingClassNames.push(className); - } - const isNullable = def.nullable ?? additionalOptions?.isOptional; - const typeName = isNullable ? `${className}?` : className; - return { - typeName, - fieldTemplate: fieldTemplateString( - typeName, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => - isNullable - ? `${input} is Map ? ${className}.fromJson(${input}) : null` - : `${className}.fromJson(${input})`, - toJsonTemplate: (input) => `${input}${isNullable ? "?" : ""}.toJson()`, - content, - }; -} - -interface DartProperty { - typeName: string; - fieldTemplate: string; - constructorTemplate: string; - fromJsonTemplate: (input: string) => string; - toJsonTemplate: (input: string) => string; - content: string; -} - -function dartDynamicFromAny( - nodePath: string, - def: Schema, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - return { - typeName: "dynamic", - fieldTemplate: fieldTemplateString( - "dynamic", - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => `${input}`, - toJsonTemplate: (input) => input, - content: "", - }; -} - -function fieldTemplateString( - typeName: string, - key: string, - description?: string, - deprecated?: boolean, -): string { - let result = ""; - if (deprecated) { - result += `@deprecated\n`; - } - if (description) { - const parts = description.split("\n"); - for (const part of parts) { - result += `/// ${part}\n`; - } - } - result += `final ${typeName} ${key}`; - return result; -} - -function dartArrayFromJtdSchema( - nodePath: string, - def: SchemaFormElements, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - const subtype = dartTypeFromJtdSchema(`${nodePath}.Item`, def.elements, { - existingClassNames: additionalOptions.existingClassNames, - isOptional: false, - }); - const typeName = isNullable - ? `List<${subtype.typeName}>?` - : `List<${subtype.typeName}>`; - return { - typeName, - fieldTemplate: fieldTemplateString( - typeName, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => { - if (isNullable) { - return `${input} is List ? - // ignore: unnecessary_cast - (${input} as List).map((item) => ${subtype.fromJsonTemplate( - "item", - )}).toList() as ${typeName} : null`; - } - return `${input} is List ? - // ignore: unnecessary_cast - (${input} as List).map((item) => ${subtype.fromJsonTemplate( - "item", - )}).toList() as ${typeName} : <${subtype.typeName}>[]`; - }, - toJsonTemplate: (input) => { - return `${input}${ - isNullable ? "?" : "" - }.map((item) => ${subtype.toJsonTemplate("item")}).toList()`; - }, - content: subtype.content, - }; -} - -interface ConversionAdditionalOptions { - parentId?: string; - isOptional: boolean; - existingClassNames: string[]; -} - -function dartScalarFromJtdScalar( - nodePath: string, - def: SchemaFormType, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - const defaultInitializationTemplate = additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`; - const { description } = def.metadata ?? {}; - const defaultToJsonTemplate = (input: string) => input; - switch (def.type) { - case "boolean": - if (isNullable) { - return { - typeName: "bool?", - fieldTemplate: fieldTemplateString( - "bool?", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableTypeFromDynamic(${input})`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - } - return { - typeName: "bool", - fieldTemplate: fieldTemplateString( - "bool", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `typeFromDynamic(${input}, false)`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - case "float32": - case "float64": - if (isNullable) { - return { - typeName: "double?", - fieldTemplate: fieldTemplateString( - "double?", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableDoubleFromDynamic(${input})`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - } - return { - typeName: "double", - fieldTemplate: fieldTemplateString( - "double", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => `doubleFromDynamic(${input}, 0)`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - case "int16": - case "int32": - case "int8": - case "uint16": - case "uint32": - case "uint8": - if (isNullable) { - return { - typeName: "int?", - fieldTemplate: fieldTemplateString( - "int?", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableIntFromDynamic(${input})`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - } - return { - typeName: "int", - fieldTemplate: fieldTemplateString( - `int`, - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => `intFromDynamic(${input}, 0)`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - case "int64": - case "uint64": - if (isNullable) { - return { - typeName: "BigInt?", - fieldTemplate: fieldTemplateString( - `BigInt?`, - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableBigIntFromDynamic(${input})`, - toJsonTemplate: (input) => `${input}?.toString()`, - content: "", - }; - } - return { - typeName: "BigInt", - fieldTemplate: fieldTemplateString( - `BigInt`, - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `bigIntFromDynamic(${input}, BigInt.zero)`, - toJsonTemplate: (input) => `${input}.toString()`, - content: "", - }; - case "timestamp": - if (isNullable) { - return { - typeName: "DateTime?", - fieldTemplate: fieldTemplateString( - "DateTime?", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableDateTimeFromDynamic(${input})`, - toJsonTemplate: (input) => - `${input}?.toUtc().toIso8601String()`, - content: "", - }; - } - return { - typeName: "DateTime", - fieldTemplate: fieldTemplateString( - "DateTime", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `dateTimeFromDynamic( - ${input}, - DateTime.fromMillisecondsSinceEpoch(0), - )`, - toJsonTemplate: (input) => `${input}.toUtc().toIso8601String()`, - content: "", - }; - case "string": - if (isNullable) { - return { - typeName: "String?", - fieldTemplate: fieldTemplateString( - "String?", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `nullableTypeFromDynamic(${input})`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - } - return { - typeName: "String", - fieldTemplate: fieldTemplateString( - "String", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => - `typeFromDynamic(${input}, "")`, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - default: - return { - typeName: "dynamic", - fieldTemplate: fieldTemplateString( - "dynamic", - key, - description, - def.metadata?.isDeprecated, - ), - constructorTemplate: defaultInitializationTemplate, - fromJsonTemplate: (input) => input, - toJsonTemplate: defaultToJsonTemplate, - content: "", - }; - } -} - -function dartEnumFromJtdSchema( - nodePath: string, - def: SchemaFormEnum, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - let className = def.metadata?.id ? pascalCase(def.metadata.id) : undefined; - if (!className) { - className = pascalCase(nodePath.split(".").join("_")); - } - const valNames: string[] = []; - const fieldParts: string[] = []; - for (const val of def.enum) { - valNames.push(`${camelCaseWrapper(val)}`); - fieldParts.push(`${camelCaseWrapper(val)}("${val}")`); - } - - let content = `${getAnnotations(def.metadata)}enum ${className} implements Comparable<${className}> { - ${fieldParts.join(",\n ")}; - const ${className}(this.value); - final String value; - - factory ${className}.fromJson(dynamic json) { - for(final v in values) { - if(v.value == json) { - return v; - } - } - return ${valNames[0]}; - } - - @override - compareTo(${className} other) => name.compareTo(other.name); -}`; - if (additionalOptions.existingClassNames.includes(className)) { - content = ""; - } else { - additionalOptions.existingClassNames.push(className); - } - return { - typeName: className, - fieldTemplate: fieldTemplateString( - isNullable ? `${className}?` : className, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => { - if (isNullable) { - return `${input} is String ? ${className}.fromJson(${input}) : null`; - } - return `${className}.fromJson(${input})`; - }, - toJsonTemplate: (input) => `${input}${isNullable ? "?" : ""}.value`, - content, - }; -} - -function dartMapFromJtdSchema( - nodePath: string, - def: SchemaFormValues, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - const innerType = dartTypeFromJtdSchema(`${nodePath}.Value`, def.values, { - existingClassNames: additionalOptions.existingClassNames, - isOptional: false, - }); - const typeName = `Map${ - isNullable ? "?" : "" - }`; - return { - typeName: isNullable - ? `Map?` - : `Map`, - fieldTemplate: fieldTemplateString( - typeName, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => `${input} is Map - ? (${input} as Map).map( - (key, value) => MapEntry(key, ${innerType.fromJsonTemplate( - "value", - )})) - : {}`, - toJsonTemplate: (input) => - `${input}${ - isNullable ? "?" : "" - }.map((key, value) => MapEntry(key, ${innerType.toJsonTemplate( - "value", - )}))`, - content: innerType.content, - }; -} - -function dartSealedClassFromJtdSchema( - nodePath: string, - def: SchemaFormDiscriminator, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const className = def.metadata?.id - ? pascalCase(def.metadata?.id) - : pascalCase(nodePath.split(".").join("_")); - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - const discriminatorJsonKey = def.discriminator; - const discriminatorKey = camelCaseWrapper(def.discriminator); - const fromJsonCaseParts: string[] = []; - const childContentParts: string[] = []; - Object.keys(def.mapping).forEach((discKeyValue) => { - const childDef = def.mapping[discKeyValue]; - if (!isSchemaFormProperties(childDef)) { - return; - } - const child = dartClassFromJtdSchema( - `${nodePath}.${camelCaseWrapper(discKeyValue.toLowerCase())}`, - childDef, - { - parentId: className, - isOptional: false, - existingClassNames: additionalOptions.existingClassNames, - discriminatorOptions: { - discriminatorKey, - discriminatorValue: discKeyValue, - discriminatorParentClassName: className, - }, - }, - ); - fromJsonCaseParts.push(`case "${discKeyValue}": - return ${child.typeName}.fromJson(json);`); - childContentParts.push(child.content); - }); - let content = ""; - if (!additionalOptions.existingClassNames.includes(className)) { - content = `${getAnnotations(def.metadata)}sealed class ${className} { - final String ${discriminatorKey}; - const ${className}({ - required this.${discriminatorKey}, - }); - factory ${className}.fromJson(Map json) { - if(json["${discriminatorJsonKey}"] is! String) { - throw Exception( - "Unable to decode ${className}. Expected String from \\"${discriminatorJsonKey}\\". Received \${json["${discriminatorJsonKey}"]}}", - ); - } - switch (json["${discriminatorJsonKey}"]) { - ${fromJsonCaseParts.join("\n ")} - } - throw Exception( - "Unable to decode ${className}. \\"\${json["${discriminatorJsonKey}"]}\\" doesn't match any of the accepted discriminator values.", - ); - } - Map toJson(); -} -${childContentParts.join("\n")}`; - additionalOptions.existingClassNames.push(className); - } - - const typeName = `${className}${isNullable ? "?" : ""}`; - return { - typeName, - fieldTemplate: fieldTemplateString( - typeName, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate: (input) => { - if (isNullable) { - return `${input} is Map ? ${className}.fromJson(${input}) : null`; - } - return `${className}.fromJson(${input})`; - }, - toJsonTemplate: (input) => { - if (isNullable) { - return `${input}?.toJson()`; - } - return `${input}.toJson()`; - }, - content, - }; -} - -function dartRefFromJtdSchema( - nodePath: string, - def: SchemaFormRef, - additionalOptions: ConversionAdditionalOptions, -): DartProperty { - const jsonKey = nodePath.split(".").pop() ?? ""; - const key = camelCaseWrapper(jsonKey); - const className = pascalCase(def.ref, { normalize: true }); - const isNullable = additionalOptions.isOptional || (def.nullable ?? false); - const typeName = `${className}${isNullable ? "?" : ""}`; - return { - typeName, - fieldTemplate: fieldTemplateString( - typeName, - key, - def.metadata?.description, - def.metadata?.isDeprecated, - ), - constructorTemplate: additionalOptions.isOptional - ? `this.${key}` - : `required this.${key}`, - fromJsonTemplate(input) { - if (isNullable) { - return `${input} is Map ? ${className}.fromJson(${input}) : null`; - } - return `${className}.fromJson(${input})`; - }, - toJsonTemplate(input) { - if (isNullable) { - return `${input}?.toJson()`; - } - return `${input}.toJson()`; - }, - content: "", - }; -} diff --git a/languages/dart/dart-codegen/src/object.ts b/languages/dart/dart-codegen/src/object.ts new file mode 100644 index 00000000..3051c982 --- /dev/null +++ b/languages/dart/dart-codegen/src/object.ts @@ -0,0 +1,235 @@ +import { SchemaFormProperties } from "@arrirpc/codegen-utils"; + +import { + CodegenContext, + DartProperty, + getDartClassName, + outputIsNullable, + validDartIdentifier, +} from "./_common"; +import { dartTypeFromSchema } from "./_index"; + +export function dartClassFromSchema( + schema: SchemaFormProperties, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const className = getDartClassName(schema, context); + const finalClassName = `${context.modelPrefix}${className}`; + const typeName = isNullable ? `${finalClassName}?` : finalClassName; + const defaultValue = isNullable ? "null" : `${finalClassName}.empty()`; + const result: DartProperty = { + typeName, + isNullable, + defaultValue, + fromJson(input) { + if (isNullable) { + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : null`; + } + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : ${finalClassName}.empty()`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.toJson()`; + } + if (schema.nullable) { + return `${input}?.toJson()`; + } + return `${input}.toJson()`; + }, + toQueryString() { + return `print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: "", + }; + if (context.generatedTypes.includes(className)) { + return result; + } + const propNames: string[] = []; + const fieldParts: string[] = []; + const constructorParts: string[] = []; + const defaultParts: string[] = []; + const fromJsonParts: string[] = []; + const toJsonRequiredParts: string[] = []; + if (context.discriminatorKey && context.discriminatorValue) { + toJsonRequiredParts.push( + ` "${context.discriminatorKey}": ${validDartIdentifier(context.discriminatorKey)},`, + ); + } + const toJsonOptionalParts: string[] = []; + const toUrlQueryParts: string[] = []; + if (context.discriminatorKey && context.discriminatorValue) { + toUrlQueryParts.push( + `_queryParts_.add("${context.discriminatorKey}=$${validDartIdentifier(context.discriminatorKey)}");`, + ); + } + const copyWithParamParts: string[] = []; + const copyWithReturnParts: string[] = []; + const subContentParts: string[] = []; + for (const key of Object.keys(schema.properties)) { + const innerSchema = schema.properties[key]!; + const typeResult = dartTypeFromSchema(innerSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `/${className}/${key}`, + schemaPath: `${context.schemaPath}/properties/${key}`, + }); + + const propName = validDartIdentifier(key); + propNames.push(propName); + fieldParts.push(` final ${typeResult.typeName} ${propName};`); + constructorParts.push(` required this.${propName},`); + defaultParts.push(` ${propName}: ${typeResult.defaultValue},`); + fromJsonParts.push( + ` final ${propName} = ${typeResult.fromJson(`_input_["${key}"]`, key)};`, + ); + toJsonRequiredParts.push( + ` "${key}": ${typeResult.toJson(propName, "", key)},`, + ); + toUrlQueryParts.push( + ` ${typeResult.toQueryString(propName, "_queryParts_", key)};`, + ); + if (typeResult.isNullable) { + copyWithParamParts.push( + ` ${typeResult.typeName} Function()? ${propName},`, + ); + copyWithReturnParts.push( + ` ${propName}: ${propName} != null ? ${propName}() : this.${propName},`, + ); + } else { + copyWithParamParts.push( + ` ${typeResult.typeName}${typeResult.typeName !== "dynamic" ? "?" : ""} ${propName},`, + ); + copyWithReturnParts.push( + ` ${propName}: ${propName} ?? this.${propName},`, + ); + } + if (typeResult.content) { + subContentParts.push(typeResult.content); + } + } + for (const key of Object.keys(schema.optionalProperties ?? {})) { + const innerSchema = schema.optionalProperties![key]!; + const typeResult = dartTypeFromSchema(innerSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `/${className}/${key}`, + schemaPath: `${context.schemaPath}/optionalProperties/${key}`, + isOptional: true, + }); + + const propName = validDartIdentifier(key); + propNames.push(propName); + fieldParts.push(` final ${typeResult.typeName} ${propName};`); + constructorParts.push(` this.${propName},`); + fromJsonParts.push( + ` final ${propName} = ${typeResult.fromJson(`_input_["${key}"]`, key)};`, + ); + toJsonOptionalParts.push( + ` if (${propName} != null) _output_["${key}"] = ${typeResult.toJson(propName, "_output_", key)};`, + ); + toUrlQueryParts.push( + ` ${typeResult.toQueryString(propName, "_queryParts_", key)};`, + ); + copyWithParamParts.push( + ` ${typeResult.typeName} Function()? ${propName},`, + ); + copyWithReturnParts.push( + ` ${propName}: ${propName} != null ? ${propName}() : this.${propName},`, + ); + if (typeResult.content) { + subContentParts.push(typeResult.content); + } + } + let discriminatorPart = ""; + if (context.discriminatorKey && context.discriminatorValue) { + discriminatorPart = ` + @override + String get ${validDartIdentifier(context.discriminatorKey)} => "${context.discriminatorValue}"; +`; + } + + result.content = `class ${finalClassName} implements ${context.discriminatorParentId ?? "ArriModel"} { +${fieldParts.join("\n")} + const ${finalClassName}({ +${constructorParts.join("\n")} + }); +${discriminatorPart} + factory ${finalClassName}.empty() { + return ${finalClassName}( + ${defaultParts.join("\n")} + ); + } + + factory ${finalClassName}.fromJson(Map _input_) { +${fromJsonParts.join("\n")} + return ${finalClassName}( +${propNames.map((prop) => ` ${prop}: ${prop},`).join("\n")} + ); + } + + factory ${finalClassName}.fromJsonString(String input) { + return ${finalClassName}.fromJson(json.decode(input)); + } + + @override + Map toJson() { + final _output_ = { +${toJsonRequiredParts.join("\n")} + }; +${toJsonOptionalParts.join("\n")} + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; +${toUrlQueryParts.join("\n")} + return _queryParts_.join("&"); + } + + @override + ${finalClassName} copyWith({ +${copyWithParamParts.join("\n")} + }) { + return ${finalClassName}( +${copyWithReturnParts.join("\n")} + ); + } + + @override + List get props => [ +${propNames.map((prop) => ` ${prop},`).join("\n")} + ]; + + @override + bool operator ==(Object other) { + return other is ${finalClassName} && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "${finalClassName} \${toJsonString()}"; + } +} + +${subContentParts.join("\n\n")}`; + context.generatedTypes.push(className); + return result; +} diff --git a/languages/dart/dart-codegen/src/primitives.ts b/languages/dart/dart-codegen/src/primitives.ts new file mode 100644 index 00000000..781d42e9 --- /dev/null +++ b/languages/dart/dart-codegen/src/primitives.ts @@ -0,0 +1,199 @@ +import { SchemaFormType } from "@arrirpc/codegen-utils"; + +import { CodegenContext, DartProperty, outputIsNullable } from "./_common"; + +export function dartStringFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? `String?` : "String"; + const defaultValue = isNullable ? "null" : '""'; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableTypeFromDynamic(${input})`; + } + return `typeFromDynamic(${input}, "")`; + }, + toJson(input, _target, _key) { + return input; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=$${input}")`; + } + return `${target}.add("${key}=$${input}")`; + }, + content: "", + }; +} + +export function dartBoolFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? "bool?" : "bool"; + const defaultValue = isNullable ? "null" : "false"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableTypeFromDynamic(${input})`; + } + return `typeFromDynamic(${input}, false)`; + }, + toJson(input, _target, _key) { + return input; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=$${input}")`; + } + return `${target}.add("${key}=$${input}")`; + }, + content: "", + }; +} + +export function dartDateTimeFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? "DateTime?" : "DateTime"; + const defaultValue = isNullable ? "null" : "DateTime.now()"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableDateTimeFromDynamic(${input})`; + } + return `dateTimeFromDynamic(${input}, DateTime.now())`; + }, + toJson(input, _target, _key) { + if (context.isOptional) { + // the null check will happen at the object level + return `${input}!.toUtc().toIso8601String()`; + } + if (schema.nullable) { + return `${input}?.toUtc().toIso8601String()`; + } + return `${input}.toUtc().toIso8601String()`; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=\${${input}!.toUtc().toIso8601String()}")`; + } + if (schema.nullable) { + return `${target}.add("${key}=\${${input}?.toUtc().toIso8601String()}")`; + } + return `${target}.add("${key}=\${${input}.toUtc().toIso8601String()}")`; + }, + content: "", + }; +} + +export function dartDoubleFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? "double?" : "double"; + const defaultValue = isNullable ? "null" : "0.0"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableDoubleFromDynamic(${input})`; + } + return `doubleFromDynamic(${input}, 0.0)`; + }, + toJson(input, _, __) { + return input; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=$${input}")`; + } + return `${target}.add("${key}=$${input}")`; + }, + content: "", + }; +} + +export function dartIntFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? "int?" : "int"; + const defaultValue = isNullable ? "null" : "0"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableIntFromDynamic(${input})`; + } + return `intFromDynamic(${input}, 0)`; + }, + toJson(input) { + return input; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=$${input}")`; + } + return `${target}.add("${key}=$${input}")`; + }, + content: "", + }; +} + +export function dartBigIntFromSchema( + schema: SchemaFormType, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const typeName = isNullable ? "BigInt?" : "BigInt"; + const defaultValue = isNullable ? "null" : "BigInt.zero"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input, _key) { + if (isNullable) { + return `nullableBigIntFromDynamic(${input})`; + } + return `bigIntFromDynamic(${input}, BigInt.zero)`; + }, + toJson(input, _target, _key) { + if (context.isOptional) { + return `${input}!.toString()`; + } + if (schema.nullable) { + return `${input}?.toString()`; + } + return `${input}.toString()`; + }, + toQueryString(input, target, key) { + if (context.isOptional) { + return `if (${input} != null) ${target}.add("${key}=$${input}")`; + } + return `${target}.add("${key}=$${input}")`; + }, + content: "", + }; +} diff --git a/languages/dart/dart-codegen/src/procedures.ts b/languages/dart/dart-codegen/src/procedures.ts new file mode 100644 index 00000000..5a75b293 --- /dev/null +++ b/languages/dart/dart-codegen/src/procedures.ts @@ -0,0 +1,200 @@ +import { + HttpRpcDefinition, + isRpcDefinition, + isServiceDefinition, + RpcDefinition, + ServiceDefinition, + WsRpcDefinition, +} from "@arrirpc/codegen-utils"; + +import { + CodegenContext, + validDartClassName, + validDartIdentifier, +} from "./_common"; + +export function dartRpcFromSchema( + schema: RpcDefinition, + context: CodegenContext, +): string { + switch (schema.transport) { + case "http": + return dartHttpRpcFromSchema(schema, context); + case "ws": + return dartWsRpcFromSchema(schema, context); + default: + console.warn( + `[WARNING] unsupported transport "${schema.transport}". Skipping ${context.instancePath}.`, + ); + return ""; + } +} + +export function dartHttpRpcFromSchema( + schema: HttpRpcDefinition, + context: CodegenContext, +): string { + const functionName = getFunctionName(context.instancePath); + let responseType = "void"; + let paramsType = ""; + if (schema.response) { + responseType = `${context.modelPrefix}${validDartClassName(schema.response, context.modelPrefix)}`; + } + if (schema.params) { + paramsType = `${context.modelPrefix}${validDartClassName(schema.params, context.modelPrefix)}`; + } + if (schema.isEventStream) { + return `EventSource<${responseType}> ${functionName}( + ${paramsType ? `${paramsType} params, ` : ""} { + void Function(${responseType} data, EventSource<${responseType}> connection)? onMessage, + void Function(http.StreamedResponse response, EventSource<${responseType}> connection)? onOpen, + void Function(EventSource<${responseType}> connection)? onClose, + void Function(ArriError error, EventSource<${responseType}> connection)? onError, + Duration? retryDelay, + int? maxRetryCount, + String? lastEventId, + }) { + return parsedArriSseRequest( + "$_baseUrl${schema.path}", + method: HttpMethod.${schema.method.toLowerCase()}, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, + ${paramsType ? "params: params.toJson()," : ""} + parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : `{}`}, + onMessage: onMessage, + onOpen: onOpen, + onClose: onClose, + onError: onError, + ); + }`; + } + return `Future<${responseType}> ${functionName}(${paramsType ? `${paramsType} params` : ""}) async { + return parsedArriRequest( + "$_baseUrl${schema.path}", + method: HttpMethod.${schema.method.toLowerCase()}, + httpClient: _httpClient, + headers: _headers, + clientVersion: _clientVersion, + ${paramsType ? "params: params.toJson()," : ""} + parser: (body) ${schema.response ? `=> ${responseType}.fromJsonString(body)` : "{}"}, + ); + }`; +} + +function getFunctionName(instancePath: string) { + const parts = instancePath.split("."); + return parts.pop() ?? ""; +} + +export function dartWsRpcFromSchema( + schema: WsRpcDefinition, + context: CodegenContext, +): string { + const functionName = getFunctionName(context.instancePath); + let responseType: string | undefined; + let paramsType: string | undefined; + if (schema.response) { + responseType = `${context.modelPrefix}${validDartClassName(schema.response, context.modelPrefix)}`; + } + if (schema.params) { + paramsType = `${context.modelPrefix}${validDartClassName(schema.params, context.modelPrefix)}`; + } + return `Future> ${functionName}() { + return arriWebsocketRequest( + "$_baseUrl${schema.path}", + headers: _headers, + clientVersion: _clientVersion, + parser: (msg) ${responseType ? `=> ${responseType}.fromJsonString(msg)` : "{}"}, + serializer: (msg) ${paramsType ? "=> msg.toJsonString()" : '=> ""'}, + ); + }`; +} + +export function dartServiceFromSchema( + schema: ServiceDefinition, + context: CodegenContext, +): string { + const rpcParts: string[] = []; + const subServices: { key: string; name: string }[] = []; + const subServiceParts: string[] = []; + const serviceName = getServiceName( + context.instancePath, + context.clientName, + ); + for (const key of Object.keys(schema)) { + const subSchema = schema[key]; + if (isServiceDefinition(subSchema)) { + const subSchemaResult = dartServiceFromSchema(subSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `${context.instancePath}.${key}`, + schemaPath: `${context.schemaPath}.${key}`, + }); + if (subSchemaResult) { + subServiceParts.push(subSchemaResult); + subServices.push({ + key: validDartIdentifier(key), + name: getServiceName( + `${context.instancePath}.${key}`, + context.clientName, + ), + }); + } + continue; + } + if (isRpcDefinition(subSchema)) { + const subSchemaResult = dartRpcFromSchema(subSchema, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `${context.instancePath}.${key}`, + schemaPath: `${context.schemaPath}.${key}`, + }); + if (subSchemaResult) { + rpcParts.push(subSchemaResult); + } + continue; + } + console.warn( + `Unknown schema in procedures at "${context.instancePath}".`, + ); + } + return `class ${serviceName}{ + final http.Client? _httpClient; + final String _baseUrl; + final String _clientVersion = "${context.clientVersion ?? ""}"; + late final FutureOr> Function()? _headers; + ${serviceName}({ + http.Client? httpClient, + required String baseUrl, + FutureOr> Function()? headers, + }) : _httpClient = httpClient, + _baseUrl = baseUrl, + _headers = headers; + + ${rpcParts.join("\n\n")} + + ${subServices + .map( + (service) => ` ${service.name} get ${service.key} => ${service.name}( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + );`, + ) + .join("\n\n")} +} +${subServiceParts.join("\n\n")}`; +} + +export function getServiceName(instancePath: string, clientName: string) { + return validDartClassName( + `${clientName}_${instancePath.split(".").join("_")}_Service`, + "", + ); +} diff --git a/languages/dart/dart-codegen/src/record.ts b/languages/dart/dart-codegen/src/record.ts new file mode 100644 index 00000000..778b7b83 --- /dev/null +++ b/languages/dart/dart-codegen/src/record.ts @@ -0,0 +1,61 @@ +import { SchemaFormValues } from "@arrirpc/codegen-utils"; + +import { CodegenContext, DartProperty, outputIsNullable } from "./_common"; +import { dartTypeFromSchema } from "./_index"; + +export function dartMapFromSchema( + schema: SchemaFormValues, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const innerType = dartTypeFromSchema(schema.values, { + clientName: context.clientName, + modelPrefix: context.modelPrefix, + generatedTypes: context.generatedTypes, + instancePath: `${context.instancePath}/[entry]`, + schemaPath: `${context.schemaPath}/values`, + }); + const typeName = isNullable + ? `Map?` + : `Map`; + const defaultValue = isNullable ? "null" : "{}"; + return { + typeName, + isNullable, + defaultValue, + fromJson(input) { + if (isNullable) { + return `${input} is Map + ? (${input} as Map).map( + (_key_, _val_) => MapEntry( + _key_, + ${innerType.fromJson("_val_")}, + ), + ) + : null`; + } + return `${input} is Map + ? (${input} as Map).map( + (_key_, _val_) => MapEntry( + _key_, + ${innerType.fromJson("_val_")}, + ), + ) + : {}`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.map((_key_, _val_) => MapEntry(_key_, ${innerType.toJson("_val_", "", "")},),)`; + } + if (schema.nullable) { + return `${input}?.map((_key_, _val_) => MapEntry(_key_, ${innerType.toJson("_val_", "", "")},),)`; + } + return `${input}.map((_key_, _val_) => MapEntry(_key_, ${innerType.toJson("_val_", "", "")},),)`; + }, + toQueryString() { + return `print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: innerType.content, + }; +} diff --git a/languages/dart/dart-codegen/src/ref.ts b/languages/dart/dart-codegen/src/ref.ts new file mode 100644 index 00000000..57cde392 --- /dev/null +++ b/languages/dart/dart-codegen/src/ref.ts @@ -0,0 +1,50 @@ +import { pascalCase, SchemaFormRef } from "@arrirpc/codegen-utils"; + +import { + CodegenContext, + DartProperty, + outputIsNullable, + sanitizeIdentifier, +} from "./_common"; + +export function dartRefFromSchema( + schema: SchemaFormRef, + context: CodegenContext, +): DartProperty { + const isNullable = outputIsNullable(schema, context); + const className = sanitizeIdentifier( + pascalCase(schema.ref, { normalize: true }), + ); + const finalClassName = `${context.modelPrefix}${className}`; + const typeName = isNullable ? `${finalClassName}?` : finalClassName; + const defaultValue = isNullable ? `null` : `${finalClassName}.empty()`; + return { + typeName, + isNullable, + defaultValue, + fromJson(input) { + if (isNullable) { + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : null`; + } + return `${input} is Map + ? ${finalClassName}.fromJson(${input}) + : ${finalClassName}.empty()`; + }, + toJson(input) { + if (context.isOptional) { + return `${input}!.toJson()`; + } + if (schema.nullable) { + return `${input}?.toJson()`; + } + return `${input}.toJson()`; + }, + toQueryString() { + return `print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at ${context.instancePath}.")`; + }, + content: "", + }; +} diff --git a/languages/dart/dart-codegen/vite.config.ts b/languages/dart/dart-codegen/vite.config.ts index 5a378595..b559381b 100644 --- a/languages/dart/dart-codegen/vite.config.ts +++ b/languages/dart/dart-codegen/vite.config.ts @@ -27,7 +27,8 @@ export default defineConfig({ singleThread: true, }, }, - reporters: ["default"], + reporters: ["default", "html"], + outputFile: ".temp/test-results/index.html", cache: { dir: "../../../node_modules/.vitest", }, diff --git a/languages/kotlin/kotlin-codegen/README.md b/languages/kotlin/kotlin-codegen/README.md index 302750fd..5fae651d 100644 --- a/languages/kotlin/kotlin-codegen/README.md +++ b/languages/kotlin/kotlin-codegen/README.md @@ -1,11 +1,106 @@ -# arri-codegen-kotlin +# Arri Kotlin Codegen -This library was generated with [Nx](https://nx.dev). +## Setup -## Building +### 1) Add the generator to your arri config -Run `nx build arri-codegen-kotlin` to build the library. +```ts +// arri.config.ts +import { defineConfig, generators } from "arri"; -## Running unit tests +export default defineConfig({ + generators: [ + generators.kotlinClient({ + clientName: "MyClient", + outputFile: "./client/src/MyClient.g.kt", + }), + ], +}); +``` -Run `nx test arri-codegen-kotlin` to execute the unit tests via [Vitest](https://vitest.dev). +**Options:** + +| Name | Description | +| --------------------- | ------------------------------------------------------------- | +| clientName | The name of the generated client class (Defaults to "Client") | +| outputFile (required) | Path to the file that will be created by the generator | +| modelPrefix | Add a prefix to the generated class names | + +### 2) Install dependencies + +The generated code relies on the following dependencies: + +- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) +- [ktor client](https://ktor.io/docs/client-dependencies.html) + +## Using the Generated Code + +### Initialize the client + +```kotlin +fun main() { + // create a Ktor HTTP client + val httpClient = HttpClient() { + install(HttpTimeout) + } + // initialize your generated client and pass it the httpClient + // the client name will match whatever options you passed into your arri config + val client = MyClient( + httpClient = httpClient, + baseUrl = "https://example.com", + // a function that returns a mutable map of headers + // this function will run before every request. Or before every reconnection in the case of SSE + headers = { + mutableMapOf(Pair("x-example-header", "")) + } + ) + runBlocking { + client.someProcedure() + } +} +``` + +The root client will be a class containing all of the services and procedures in a single class. If you only need a particular service, you can initialize just that service. + +```kotlin +val service = MyClientUsersService( + httpClient = httpClient, + baseUrl = "https://example.com", + headers = { + mutableMapOf(Pair("x-example-header", "")) + } + ) +``` + +### Using Arri Models + +All generated models will be data classes. They will have access to the following features: + +**Methods**: + +- `toJson(): String` +- `toUrlQueryParams(): String` + +**Factory Methods**: + +- `new()` +- `fromJson(input: String)` +- `fromJsonElement(input: JsonElement, instancePath: String)` + +**Other Notes** + +- All Enums will have a `serialValue` property. +- Discriminator schemas are converted to sealed classes + +## Development + +```bash +# build the library +pnpm nx build codegen-kotlin + +# test +pnpm nx test codegen-kotlin + +# lint +pnpm nx lint codegen-lint +``` diff --git a/languages/kotlin/kotlin-codegen/package.json b/languages/kotlin/kotlin-codegen/package.json index 00e0c539..7764bb8c 100644 --- a/languages/kotlin/kotlin-codegen/package.json +++ b/languages/kotlin/kotlin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-kotlin", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, diff --git a/languages/kotlin/kotlin-codegen/project.json b/languages/kotlin/kotlin-codegen/project.json index 4088ba1c..9c30d5b4 100644 --- a/languages/kotlin/kotlin-codegen/project.json +++ b/languages/kotlin/kotlin-codegen/project.json @@ -21,8 +21,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint languages/kotlin/kotlin-codegen" + } }, "test": { "executor": "@nx/vite:test", diff --git a/languages/kotlin/kotlin-codegen/src/_index.ts b/languages/kotlin/kotlin-codegen/src/_index.ts index 319e9ffe..8be74cf3 100644 --- a/languages/kotlin/kotlin-codegen/src/_index.ts +++ b/languages/kotlin/kotlin-codegen/src/_index.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import { type AppDefinition, - defineClientGeneratorPlugin, + defineGeneratorPlugin, isRpcDefinition, isSchemaFormDiscriminator, isSchemaFormElements, @@ -60,7 +60,7 @@ export interface KotlinClientOptions { outputFile: string; } -export const kotlinClientGenerator = defineClientGeneratorPlugin( +export const kotlinClientGenerator = defineGeneratorPlugin( (options: KotlinClientOptions) => { return { generator(def) { diff --git a/languages/kotlin/kotlin-codegen/src/array.ts b/languages/kotlin/kotlin-codegen/src/array.ts index 854c2d69..95d09efa 100644 --- a/languages/kotlin/kotlin-codegen/src/array.ts +++ b/languages/kotlin/kotlin-codegen/src/array.ts @@ -17,7 +17,7 @@ export function kotlinArrayFromSchema( modelPrefix: context.modelPrefix, clientName: context.clientName, clientVersion: context.clientVersion, - instancePath: `${context.instancePath}/[element]`, + instancePath: `${context.instancePath}/[Element]`, schemaPath: `${context.schemaPath}/elements`, existingTypeIds: context.existingTypeIds, }); diff --git a/languages/ts/ts-client/package.json b/languages/ts/ts-client/package.json index c6706b21..9eb85942 100644 --- a/languages/ts/ts-client/package.json +++ b/languages/ts/ts-client/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/client", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", diff --git a/languages/ts/ts-client/project.json b/languages/ts/ts-client/project.json index b847f339..78398a3d 100644 --- a/languages/ts/ts-client/project.json +++ b/languages/ts/ts-client/project.json @@ -21,8 +21,10 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint languages/ts/ts-client" + } }, "test": { "executor": "@nx/vite:test", diff --git a/languages/ts/ts-client/src/sse.ts b/languages/ts/ts-client/src/sse.ts index daa0fc29..e700b975 100644 --- a/languages/ts/ts-client/src/sse.ts +++ b/languages/ts/ts-client/src/sse.ts @@ -19,7 +19,6 @@ export interface SseEvent { export interface SseOptions { onMessage?: (data: TData) => any; - onErrorMessage?: (error: ArriErrorInstance) => any; onRequest?: (context: OnRequestContext) => any; onRequestError?: ( context: Omit & { @@ -92,12 +91,6 @@ export function arriSseRequest< options.onMessage?.(opts.parser(message.data)); return; } - if (message.event === "error") { - options.onErrorMessage?.( - ArriErrorInstance.fromJson(message.data), - ); - return; - } if (message.event === "done") { controller.abort(); } diff --git a/languages/ts/ts-codegen/README.md b/languages/ts/ts-codegen/README.md index 5b0d294f..c354878c 100644 --- a/languages/ts/ts-codegen/README.md +++ b/languages/ts/ts-codegen/README.md @@ -6,11 +6,11 @@ ```ts // arri.config.ts -import { defineConfig, typescriptClientGenerator } from "arri"; +import { defineConfig, generators } from "arri"; export default defineConfig({ generators: [ - typescriptClientGenerator({ + generators.typescriptClient({ clientName: "MyClient", outputFile: "./client/src/myClient.g.ts", }), diff --git a/languages/ts/ts-codegen/package.json b/languages/ts/ts-codegen/package.json index 930bd985..245e556a 100644 --- a/languages/ts/ts-codegen/package.json +++ b/languages/ts/ts-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-ts", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -17,7 +17,7 @@ "dependencies": { "@arrirpc/codegen-utils": "workspace:*", "@arrirpc/schema": "workspace:*", - "prettier": "^3.3.0" + "prettier": "^3.3.2" }, "devDependencies": { "@arrirpc/client": "workspace:*" } } diff --git a/languages/ts/ts-codegen/project.json b/languages/ts/ts-codegen/project.json index 6bebcebc..0db65bb2 100644 --- a/languages/ts/ts-codegen/project.json +++ b/languages/ts/ts-codegen/project.json @@ -21,8 +21,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint languages/ts/ts-codegen" + } }, "test": { "executor": "@nx/vite:test", diff --git a/languages/ts/ts-codegen/src/index.ts b/languages/ts/ts-codegen/src/index.ts index cdf5072b..e3e24024 100644 --- a/languages/ts/ts-codegen/src/index.ts +++ b/languages/ts/ts-codegen/src/index.ts @@ -1,7 +1,7 @@ import { type AppDefinition, camelCase, - defineClientGeneratorPlugin, + defineGeneratorPlugin, type HttpRpcDefinition, isRpcDefinition, isSchemaFormDiscriminator, @@ -33,14 +33,14 @@ import { import { writeFileSync } from "fs"; import prettier from "prettier"; -interface GeneratorOptions { +export interface TypescriptGeneratorOptions { clientName: string; outputFile: string; prettierOptions?: Omit; } -export const typescriptClientGenerator = defineClientGeneratorPlugin( - (options: GeneratorOptions) => ({ +export const typescriptClientGenerator = defineGeneratorPlugin( + (options: TypescriptGeneratorOptions) => ({ generator: async (def) => { if (!options.clientName) { throw new Error("Name is requires"); @@ -62,7 +62,7 @@ export const typescriptClientGenerator = defineClientGeneratorPlugin( export async function createTypescriptClient( def: AppDefinition, - options: GeneratorOptions, + options: TypescriptGeneratorOptions, ): Promise { const clientName = pascalCase(options.clientName); const services = unflattenProcedures(def.procedures); @@ -171,7 +171,7 @@ ${subContentParts.join("\n")} }); } -interface RpcOptions extends GeneratorOptions { +interface RpcOptions extends TypescriptGeneratorOptions { versionNumber: string; typesNeedingParser: string[]; hasSseProcedures: boolean; @@ -404,7 +404,7 @@ export function maybeNullType(typeName: string, isNullable = false) { export function tsAnyFromJtdSchema( nodePath: string, def: Schema, - options: GeneratorOptions, + options: TypescriptGeneratorOptions, additionalOptions: AdditionalOptions, ): TsProperty { const key = nodePath.split(".").pop() ?? ""; diff --git a/languages/ts/ts-server/README.md b/languages/ts/ts-server/README.md index 69a0cdef..8c47363a 100644 --- a/languages/ts/ts-server/README.md +++ b/languages/ts/ts-server/README.md @@ -81,21 +81,17 @@ Create an `arri.config.ts` in the project directory ```ts // arri.config.ts -import { - defineConfig, - typescriptClientGenerator, - dartClientGenerator, -} from "arri"; +import { defineConfig, generators } from "arri"; export default defineConfig({ entry: "app.ts", port: 3000, srcDir: "src", generators: [ - typescriptClientGenerator({ + generators.typescriptClient({ // options }), - dartClientGenerator({ + generators.dartClient({ // options }), ], @@ -434,14 +430,14 @@ Right now Arri RPC has client generators for the following languages: ```ts // arri.config.ts -import { defineConfig, typescriptClientGenerator, dartClientGenerator, kotlinClientGenerator } from "arri"; +import { defineConfig, generators } from "arri"; export default defineConfig({ // rest of config clientGenerators: [ - typescriptClientGenerator({...}), - dartClientGenerator({...}), - kotlinClientGenerator({...}) + generators.typescriptClient({...}), + generators.dartClient({...}), + generators.kotlinClient({...}) ] }); ``` diff --git a/languages/ts/ts-server/package.json b/languages/ts/ts-server/package.json index 47b51d10..f6904f3b 100644 --- a/languages/ts/ts-server/package.json +++ b/languages/ts/ts-server/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/server", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -29,5 +29,5 @@ "source-map-support": "^0.5.21", "uncrypto": "^0.1.3" }, - "devDependencies": { "bun-types": "^1.1.12" } + "devDependencies": { "bun-types": "^1.1.13" } } diff --git a/languages/ts/ts-server/project.json b/languages/ts/ts-server/project.json index 997adc88..97b20012 100644 --- a/languages/ts/ts-server/project.json +++ b/languages/ts/ts-server/project.json @@ -13,8 +13,10 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint languages/ts/ts-server" + } }, "test": { "executor": "@nx/vite:test", diff --git a/languages/ts/ts-server/src/app.test.ts b/languages/ts/ts-server/src/app.test.ts index 9c226309..e7a74e97 100644 --- a/languages/ts/ts-server/src/app.test.ts +++ b/languages/ts/ts-server/src/app.test.ts @@ -44,7 +44,7 @@ it("creates valid app definition", () => { const def = app.getAppDefinition(); const expectedResult: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", procedures: { sayHello: { transport: "http", diff --git a/languages/ts/ts-server/src/app.ts b/languages/ts/ts-server/src/app.ts index 91f2423c..37b83540 100644 --- a/languages/ts/ts-server/src/app.ts +++ b/languages/ts/ts-server/src/app.ts @@ -19,7 +19,7 @@ import { import { type ArriServerError, defineError, handleH3Error } from "./errors"; import { isEventStreamRpc, registerEventStreamRpc } from "./eventStreamRpc"; -import { type Middleware,type MiddlewareEvent } from "./middleware"; +import { type Middleware, type MiddlewareEvent } from "./middleware"; import { type ArriRoute, registerRoute } from "./route"; import { ArriRouter, type ArriRouterBase } from "./router"; import { @@ -254,7 +254,7 @@ export class ArriApp implements ArriRouterBase { getAppDefinition(): AppDefinition { const appDef: AppDefinition = { - arriSchemaVersion: SCHEMA_VERSION, + schemaVersion: SCHEMA_VERSION, info: this.appInfo, procedures: {}, definitions: this._definitions as any, diff --git a/languages/ts/ts-server/src/eventStreamRpc.ts b/languages/ts/ts-server/src/eventStreamRpc.ts index 7c6cfe11..3e8e4d81 100644 --- a/languages/ts/ts-server/src/eventStreamRpc.ts +++ b/languages/ts/ts-server/src/eventStreamRpc.ts @@ -12,12 +12,7 @@ import { } from "h3-sse"; import { type RpcEventContext } from "./context"; -import { - type ArriServerError, - type ArriServerErrorResponse, - defineError, - handleH3Error, -} from "./errors"; +import { type ArriServerError, defineError, handleH3Error } from "./errors"; import { type MiddlewareEvent } from "./middleware"; import { type RouteOptions } from "./route"; import { @@ -170,34 +165,6 @@ export class EventStreamConnection { }); } - // /** - // * Push a custom event. These events will need to be parsed manually using the `onEvent` hooks of any generated clients. - // * Note events with the name "error" or "message" cannot be used for custom events. - // */ - // async pushCustomEvent(event: SseEvent): Promise { - // if (event.event === "message") { - // throw new Error( - // `Event type "message" is the default event type. Therefore it cannot be used when pushing custom events.`, - // ); - // } - // if (event.event === "error") { - // throw new Error( - // `Event type "error" is reserved for the pushError() method. Therefore it cannot be used when pushing custom events.`, - // ); - // } - // } - - /** - * Publish an error event. This will trigger the `onError` hooks of any connected clients. - */ - async pushError(error: ArriServerErrorResponse, eventId?: string) { - await this.eventStream.push({ - id: eventId, - event: "error", - data: JSON.stringify(error), - }); - } - private cleanup() { if (this.pingInterval) { // eslint-disable-next-line @typescript-eslint/no-unsafe-argument diff --git a/nx.json b/nx.json index a2e737ed..b0485177 100644 --- a/nx.json +++ b/nx.json @@ -17,7 +17,8 @@ ], "shared-globals": [ "{workspaceRoot}/pnpm-lock.yaml", - "{workspaceRoot}/package.json" + "{workspaceRoot}/package.json", + "{workspaceRoot}/nx.json" ] }, "targetDefaults": { @@ -47,15 +48,11 @@ "cache": true, "inputs": ["default", "^default", "shared-globals"] }, - "@nx/eslint:lint": { + "lint": { "inputs": [ "default", "shared-globals", - "{projectRoot}/.eslintrc.json", - "{projectRoot}/.eslintrc.js", - "{workspaceRoot}/.eslintrc.json", - "{workspaceRoot}/.eslintrc.js", - "{workspaceRoot}/.eslintignore" + "{workspaceRoot}/eslint.config.js" ], "cache": true } diff --git a/package.json b/package.json index 000cccb6..e00bd63a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/source", - "version": "0.49.1", + "version": "0.51.0", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" @@ -36,35 +36,34 @@ "devDependencies": { "@eslint/js": "^9.4.0", "@faker-js/faker": "^8.4.1", - "@nx/eslint": "19.1.2", - "@nx/vite": "19.1.2", - "@nx/workspace": "19.1.2", + "@nx/vite": "19.2.3", + "@nx/workspace": "19.2.3", "@sinclair/typebox": "^0.32.31", - "@types/lodash": "^4.17.4", - "@types/node": "20.14.1", + "@types/lodash": "^4.17.5", + "@types/node": "20.14.2", "@vitest/coverage-v8": "1.6.0", "@vitest/ui": "1.6.0", "benny": "^3.7.1", - "bun-types": "^1.1.12", + "bun-types": "^1.1.13", "citty": "^0.1.6", "depcheck": "^1.4.7", - "esbuild": "0.21.4", + "esbuild": "0.21.5", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", - "eslint-plugin-n": "^17.7.0", + "eslint-plugin-n": "^17.8.1", "eslint-plugin-simple-import-sort": "^12.1.0", "globby": "^14.0.1", - "jiti": "^1.21.0", + "jiti": "^1.21.6", "lodash": "^4.17.21", - "nx": "19.1.2", + "nx": "19.2.3", "pathe": "^1.1.2", - "prettier": "^3.3.0", + "prettier": "^3.3.2", "scule": "^1.3.0", - "start-server-and-test": "^2.0.3", + "start-server-and-test": "^2.0.4", "typescript": "^5.4.5", - "typescript-eslint": "^7.12.0", + "typescript-eslint": "^7.13.0", "unbuild": "^2.0.0", - "vite": "5.2.12", + "vite": "5.2.13", "vite-tsconfig-paths": "4.3.2", "vitest": "1.6.0", "zod": "^3.23.8" diff --git a/playground/project.json b/playground/project.json index 16e23511..209a7101 100644 --- a/playground/project.json +++ b/playground/project.json @@ -14,6 +14,12 @@ "command": "arri dev", "cwd": "playground" } + }, + "lint": { + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint playground" + } } } } diff --git a/playground/src/app.ts b/playground/src/app.ts index 03193733..2bbce602 100644 --- a/playground/src/app.ts +++ b/playground/src/app.ts @@ -1,5 +1,11 @@ -import { ArriApp } from "@arrirpc/server"; +import { ArriApp, handleCors } from "@arrirpc/server"; -const app = new ArriApp({}); +const app = new ArriApp({ + onRequest(event) { + handleCors(event, { + origin: "*", + }); + }, +}); export default app; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 329f5207..0e8085e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,27 +14,24 @@ importers: '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 - '@nx/eslint': - specifier: 19.1.2 - version: 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) '@nx/vite': - specifier: 19.1.2 - version: 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) + specifier: 19.2.3 + version: 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2))(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0)) '@nx/workspace': - specifier: 19.1.2 - version: 19.1.2 + specifier: 19.2.3 + version: 19.2.3 '@sinclair/typebox': specifier: ^0.32.31 version: 0.32.31 '@types/lodash': - specifier: ^4.17.4 - version: 4.17.4 + specifier: ^4.17.5 + version: 4.17.5 '@types/node': - specifier: 20.14.1 - version: 20.14.1 + specifier: 20.14.2 + version: 20.14.2 '@vitest/coverage-v8': specifier: 1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) + version: 1.6.0(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0)) '@vitest/ui': specifier: 1.6.0 version: 1.6.0(vitest@1.6.0) @@ -42,8 +39,8 @@ importers: specifier: ^3.7.1 version: 3.7.1 bun-types: - specifier: ^1.1.12 - version: 1.1.12 + specifier: ^1.1.13 + version: 1.1.13 citty: specifier: ^0.1.6 version: 0.1.6 @@ -51,8 +48,8 @@ importers: specifier: ^1.4.7 version: 1.4.7 esbuild: - specifier: 0.21.4 - version: 0.21.4 + specifier: 0.21.5 + version: 0.21.5 eslint: specifier: 8.57.0 version: 8.57.0 @@ -60,8 +57,8 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.57.0) eslint-plugin-n: - specifier: ^17.7.0 - version: 17.7.0(eslint@8.57.0) + specifier: ^17.8.1 + version: 17.8.1(eslint@8.57.0) eslint-plugin-simple-import-sort: specifier: ^12.1.0 version: 12.1.0(eslint@8.57.0) @@ -69,44 +66,44 @@ importers: specifier: ^14.0.1 version: 14.0.1 jiti: - specifier: ^1.21.0 - version: 1.21.0 + specifier: ^1.21.6 + version: 1.21.6 lodash: specifier: ^4.17.21 version: 4.17.21 nx: - specifier: 19.1.2 - version: 19.1.2 + specifier: 19.2.3 + version: 19.2.3 pathe: specifier: ^1.1.2 version: 1.1.2 prettier: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.3.2 + version: 3.3.2 scule: specifier: ^1.3.0 version: 1.3.0 start-server-and-test: - specifier: ^2.0.3 - version: 2.0.3 + specifier: ^2.0.4 + version: 2.0.4 typescript: specifier: ^5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.12.0 - version: 7.12.0(eslint@8.57.0)(typescript@5.4.5) + specifier: ^7.13.0 + version: 7.13.0(eslint@8.57.0)(typescript@5.4.5) unbuild: specifier: ^2.0.0 version: 2.0.0(typescript@5.4.5) vite: - specifier: 5.2.12 - version: 5.2.12(@types/node@20.14.1) + specifier: 5.2.13 + version: 5.2.13(@types/node@20.14.2) vite-tsconfig-paths: specifier: 4.3.2 - version: 4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1)) + version: 4.3.2(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2)) vitest: specifier: 1.6.0 - version: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) + version: 1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0) zod: specifier: ^3.23.8 version: 3.23.8 @@ -119,6 +116,9 @@ importers: '@arrirpc/schema': specifier: workspace:* version: link:../../../tooling/schema + pathe: + specifier: ^1.1.2 + version: 1.1.2 languages/kotlin/kotlin-codegen: dependencies: @@ -179,8 +179,8 @@ importers: specifier: workspace:* version: link:../../../tooling/schema prettier: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.3.2 + version: 3.3.2 devDependencies: '@arrirpc/client': specifier: workspace:* @@ -229,8 +229,8 @@ importers: version: 0.1.3 devDependencies: bun-types: - specifier: ^1.1.12 - version: 1.1.12 + specifier: ^1.1.13 + version: 1.1.13 playground: dependencies: @@ -312,8 +312,8 @@ importers: specifier: ^1.10.1 version: 1.10.1 c12: - specifier: ^1.10.0 - version: 1.10.0 + specifier: ^1.11.1 + version: 1.11.1(magicast@0.3.4) chokidar: specifier: ^3.6.0 version: 3.6.0 @@ -330,8 +330,8 @@ importers: specifier: ^2.4.1 version: 2.4.1 esbuild: - specifier: ^0.21.4 - version: 0.21.4 + specifier: ^0.21.5 + version: 0.21.5 esbuild-plugin-replace: specifier: ^1.4.0 version: 1.4.0 @@ -348,8 +348,8 @@ importers: specifier: ^1.1.2 version: 1.1.2 prettier: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.3.2 + version: 3.3.2 devDependencies: '@types/degit': specifier: ^2.8.6 @@ -371,7 +371,7 @@ importers: dependencies: eslint: specifier: '>=8.0.0' - version: 9.3.0 + version: 9.4.0 devDependencies: '@types/eslint': specifier: ^8.56.10 @@ -401,8 +401,8 @@ importers: specifier: ^8.4.1 version: 8.4.1 ajv: - specifier: ^8.15.0 - version: 8.15.0 + specifier: ^8.16.0 + version: 8.16.0 benny: specifier: ^3.7.1 version: 3.7.1 @@ -444,42 +444,42 @@ packages: '@arrows/multimethod@1.4.1': resolution: {integrity: sha512-AZnAay0dgPnCJxn3We5uKiB88VL+1ZIF2SjZohLj6vqY2UyvB/sKdDnFP+LZNVsTC5lcnGPmLlRRkAh4sXkXsQ==} - '@babel/code-frame@7.24.6': - resolution: {integrity: sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==} + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.6': - resolution: {integrity: sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ==} + '@babel/compat-data@7.24.7': + resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==} engines: {node: '>=6.9.0'} - '@babel/core@7.24.6': - resolution: {integrity: sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ==} + '@babel/core@7.24.7': + resolution: {integrity: sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.6': - resolution: {integrity: sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg==} + '@babel/generator@7.24.7': + resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.24.6': - resolution: {integrity: sha512-DitEzDfOMnd13kZnDqns1ccmftwJTS9DMkyn9pYTxulS7bZxUxpMly3Nf23QQ6NwA4UB8lAqjbqWtyvElEMAkg==} + '@babel/helper-annotate-as-pure@7.24.7': + resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} engines: {node: '>=6.9.0'} - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.6': - resolution: {integrity: sha512-+wnfqc5uHiMYtvRX7qu80Toef8BXeh4HHR1SPeonGb1SKPniNEd4a/nlaJJMv/OIEYvIVavvo0yR7u10Gqz0Iw==} + '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': + resolution: {integrity: sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.24.6': - resolution: {integrity: sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg==} + '@babel/helper-compilation-targets@7.24.7': + resolution: {integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.24.6': - resolution: {integrity: sha512-djsosdPJVZE6Vsw3kk7IPRWethP94WHGOhQTc67SNXE0ZzMhHgALw8iGmYS0TD1bbMM0VDROy43od7/hN6WYcA==} + '@babel/helper-create-class-features-plugin@7.24.7': + resolution: {integrity: sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.24.6': - resolution: {integrity: sha512-C875lFBIWWwyv6MHZUG9HmRrlTDgOsLWZfYR0nW69gaKJNe0/Mpxx5r0EID2ZdHQkdUmQo2t0uNckTL08/1BgA==} + '@babel/helper-create-regexp-features-plugin@7.24.7': + resolution: {integrity: sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -489,119 +489,119 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - '@babel/helper-environment-visitor@7.24.6': - resolution: {integrity: sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==} + '@babel/helper-environment-visitor@7.24.7': + resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} engines: {node: '>=6.9.0'} - '@babel/helper-function-name@7.24.6': - resolution: {integrity: sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w==} + '@babel/helper-function-name@7.24.7': + resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} engines: {node: '>=6.9.0'} - '@babel/helper-hoist-variables@7.24.6': - resolution: {integrity: sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA==} + '@babel/helper-hoist-variables@7.24.7': + resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} engines: {node: '>=6.9.0'} - '@babel/helper-member-expression-to-functions@7.24.6': - resolution: {integrity: sha512-OTsCufZTxDUsv2/eDXanw/mUZHWOxSbEmC3pP8cgjcy5rgeVPWWMStnv274DV60JtHxTk0adT0QrCzC4M9NWGg==} + '@babel/helper-member-expression-to-functions@7.24.7': + resolution: {integrity: sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.6': - resolution: {integrity: sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==} + '@babel/helper-module-imports@7.24.7': + resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.6': - resolution: {integrity: sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA==} + '@babel/helper-module-transforms@7.24.7': + resolution: {integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.24.6': - resolution: {integrity: sha512-3SFDJRbx7KuPRl8XDUr8O7GAEB8iGyWPjLKJh/ywP/Iy9WOmEfMrsWbaZpvBu2HSYn4KQygIsz0O7m8y10ncMA==} + '@babel/helper-optimise-call-expression@7.24.7': + resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.24.6': - resolution: {integrity: sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg==} + '@babel/helper-plugin-utils@7.24.7': + resolution: {integrity: sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.24.6': - resolution: {integrity: sha512-1Qursq9ArRZPAMOZf/nuzVW8HgJLkTB9y9LfP4lW2MVp4e9WkLJDovfKBxoDcCk6VuzIxyqWHyBoaCtSRP10yg==} + '@babel/helper-remap-async-to-generator@7.24.7': + resolution: {integrity: sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.24.6': - resolution: {integrity: sha512-mRhfPwDqDpba8o1F8ESxsEkJMQkUF8ZIWrAc0FtWhxnjfextxMWxr22RtFizxxSYLjVHDeMgVsRq8BBZR2ikJQ==} + '@babel/helper-replace-supers@7.24.7': + resolution: {integrity: sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.6': - resolution: {integrity: sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g==} + '@babel/helper-simple-access@7.24.7': + resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.24.6': - resolution: {integrity: sha512-jhbbkK3IUKc4T43WadP96a27oYti9gEf1LdyGSP2rHGH77kwLwfhO7TgwnWvxxQVmke0ImmCSS47vcuxEMGD3Q==} + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': + resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} engines: {node: '>=6.9.0'} - '@babel/helper-split-export-declaration@7.24.6': - resolution: {integrity: sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw==} + '@babel/helper-split-export-declaration@7.24.7': + resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.6': - resolution: {integrity: sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==} + '@babel/helper-string-parser@7.24.7': + resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.6': - resolution: {integrity: sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==} + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.6': - resolution: {integrity: sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==} + '@babel/helper-validator-option@7.24.7': + resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.24.6': - resolution: {integrity: sha512-f1JLrlw/jbiNfxvdrfBgio/gRBk3yTAEJWirpAkiJG2Hb22E7cEYKHWo0dFPTv/niPovzIdPdEDetrv6tC6gPQ==} + '@babel/helper-wrap-function@7.24.7': + resolution: {integrity: sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.24.6': - resolution: {integrity: sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA==} + '@babel/helpers@7.24.7': + resolution: {integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.6': - resolution: {integrity: sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==} + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.6': - resolution: {integrity: sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==} + '@babel/parser@7.24.7': + resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.6': - resolution: {integrity: sha512-bYndrJ6Ph6Ar+GaB5VAc0JPoP80bQCm4qon6JEzXfRl5QZyQ8Ur1K6k7htxWmPA5z+k7JQvaMUrtXlqclWYzKw==} + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7': + resolution: {integrity: sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.6': - resolution: {integrity: sha512-iVuhb6poq5ikqRq2XWU6OQ+R5o9wF+r/or9CeUyovgptz0UlnK4/seOQ1Istu/XybYjAhQv1FRSSfHHufIku5Q==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.7': + resolution: {integrity: sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.6': - resolution: {integrity: sha512-c8TER5xMDYzzFcGqOEp9l4hvB7dcbhcGjcLVwxWfe4P5DOafdwjsBJZKsmv+o3aXh7NhopvayQIovHrh2zSRUQ==} + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7': + resolution: {integrity: sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.6': - resolution: {integrity: sha512-z8zEjYmwBUHN/pCF3NuWBhHQjJCrd33qAi8MgANfMrAvn72k2cImT8VjK9LJFu4ysOLJqhfkYYb3MvwANRUNZQ==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.7': + resolution: {integrity: sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-proposal-decorators@7.24.6': - resolution: {integrity: sha512-8DjR0/DzlBhz2SVi9a19/N2U5+C3y3rseXuyoKL9SP8vnbewscj1eHZtL6kpEn4UCuUmqEo0mvqyDYRFoN2gpA==} + '@babel/plugin-proposal-decorators@7.24.7': + resolution: {integrity: sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -628,8 +628,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-decorators@7.24.6': - resolution: {integrity: sha512-gInH8LEqBp+wkwTVihCd/qf+4s28g81FZyvlIbAurHk9eSiItEKG7E0uNK2UdpgsD79aJVAW3R3c85h0YJ0jsw==} + '@babel/plugin-syntax-decorators@7.24.7': + resolution: {integrity: sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -644,14 +644,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.24.6': - resolution: {integrity: sha512-BE6o2BogJKJImTmGpkmOic4V0hlRRxVtzqxiSPa8TIFxyhi4EFjHm08nq1M4STK4RytuLMgnSz0/wfflvGFNOg==} + '@babel/plugin-syntax-import-assertions@7.24.7': + resolution: {integrity: sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.24.6': - resolution: {integrity: sha512-D+CfsVZousPXIdudSII7RGy52+dYRtbyKAZcvtQKq/NpsivyMVduepzcLqG5pMBugtMdedxdC8Ramdpcne9ZWQ==} + '@babel/plugin-syntax-import-attributes@7.24.7': + resolution: {integrity: sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -666,8 +666,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.24.6': - resolution: {integrity: sha512-lWfvAIFNWMlCsU0DRUun2GpFwZdGTukLaHJqRh1JRb80NdAP5Sb1HDHB5X9P9OtgZHQl089UzQkpYlBq2VTPRw==} + '@babel/plugin-syntax-jsx@7.24.7': + resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -714,8 +714,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.24.6': - resolution: {integrity: sha512-TzCtxGgVTEJWWwcYwQhCIQ6WaKlo80/B+Onsk4RRCcYqpYGFcG9etPW94VToGte5AAcxRrhjPUFvUS3Y2qKi4A==} + '@babel/plugin-syntax-typescript@7.24.7': + resolution: {integrity: sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -726,308 +726,308 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-arrow-functions@7.24.6': - resolution: {integrity: sha512-jSSSDt4ZidNMggcLx8SaKsbGNEfIl0PHx/4mFEulorE7bpYLbN0d3pDW3eJ7Y5Z3yPhy3L3NaPCYyTUY7TuugQ==} + '@babel/plugin-transform-arrow-functions@7.24.7': + resolution: {integrity: sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.24.6': - resolution: {integrity: sha512-VEP2o4iR2DqQU6KPgizTW2mnMx6BG5b5O9iQdrW9HesLkv8GIA8x2daXBQxw1MrsIkFQGA/iJ204CKoQ8UcnAA==} + '@babel/plugin-transform-async-generator-functions@7.24.7': + resolution: {integrity: sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.24.6': - resolution: {integrity: sha512-NTBA2SioI3OsHeIn6sQmhvXleSl9T70YY/hostQLveWs0ic+qvbA3fa0kwAwQ0OA/XGaAerNZRQGJyRfhbJK4g==} + '@babel/plugin-transform-async-to-generator@7.24.7': + resolution: {integrity: sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.24.6': - resolution: {integrity: sha512-XNW7jolYHW9CwORrZgA/97tL/k05qe/HL0z/qqJq1mdWhwwCM6D4BJBV7wAz9HgFziN5dTOG31znkVIzwxv+vw==} + '@babel/plugin-transform-block-scoped-functions@7.24.7': + resolution: {integrity: sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.24.6': - resolution: {integrity: sha512-S/t1Xh4ehW7sGA7c1j/hiOBLnEYCp/c2sEG4ZkL8kI1xX9tW2pqJTCHKtdhe/jHKt8nG0pFCrDHUXd4DvjHS9w==} + '@babel/plugin-transform-block-scoping@7.24.7': + resolution: {integrity: sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-properties@7.24.6': - resolution: {integrity: sha512-j6dZ0Z2Z2slWLR3kt9aOmSIrBvnntWjMDN/TVcMPxhXMLmJVqX605CBRlcGI4b32GMbfifTEsdEjGjiE+j/c3A==} + '@babel/plugin-transform-class-properties@7.24.7': + resolution: {integrity: sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.24.6': - resolution: {integrity: sha512-1QSRfoPI9RoLRa8Mnakc6v3e0gJxiZQTYrMfLn+mD0sz5+ndSzwymp2hDcYJTyT0MOn0yuWzj8phlIvO72gTHA==} + '@babel/plugin-transform-class-static-block@7.24.7': + resolution: {integrity: sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.24.6': - resolution: {integrity: sha512-+fN+NO2gh8JtRmDSOB6gaCVo36ha8kfCW1nMq2Gc0DABln0VcHN4PrALDvF5/diLzIRKptC7z/d7Lp64zk92Fg==} + '@babel/plugin-transform-classes@7.24.7': + resolution: {integrity: sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.24.6': - resolution: {integrity: sha512-cRzPobcfRP0ZtuIEkA8QzghoUpSB3X3qSH5W2+FzG+VjWbJXExtx0nbRqwumdBN1x/ot2SlTNQLfBCnPdzp6kg==} + '@babel/plugin-transform-computed-properties@7.24.7': + resolution: {integrity: sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.24.6': - resolution: {integrity: sha512-YLW6AE5LQpk5npNXL7i/O+U9CE4XsBCuRPgyjl1EICZYKmcitV+ayuuUGMJm2lC1WWjXYszeTnIxF/dq/GhIZQ==} + '@babel/plugin-transform-destructuring@7.24.7': + resolution: {integrity: sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dotall-regex@7.24.6': - resolution: {integrity: sha512-rCXPnSEKvkm/EjzOtLoGvKseK+dS4kZwx1HexO3BtRtgL0fQ34awHn34aeSHuXtZY2F8a1X8xqBBPRtOxDVmcA==} + '@babel/plugin-transform-dotall-regex@7.24.7': + resolution: {integrity: sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-keys@7.24.6': - resolution: {integrity: sha512-/8Odwp/aVkZwPFJMllSbawhDAO3UJi65foB00HYnK/uXvvCPm0TAXSByjz1mpRmp0q6oX2SIxpkUOpPFHk7FLA==} + '@babel/plugin-transform-duplicate-keys@7.24.7': + resolution: {integrity: sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dynamic-import@7.24.6': - resolution: {integrity: sha512-vpq8SSLRTBLOHUZHSnBqVo0AKX3PBaoPs2vVzYVWslXDTDIpwAcCDtfhUcHSQQoYoUvcFPTdC8TZYXu9ZnLT/w==} + '@babel/plugin-transform-dynamic-import@7.24.7': + resolution: {integrity: sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.24.6': - resolution: {integrity: sha512-EemYpHtmz0lHE7hxxxYEuTYOOBZ43WkDgZ4arQ4r+VX9QHuNZC+WH3wUWmRNvR8ECpTRne29aZV6XO22qpOtdA==} + '@babel/plugin-transform-exponentiation-operator@7.24.7': + resolution: {integrity: sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.24.6': - resolution: {integrity: sha512-inXaTM1SVrIxCkIJ5gqWiozHfFMStuGbGJAxZFBoHcRRdDP0ySLb3jH6JOwmfiinPwyMZqMBX+7NBDCO4z0NSA==} + '@babel/plugin-transform-export-namespace-from@7.24.7': + resolution: {integrity: sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-for-of@7.24.6': - resolution: {integrity: sha512-n3Sf72TnqK4nw/jziSqEl1qaWPbCRw2CziHH+jdRYvw4J6yeCzsj4jdw8hIntOEeDGTmHVe2w4MVL44PN0GMzg==} + '@babel/plugin-transform-for-of@7.24.7': + resolution: {integrity: sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.24.6': - resolution: {integrity: sha512-sOajCu6V0P1KPljWHKiDq6ymgqB+vfo3isUS4McqW1DZtvSVU2v/wuMhmRmkg3sFoq6GMaUUf8W4WtoSLkOV/Q==} + '@babel/plugin-transform-function-name@7.24.7': + resolution: {integrity: sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.24.6': - resolution: {integrity: sha512-Uvgd9p2gUnzYJxVdBLcU0KurF8aVhkmVyMKW4MIY1/BByvs3EBpv45q01o7pRTVmTvtQq5zDlytP3dcUgm7v9w==} + '@babel/plugin-transform-json-strings@7.24.7': + resolution: {integrity: sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.24.6': - resolution: {integrity: sha512-f2wHfR2HF6yMj+y+/y07+SLqnOSwRp8KYLpQKOzS58XLVlULhXbiYcygfXQxJlMbhII9+yXDwOUFLf60/TL5tw==} + '@babel/plugin-transform-literals@7.24.7': + resolution: {integrity: sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.24.6': - resolution: {integrity: sha512-EKaWvnezBCMkRIHxMJSIIylzhqK09YpiJtDbr2wsXTwnO0TxyjMUkaw4RlFIZMIS0iDj0KyIg7H7XCguHu/YDA==} + '@babel/plugin-transform-logical-assignment-operators@7.24.7': + resolution: {integrity: sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-member-expression-literals@7.24.6': - resolution: {integrity: sha512-9g8iV146szUo5GWgXpRbq/GALTnY+WnNuRTuRHWWFfWGbP9ukRL0aO/jpu9dmOPikclkxnNsjY8/gsWl6bmZJQ==} + '@babel/plugin-transform-member-expression-literals@7.24.7': + resolution: {integrity: sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-amd@7.24.6': - resolution: {integrity: sha512-eAGogjZgcwqAxhyFgqghvoHRr+EYRQPFjUXrTYKBRb5qPnAVxOOglaxc4/byHqjvq/bqO2F3/CGwTHsgKJYHhQ==} + '@babel/plugin-transform-modules-amd@7.24.7': + resolution: {integrity: sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.24.6': - resolution: {integrity: sha512-JEV8l3MHdmmdb7S7Cmx6rbNEjRCgTQMZxllveHO0mx6uiclB0NflCawlQQ6+o5ZrwjUBYPzHm2XoK4wqGVUFuw==} + '@babel/plugin-transform-modules-commonjs@7.24.7': + resolution: {integrity: sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.24.6': - resolution: {integrity: sha512-xg1Z0J5JVYxtpX954XqaaAT6NpAY6LtZXvYFCJmGFJWwtlz2EmJoR8LycFRGNE8dBKizGWkGQZGegtkV8y8s+w==} + '@babel/plugin-transform-modules-systemjs@7.24.7': + resolution: {integrity: sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-umd@7.24.6': - resolution: {integrity: sha512-esRCC/KsSEUvrSjv5rFYnjZI6qv4R1e/iHQrqwbZIoRJqk7xCvEUiN7L1XrmW5QSmQe3n1XD88wbgDTWLbVSyg==} + '@babel/plugin-transform-modules-umd@7.24.7': + resolution: {integrity: sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-named-capturing-groups-regex@7.24.6': - resolution: {integrity: sha512-6DneiCiu91wm3YiNIGDWZsl6GfTTbspuj/toTEqLh9d4cx50UIzSdg+T96p8DuT7aJOBRhFyaE9ZvTHkXrXr6Q==} + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7': + resolution: {integrity: sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-new-target@7.24.6': - resolution: {integrity: sha512-f8liz9JG2Va8A4J5ZBuaSdwfPqN6axfWRK+y66fjKYbwf9VBLuq4WxtinhJhvp1w6lamKUwLG0slK2RxqFgvHA==} + '@babel/plugin-transform-new-target@7.24.7': + resolution: {integrity: sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.6': - resolution: {integrity: sha512-+QlAiZBMsBK5NqrBWFXCYeXyiU1y7BQ/OYaiPAcQJMomn5Tyg+r5WuVtyEuvTbpV7L25ZSLfE+2E9ywj4FD48A==} + '@babel/plugin-transform-nullish-coalescing-operator@7.24.7': + resolution: {integrity: sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.24.6': - resolution: {integrity: sha512-6voawq8T25Jvvnc4/rXcWZQKKxUNZcKMS8ZNrjxQqoRFernJJKjE3s18Qo6VFaatG5aiX5JV1oPD7DbJhn0a4Q==} + '@babel/plugin-transform-numeric-separator@7.24.7': + resolution: {integrity: sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.24.6': - resolution: {integrity: sha512-OKmi5wiMoRW5Smttne7BwHM8s/fb5JFs+bVGNSeHWzwZkWXWValR1M30jyXo1s/RaqgwwhEC62u4rFH/FBcBPg==} + '@babel/plugin-transform-object-rest-spread@7.24.7': + resolution: {integrity: sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-super@7.24.6': - resolution: {integrity: sha512-N/C76ihFKlZgKfdkEYKtaRUtXZAgK7sOY4h2qrbVbVTXPrKGIi8aww5WGe/+Wmg8onn8sr2ut6FXlsbu/j6JHg==} + '@babel/plugin-transform-object-super@7.24.7': + resolution: {integrity: sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.24.6': - resolution: {integrity: sha512-L5pZ+b3O1mSzJ71HmxSCmTVd03VOT2GXOigug6vDYJzE5awLI7P1g0wFcdmGuwSDSrQ0L2rDOe/hHws8J1rv3w==} + '@babel/plugin-transform-optional-catch-binding@7.24.7': + resolution: {integrity: sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.24.6': - resolution: {integrity: sha512-cHbqF6l1QP11OkYTYQ+hhVx1E017O5ZcSPXk9oODpqhcAD1htsWG2NpHrrhthEO2qZomLK0FXS+u7NfrkF5aOQ==} + '@babel/plugin-transform-optional-chaining@7.24.7': + resolution: {integrity: sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.24.6': - resolution: {integrity: sha512-ST7guE8vLV+vI70wmAxuZpIKzVjvFX9Qs8bl5w6tN/6gOypPWUmMQL2p7LJz5E63vEGrDhAiYetniJFyBH1RkA==} + '@babel/plugin-transform-parameters@7.24.7': + resolution: {integrity: sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.24.6': - resolution: {integrity: sha512-T9LtDI0BgwXOzyXrvgLTT8DFjCC/XgWLjflczTLXyvxbnSR/gpv0hbmzlHE/kmh9nOvlygbamLKRo6Op4yB6aw==} + '@babel/plugin-transform-private-methods@7.24.7': + resolution: {integrity: sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.24.6': - resolution: {integrity: sha512-Qu/ypFxCY5NkAnEhCF86Mvg3NSabKsh/TPpBVswEdkGl7+FbsYHy1ziRqJpwGH4thBdQHh8zx+z7vMYmcJ7iaQ==} + '@babel/plugin-transform-private-property-in-object@7.24.7': + resolution: {integrity: sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-property-literals@7.24.6': - resolution: {integrity: sha512-oARaglxhRsN18OYsnPTpb8TcKQWDYNsPNmTnx5++WOAsUJ0cSC/FZVlIJCKvPbU4yn/UXsS0551CFKJhN0CaMw==} + '@babel/plugin-transform-property-literals@7.24.7': + resolution: {integrity: sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.24.6': - resolution: {integrity: sha512-SMDxO95I8WXRtXhTAc8t/NFQUT7VYbIWwJCJgEli9ml4MhqUMh4S6hxgH6SmAC3eAQNWCDJFxcFeEt9w2sDdXg==} + '@babel/plugin-transform-regenerator@7.24.7': + resolution: {integrity: sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-reserved-words@7.24.6': - resolution: {integrity: sha512-DcrgFXRRlK64dGE0ZFBPD5egM2uM8mgfrvTMOSB2yKzOtjpGegVYkzh3s1zZg1bBck3nkXiaOamJUqK3Syk+4A==} + '@babel/plugin-transform-reserved-words@7.24.7': + resolution: {integrity: sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-runtime@7.24.6': - resolution: {integrity: sha512-W3gQydMb0SY99y/2lV0Okx2xg/8KzmZLQsLaiCmwNRl1kKomz14VurEm+2TossUb+sRvBCnGe+wx8KtIgDtBbQ==} + '@babel/plugin-transform-runtime@7.24.7': + resolution: {integrity: sha512-YqXjrk4C+a1kZjewqt+Mmu2UuV1s07y8kqcUf4qYLnoqemhR4gRQikhdAhSVJioMjVTu6Mo6pAbaypEA3jY6fw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.24.6': - resolution: {integrity: sha512-xnEUvHSMr9eOWS5Al2YPfc32ten7CXdH7Zwyyk7IqITg4nX61oHj+GxpNvl+y5JHjfN3KXE2IV55wAWowBYMVw==} + '@babel/plugin-transform-shorthand-properties@7.24.7': + resolution: {integrity: sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.24.6': - resolution: {integrity: sha512-h/2j7oIUDjS+ULsIrNZ6/TKG97FgmEk1PXryk/HQq6op4XUUUwif2f69fJrzK0wza2zjCS1xhXmouACaWV5uPA==} + '@babel/plugin-transform-spread@7.24.7': + resolution: {integrity: sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.24.6': - resolution: {integrity: sha512-fN8OcTLfGmYv7FnDrsjodYBo1DhPL3Pze/9mIIE2MGCT1KgADYIOD7rEglpLHZj8PZlC/JFX5WcD+85FLAQusw==} + '@babel/plugin-transform-sticky-regex@7.24.7': + resolution: {integrity: sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-template-literals@7.24.6': - resolution: {integrity: sha512-BJbEqJIcKwrqUP+KfUIkxz3q8VzXe2R8Wv8TaNgO1cx+nNavxn/2+H8kp9tgFSOL6wYPPEgFvU6IKS4qoGqhmg==} + '@babel/plugin-transform-template-literals@7.24.7': + resolution: {integrity: sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.24.6': - resolution: {integrity: sha512-IshCXQ+G9JIFJI7bUpxTE/oA2lgVLAIK8q1KdJNoPXOpvRaNjMySGuvLfBw/Xi2/1lLo953uE8hyYSDW3TSYig==} + '@babel/plugin-transform-typeof-symbol@7.24.7': + resolution: {integrity: sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.24.6': - resolution: {integrity: sha512-H0i+hDLmaYYSt6KU9cZE0gb3Cbssa/oxWis7PX4ofQzbvsfix9Lbh8SRk7LCPDlLWJHUiFeHU0qRRpF/4Zv7mQ==} + '@babel/plugin-transform-typescript@7.24.7': + resolution: {integrity: sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-escapes@7.24.6': - resolution: {integrity: sha512-bKl3xxcPbkQQo5eX9LjjDpU2xYHeEeNQbOhj0iPvetSzA+Tu9q/o5lujF4Sek60CM6MgYvOS/DJuwGbiEYAnLw==} + '@babel/plugin-transform-unicode-escapes@7.24.7': + resolution: {integrity: sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-property-regex@7.24.6': - resolution: {integrity: sha512-8EIgImzVUxy15cZiPii9GvLZwsy7Vxc+8meSlR3cXFmBIl5W5Tn9LGBf7CDKkHj4uVfNXCJB8RsVfnmY61iedA==} + '@babel/plugin-transform-unicode-property-regex@7.24.7': + resolution: {integrity: sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.24.6': - resolution: {integrity: sha512-pssN6ExsvxaKU638qcWb81RrvvgZom3jDgU/r5xFZ7TONkZGFf4MhI2ltMb8OcQWhHyxgIavEU+hgqtbKOmsPA==} + '@babel/plugin-transform-unicode-regex@7.24.7': + resolution: {integrity: sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-sets-regex@7.24.6': - resolution: {integrity: sha512-quiMsb28oXWIDK0gXLALOJRXLgICLiulqdZGOaPPd0vRT7fQp74NtdADAVu+D8s00C+0Xs0MxVP0VKF/sZEUgw==} + '@babel/plugin-transform-unicode-sets-regex@7.24.7': + resolution: {integrity: sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.24.6': - resolution: {integrity: sha512-CrxEAvN7VxfjOG8JNF2Y/eMqMJbZPZ185amwGUBp8D9USK90xQmv7dLdFSa+VbD7fdIqcy/Mfv7WtzG8+/qxKg==} + '@babel/preset-env@7.24.7': + resolution: {integrity: sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1037,8 +1037,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.24.6': - resolution: {integrity: sha512-U10aHPDnokCFRXgyT/MaIRTivUu2K/mu0vJlwRS9LxJmJet+PFQNKpggPyFCUtC6zWSBPjvxjnpNkAn3Uw2m5w==} + '@babel/preset-typescript@7.24.7': + resolution: {integrity: sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1046,24 +1046,24 @@ packages: '@babel/regjsgen@0.8.0': resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - '@babel/runtime@7.24.6': - resolution: {integrity: sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw==} + '@babel/runtime@7.24.7': + resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} engines: {node: '>=6.9.0'} - '@babel/standalone@7.24.6': - resolution: {integrity: sha512-ch8nbtobUPLvSLKdG2s8pVAqS1zUc+mt7UE9k8/xpupvETbAFOaoqo0QcpgVD/f0xkMkbUnqedVY5eeVWOqtjw==} + '@babel/standalone@7.24.7': + resolution: {integrity: sha512-QRIRMJ2KTeN+vt4l9OjYlxDVXEpcor1Z6V7OeYzeBOw6Q8ew9oMTHjzTx8s6ClsZO7wVf6JgTRutihatN6K0yA==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.6': - resolution: {integrity: sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw==} + '@babel/template@7.24.7': + resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.6': - resolution: {integrity: sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw==} + '@babel/traverse@7.24.7': + resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.6': - resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} + '@babel/types@7.24.7': + resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -1085,8 +1085,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.21.4': - resolution: {integrity: sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==} + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -1103,8 +1103,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.21.4': - resolution: {integrity: sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==} + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -1121,8 +1121,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.21.4': - resolution: {integrity: sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==} + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -1139,8 +1139,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.21.4': - resolution: {integrity: sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==} + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -1157,8 +1157,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.21.4': - resolution: {integrity: sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==} + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -1175,8 +1175,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.21.4': - resolution: {integrity: sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==} + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -1193,8 +1193,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.21.4': - resolution: {integrity: sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==} + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -1211,8 +1211,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.4': - resolution: {integrity: sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==} + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -1229,8 +1229,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.21.4': - resolution: {integrity: sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==} + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -1247,8 +1247,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.21.4': - resolution: {integrity: sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==} + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -1265,8 +1265,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.21.4': - resolution: {integrity: sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==} + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -1283,8 +1283,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.21.4': - resolution: {integrity: sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==} + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -1301,8 +1301,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.21.4': - resolution: {integrity: sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==} + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -1319,8 +1319,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.21.4': - resolution: {integrity: sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==} + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -1337,8 +1337,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.21.4': - resolution: {integrity: sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==} + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1355,8 +1355,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.21.4': - resolution: {integrity: sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==} + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1373,8 +1373,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.21.4': - resolution: {integrity: sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==} + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -1391,8 +1391,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.21.4': - resolution: {integrity: sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==} + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1409,8 +1409,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.21.4': - resolution: {integrity: sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==} + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1427,8 +1427,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.21.4': - resolution: {integrity: sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==} + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1445,8 +1445,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.21.4': - resolution: {integrity: sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==} + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1463,8 +1463,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.21.4': - resolution: {integrity: sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==} + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1481,8 +1481,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.4': - resolution: {integrity: sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==} + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1493,10 +1493,14 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.10.1': + resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/config-array@0.15.1': + resolution: {integrity: sha512-K4gzNq+yymn/EVsXYmf+SBcBro8MTf+aXJZUphM96CdzUEr+ClGDvAbpmaEK+cGVigVXIgs9gNmvHAlrzzY5JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1509,14 +1513,14 @@ packages: resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.3.0': - resolution: {integrity: sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.4.0': resolution: {integrity: sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@2.1.3': + resolution: {integrity: sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@faker-js/faker@8.4.1': resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} @@ -1530,10 +1534,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1541,6 +1542,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@humanwhocodes/retry@0.3.0': resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} @@ -1591,115 +1593,103 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nrwl/devkit@19.1.2': - resolution: {integrity: sha512-vWI+OrTICE9Yw6C/jIwxybnvavI9dnQJ7tpzFbLcSVfFAGdFtYJGCLVe40IkWcvUfELoVmzpXtKP/sPy0D7J9w==} + '@nrwl/devkit@19.2.3': + resolution: {integrity: sha512-OL6sc70gR/USasvbYzyYY44Hd5ZCde2UfiA5h8VeAYAJbq+JmtscpvjcnZ7OIsXyYEOxe1rypULElqu/8qpKzQ==} - '@nrwl/js@19.1.2': - resolution: {integrity: sha512-ZLEqbAqpr6n2qZADp7FsDPewJDUp3i5uJ8TaZRYFN0PVe6spzeE4PlTg/sR/ZH83N1zjrBD0hTVsquhiGPr0fg==} + '@nrwl/js@19.2.3': + resolution: {integrity: sha512-foM72vQZBjUXu/8RuTBK9fwf6Oyezqbv2nQQBmJmUhCeh9Tg3P9JPcSRIdI740qTjRlF05zouJPABFu899vuPQ==} - '@nrwl/tao@19.1.2': - resolution: {integrity: sha512-OseWzHXNwOmZinUjHCD+edinvNJq5ngGrn/yKO81Zm/FDxkcYjud20dMsXi8zYfgDjvQv22eDtk5v1BTlSx57A==} + '@nrwl/tao@19.2.3': + resolution: {integrity: sha512-vwo6ogcy6A9vJggDOsHGi1F0cTRqSqRypbgq/EdNuZqL7rGyZB/ctId69/i8dV6cLkl8BJG/4WpEe5BIrMTsjA==} hasBin: true - '@nrwl/vite@19.1.2': - resolution: {integrity: sha512-6gLrWuHiFlr1MWbRne5Bv0WfduAu6DCmX7Wy8b5CP2GBZObJN2xNd+qaXcGoo/HK1eceE/lQ9tklng1dYiSOkw==} + '@nrwl/vite@19.2.3': + resolution: {integrity: sha512-G0IHrxYsekHPPdcdT2J29agFMI8hIN8t4VyxXxHScEsIRVHLMqu+4NAqn8gRV57DW7wqgyHp8ORd2pmAXGtNYA==} - '@nrwl/workspace@19.1.2': - resolution: {integrity: sha512-vViwPcrDRsW6n9huBeQ06HLRd7m03sIJbpK3LvMwo79RZ4XHWqC1bIIbFeujPFQrCU8dtQAA9lL3CeOfAVAxAw==} + '@nrwl/workspace@19.2.3': + resolution: {integrity: sha512-pqT2UDk3DjB+Ny+1Av22vZ4NIYpwRbfPHR9tm4Skxs7dSr5zlf3ChUl+MwrQhzvM3KhBoGEmHhQOR6n45Bo4Sg==} - '@nx/devkit@19.1.2': - resolution: {integrity: sha512-oHYZzfmvogPh7z8pf1RjW7eJaS05VZ1Ts/axlWerzQauWT7aoeyCaxa0D9q3ThnUuDt1PqKjwJi5jmCihBT2Sw==} + '@nx/devkit@19.2.3': + resolution: {integrity: sha512-if1WwRVexrQBBADObEcxVIivq4QRZWY/nYRhCQy/qfFI6Cu2jBSI6ZQ1uy7to2L2sQPLgn8v2beQZiAeZdIktg==} peerDependencies: nx: '>= 17 <= 20' - '@nx/eslint@19.1.2': - resolution: {integrity: sha512-L0qj7BU5EcaRgntzfL08P7pQfMbZQ2tmRcfgkIMbrDsVfU9Fz64edf7vv3crziB7d86iU7HxnzXhD9Q+P8gKcw==} - peerDependencies: - '@zkochan/js-yaml': 0.0.7 - eslint: ^8.0.0 || ^9.0.0 - peerDependenciesMeta: - '@zkochan/js-yaml': - optional: true - - '@nx/js@19.1.2': - resolution: {integrity: sha512-NRi3MsrhQxvg8OLFG+cKeXVYG0ghMYeOFgr1si6tmaQG0rNyjzcl6r9X4R9yS9JXeWxXZ86MLvRfoALlXNcORg==} + '@nx/js@19.2.3': + resolution: {integrity: sha512-5nY/KNGV+I3VjVoEeP3azfMt1JJg6fP+llO7w0AqViczY8IzmOhdfwSY6ddKgsejURR8OTcy7Z61T9ISthOfKg==} peerDependencies: verdaccio: ^5.0.4 peerDependenciesMeta: verdaccio: optional: true - '@nx/linter@19.1.2': - resolution: {integrity: sha512-clZEtXeaQzM7xmC/yuWGyp6CY4IuJpZLcrnHfj5hEhFx6zsezRDGzPQbJzXJkvG6bzuCS1oypEzfz2r3Yl5abw==} - - '@nx/nx-darwin-arm64@19.1.2': - resolution: {integrity: sha512-YeT/u+r0iZSokbVFsuiFpF/eFAZmR1p6gkpHo6cVIb0KTkH6Sd1n3s1cjfOKEZg+M0emf9Q8QQ6tw41wGrUm4Q==} + '@nx/nx-darwin-arm64@19.2.3': + resolution: {integrity: sha512-1beJscdMraGgLHpvjyC5FXUzpdQYW8JwnPK0Yj9iti9Vnahtx3PLQHCFOFwoE0KZF9VEL1KsZSSVPljMgW/j+g==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@19.1.2': - resolution: {integrity: sha512-nmbz/4tgvXwYmxIQptny7Cij0OTAxIdB2l+qmI4tkBnN2mT5UVqdG9t8ziSyZHJbWQjIHTkbgAbg5ar6vK/srA==} + '@nx/nx-darwin-x64@19.2.3': + resolution: {integrity: sha512-wCpIRThGKL/FebPe+WaFk/V6nk31mMc83APoEyhyS5kAodqeKjb6iPud+QNydtUJ/jsF9aQ/DaHIioKC9wbg8A==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@19.1.2': - resolution: {integrity: sha512-0wcBAr+IYOWBXNDdWHahjW1nCyFTP0O+dSsQa5ab5OBEo0UTvt1k/s27cUyaz2Ll070RTpzl54KD3O1i/1/X0Q==} + '@nx/nx-freebsd-x64@19.2.3': + resolution: {integrity: sha512-ytY18USCyf83wqyUgFaeRO/3zvysJXPJf1Di8czBhiUSroSMB6088OaeqW7SnzdcYNdACZUv0Q6PupXpx3w2Ng==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@19.1.2': - resolution: {integrity: sha512-A1L7T/Y8nOq7tc84WuaWMEeZ2uTjhqHJDNEfgZhnwYfQ3S94B0O2EkyEp29n9E4eN9XZmvYJzDt1tBz2ziZ6iA==} + '@nx/nx-linux-arm-gnueabihf@19.2.3': + resolution: {integrity: sha512-FPtqIMzdOzYSSDnLXUpcrflqEsNe6UgpAgYoHLVbWiR47O3qJnpQRDfYUsP7Lv+2C0CBKNXgwPEvmDLXKHcfYg==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@19.1.2': - resolution: {integrity: sha512-ze7FtI0hGMs6ap9Z8vo80nXMvuJGJP7CDcL8q2op/l9c23Qex+oG4khyZowJzq+fJPigqldAL3Fm+rHBzT4jhA==} + '@nx/nx-linux-arm64-gnu@19.2.3': + resolution: {integrity: sha512-VOuzPD5FBPZmctvXqdB9K1MYVzkV8TgOZFS7Md6ClH7UwJTEOjnMoomYCMM1VlOZV4P0S5E0u/Zere5YWh+ZWw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-arm64-musl@19.1.2': - resolution: {integrity: sha512-JMiSRLe3K83GQw26jGgJYCLDww7K4z5rVDlWHpQEMyiQSukJBZ5OMYxotkDcPDAMmmrUERXjabOsCi0xnyqUlA==} + '@nx/nx-linux-arm64-musl@19.2.3': + resolution: {integrity: sha512-qd6QZysktt0D7rNCOlBaV3ME0/J0VwvC1cmdjtZoljwtsX6Zc56AEdfwsgGzsZNU4w+N+BtXxowan3D44iiSzQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-x64-gnu@19.1.2': - resolution: {integrity: sha512-0XZSz37nrbABUxw2wOMsUP2djsYRxXn1+jbh/kcOH6PnlwiTPOJ6LwDENUh9lZ4PKflED5Tj0w6wx23/AH4z3g==} + '@nx/nx-linux-x64-gnu@19.2.3': + resolution: {integrity: sha512-wE08BstTD65dt6c+9L9bEp98PxFwc7CuaUVX2cZTDFAERBXCMhu7y6Gb1JbiAvfVci4+yLrm+h0E1ieY1wMTXw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-linux-x64-musl@19.1.2': - resolution: {integrity: sha512-tID0nKIUQZ5b1woFh3dtl7XK1Mv71kkwxxppMsOb0FVTigC8Yy7Zpu/ykKidnJ+VbHGSYhZ03BZXgAk/on9LXw==} + '@nx/nx-linux-x64-musl@19.2.3': + resolution: {integrity: sha512-IA09+NZ0kKPSfK/dXsyjZ8TN+hN/1PcnbdNuUCn1Opmbrdda9GBfzHSDFKXxoA6TVB/j/qnXHKgKxhhVH05TGg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-win32-arm64-msvc@19.1.2': - resolution: {integrity: sha512-AXEwOk0lhbWdy4OZmde0iC1sP/AAUMrw5a8Ah7S0QOXBj8X9wK1zyThviQnY1NpUzYGBbMkv3UgPDTArTdAeKA==} + '@nx/nx-win32-arm64-msvc@19.2.3': + resolution: {integrity: sha512-fkbcTp+XuxGaL5e4Ve8AjxNEim5Ifdn61ofaxEDMoGjauKvKZBejbLhBFOonCKDqntXsY8D2nDXjhcsdNYxzMg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@19.1.2': - resolution: {integrity: sha512-H8ldXwXnVff2A9tDU8AD7QE/uZV06D0gHBdbnrzbg74NOrkKvvUPXky0D6BMlooljkU9QXu7M46CWRNIoPSzQw==} + '@nx/nx-win32-x64-msvc@19.2.3': + resolution: {integrity: sha512-E2q3c504xjFXTY+/iq57DOZmS6CPA8RbFwLf6bCG5wo2BDajxmvU3VCeCSkxqXEwCY7NJSI3PT1V/3vRDzJ3lQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@nx/vite@19.1.2': - resolution: {integrity: sha512-uVwp8SaxZUl4wh1epk/bLDLD1Z/OnC6z1siT0NqAkl9Sj5FrjwRvD3D93/rgASGfuawnWvstq1xn+kF4ipO/Xg==} + '@nx/vite@19.2.3': + resolution: {integrity: sha512-TtjlOE8pWQCdzk9eDot3jZpb9jswQdAxoEL5OnBx17ZMZF/RMCNqNs4lwo0i+OzzH6jTcKmcZaq6dmt1+OhM0w==} peerDependencies: vite: ^5.0.0 vitest: ^1.3.1 - '@nx/workspace@19.1.2': - resolution: {integrity: sha512-PtJGRRrc+rCQFw2XHnmLlA7G5fbORhXa6uCjL3H8k6d3sSGBqJgJ8MkH7SLJ/0a49wVmn3hKlLpk3Sln+7IUlQ==} + '@nx/workspace@19.2.3': + resolution: {integrity: sha512-LC3CxKDzoLqRGNwVD1wWkxGwCBf9AzyCztXyMIh1ihVL2hLnRna3pLJrk+3R2hXYapRsbhpGT7twLlNZJz9lQw==} '@parcel/watcher-android-arm64@2.4.1': resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==} @@ -1827,8 +1817,8 @@ packages: rollup: optional: true - '@rollup/plugin-replace@5.0.5': - resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==} + '@rollup/plugin-replace@5.0.7': + resolution: {integrity: sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -1975,8 +1965,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/lodash@4.17.4': - resolution: {integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==} + '@types/lodash@4.17.5': + resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==} '@types/minimatch@3.0.5': resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} @@ -1984,11 +1974,8 @@ packages: '@types/node@20.12.14': resolution: {integrity: sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg==} - '@types/node@20.14.0': - resolution: {integrity: sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA==} - - '@types/node@20.14.1': - resolution: {integrity: sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA==} + '@types/node@20.14.2': + resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -2002,8 +1989,8 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@typescript-eslint/eslint-plugin@7.12.0': - resolution: {integrity: sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q==} + '@typescript-eslint/eslint-plugin@7.13.0': + resolution: {integrity: sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -2013,8 +2000,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.12.0': - resolution: {integrity: sha512-dm/J2UDY3oV3TKius2OUZIFHsomQmpHtsV0FTh1WO8EKgHLQ1QCADUqscPgTpU+ih1e21FQSRjXckHn3txn6kQ==} + '@typescript-eslint/parser@7.13.0': + resolution: {integrity: sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2023,12 +2010,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.12.0': - resolution: {integrity: sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg==} + '@typescript-eslint/scope-manager@7.13.0': + resolution: {integrity: sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.12.0': - resolution: {integrity: sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA==} + '@typescript-eslint/type-utils@7.13.0': + resolution: {integrity: sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2037,12 +2024,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.12.0': - resolution: {integrity: sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg==} + '@typescript-eslint/types@7.13.0': + resolution: {integrity: sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.12.0': - resolution: {integrity: sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ==} + '@typescript-eslint/typescript-estree@7.13.0': + resolution: {integrity: sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -2050,14 +2037,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.12.0': - resolution: {integrity: sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ==} + '@typescript-eslint/utils@7.13.0': + resolution: {integrity: sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.12.0': - resolution: {integrity: sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ==} + '@typescript-eslint/visitor-keys@7.13.0': + resolution: {integrity: sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==} engines: {node: ^18.18.0 || >=20.0.0} '@ungap/structured-clone@1.2.0': @@ -2135,8 +2122,8 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ajv@8.15.0: - resolution: {integrity: sha512-15BTtQUOsSrmHCy+B4VnAiJAJxJ8IFgu6fcjFQF3jQYZ78nLSQthlFg4ehp+NLIyfvFgOlxNsjKIEhydtFPVHQ==} + ajv@8.16.0: + resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -2281,8 +2268,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + browserslist@4.23.1: + resolution: {integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2296,11 +2283,16 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} - bun-types@1.1.12: - resolution: {integrity: sha512-DIM2C9qCECwhck9nLsCDeTv943VmGMCkwX3KljjprSRDXaK2CSiUDVGbUit80Er38ukgxuESJgYPAys4FsNCdg==} + bun-types@1.1.13: + resolution: {integrity: sha512-G/TqF0SsMQGLr4g7K3B2BK8BrPEA1EqCNwxZbyRdj5M4t54zvwyaqvRJOW34kuPqc2IvNNalRU3swc8B4oc4FA==} - c12@1.10.0: - resolution: {integrity: sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g==} + c12@1.11.1: + resolution: {integrity: sha512-KDU0TvSvVdaYcQKQ6iPHATGz/7p/KiVjPg4vQrB6Jg/wX9R0yl5RZxWm9IoZqaIHD2+6PZd81+KMGwRr/lRIUg==} + peerDependencies: + magicast: ^0.3.4 + peerDependenciesMeta: + magicast: + optional: true cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} @@ -2320,8 +2312,8 @@ packages: caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - caniuse-lite@1.0.30001621: - resolution: {integrity: sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==} + caniuse-lite@1.0.30001632: + resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==} chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} @@ -2487,8 +2479,8 @@ packages: engines: {node: '>=4'} hasBin: true - cssnano-preset-default@7.0.1: - resolution: {integrity: sha512-Fumyr+uZMcjYQeuHssAZxn0cKj3cdQc5GcxkBcmEzISGB+UW9CLNlU4tBOJbJGcPukFDlicG32eFbrc8K9V5pw==} + cssnano-preset-default@7.0.2: + resolution: {integrity: sha512-z95kGKZx8VWHfERj7LFzuiTxylbvEp07ZEYaFu+t6bFyNOXLd/+3oPyNaY7ISwcrfHFCkt8OfRo4IZxVRJZ7dg==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -2499,8 +2491,8 @@ packages: peerDependencies: postcss: ^8.4.31 - cssnano@7.0.1: - resolution: {integrity: sha512-917Mej/4SdI7b55atsli3sU4MOJ9XDoKgnlCtQtXYj8XUFcM3riTuYHyqBBnnskawW+zWwp0KxJzpEUodlpqUg==} + cssnano@7.0.2: + resolution: {integrity: sha512-LXm/Xx6TNLzfHM2lBaIQHfvtdW5QfdbyLzfJAWZrclCAb47yVa0/yJG69+amcw3Lq0YZ+kyU40rbsMPLcMt9aw==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -2509,8 +2501,8 @@ packages: resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + debug@4.3.5: + resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -2518,8 +2510,8 @@ packages: supports-color: optional: true - deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} engines: {node: '>=6'} deep-is@0.1.4: @@ -2622,8 +2614,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.4.783: - resolution: {integrity: sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ==} + electron-to-chromium@1.4.798: + resolution: {integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2631,8 +2623,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - enhanced-resolve@5.16.1: - resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} + enhanced-resolve@5.17.0: + resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==} engines: {node: '>=10.13.0'} enquirer@2.3.6: @@ -2663,8 +2655,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.21.4: - resolution: {integrity: sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==} + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} hasBin: true @@ -2680,8 +2672,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-compat-utils@0.5.0: - resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==} + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' @@ -2692,14 +2684,14 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-es-x@7.6.0: - resolution: {integrity: sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==} + eslint-plugin-es-x@7.7.0: + resolution: {integrity: sha512-aP3qj8BwiEDPttxQkZdI221DLKq9sI/qHolE2YSQL1/9+xk7dTV+tB1Fz8/IaCA+lnLA1bDEnvaS2LKs0k2Uig==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' - eslint-plugin-n@17.7.0: - resolution: {integrity: sha512-4Jg4ZKVE4VjHig2caBqPHYNW5na84RVufUuipFLJbgM/G57O6FdpUKJbHakCDJb/yjQuyqVzYWRtU3HNYaZUwg==} + eslint-plugin-n@17.8.1: + resolution: {integrity: sha512-KdG0h0voZms8UhndNu8DeWx1eM4sY+A4iXtsNo6kOfJLYHNeTGPacGalJ9GcvrbmOL3r/7QOMwVZDSw+1SqsrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -2730,8 +2722,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - eslint@9.3.0: - resolution: {integrity: sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ==} + eslint@9.4.0: + resolution: {integrity: sha512-sjc7Y8cUD1IlwYcTS9qPSvGjAC8Ne9LctpxKKu3x/1IC9bnOg98Zy6GxEJUfr1NojMgVPlyANXYns8oE2c1TAA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -2805,9 +2797,6 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@2.3.0: - resolution: {integrity: sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==} - fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} @@ -2875,6 +2864,9 @@ packages: from@0.1.7: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} + front-matter@4.0.2: + resolution: {integrity: sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==} + fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -2967,8 +2959,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.3.0: - resolution: {integrity: sha512-cCdyVjIUVTtX8ZsPkq1oCsOsLmGIswqnjZYMJJTGaNApj1yHtLSymKhwH51ttirREn75z3p4k051clwg7rvNKA==} + globals@15.4.0: + resolution: {integrity: sha512-unnwvMZpv0eDUyjNyh9DH/yxUaRYrEjW/qK4QcdrHg3oO11igUQrCSgODHEqxlKg8v2CD2Sd7UkqqEBoz5U7TQ==} engines: {node: '>=18'} globby@11.1.0: @@ -3188,8 +3180,8 @@ packages: jinx-rust@0.1.6: resolution: {integrity: sha512-qP+wtQL1PrDDFwtPKhNGtjWOmijCrKdfUHWTV2G/ikxfjrh+cjdvkQTmny9RAsVF0jiui9m+F0INWu4cuRcZeQ==} - jiti@1.21.0: - resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true joi@17.13.1: @@ -3269,8 +3261,8 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lilconfig@3.1.1: - resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} lines-and-columns@1.2.4: @@ -3435,8 +3427,8 @@ packages: vue-tsc: optional: true - mlly@1.7.0: - resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==} + mlly@1.7.1: + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -3501,8 +3493,8 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nx@19.1.2: - resolution: {integrity: sha512-hqD0HglmZCqgPLGcEfLq79El9iBUlinoncmsk6wsPHJM1IrASxHkemJZiehYilQx55QACd1MGBjC2nySZmgyLA==} + nx@19.2.3: + resolution: {integrity: sha512-SvxFgk9PD2m6tXEaqB6DENOpe4jhov/Ili/2JmOnPAAIGUR6H9WajCzVuHfq3bvQxmGRvkQQRv/rfvAuLTme3g==} hasBin: true peerDependencies: '@swc-node/register': ^1.8.0 @@ -3668,14 +3660,14 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss-merge-longhand@7.0.0: - resolution: {integrity: sha512-0X8I4/9+G03X5/5NnrfopG/YEln2XU8heDh7YqBaiq2SeaKIG3n66ShZPjIolmVuLBQ0BEm3yS8o1mlCLHdW7A==} + postcss-merge-longhand@7.0.1: + resolution: {integrity: sha512-qZlD26hnqSTMxSSOMS8+QCeRWtqOdMKeQHvHcBhjL3mJxKUs47cvO1Y1x3iTdYIk3ioMcRHTiy229TT0mEMH/A==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 - postcss-merge-rules@7.0.0: - resolution: {integrity: sha512-Zty3VlOsD6VSjBMu6PiHCVpLegtBT/qtZRVBcSeyEZ6q1iU5qTYT0WtEoLRV+YubZZguS5/ycfP+NRiKfjv6aw==} + postcss-merge-rules@7.0.1: + resolution: {integrity: sha512-bb8McYQbo2etgs0uVt6AfngajACK3FHSVP3sGLhprrjbtHJWgG03JZ4KKBlJ8/5Fb8/Rr+mMKaybMYeoYrAg0A==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -3698,8 +3690,8 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss-minify-selectors@7.0.0: - resolution: {integrity: sha512-f00CExZhD6lNw2vTZbcnmfxVgaVKzUw6IRsIFX3JTT8GdsoABc1WnhhGwL1i8YPJ3sSWw39fv7XPtvLb+3Uitw==} + postcss-minify-selectors@7.0.1: + resolution: {integrity: sha512-YfIbGtcgMFquPxV2L/ASs36ZS4DsgfcDX9tQ8cTEIvBTv+0GXFKtcvvpi9tCKto/+DWGWYKMCESFG3Pnan0Feg==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -3786,14 +3778,14 @@ packages: resolution: {integrity: sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==} engines: {node: '>=4'} - postcss-svgo@7.0.0: - resolution: {integrity: sha512-Xj5DRdvA97yRy3wjbCH2NKXtDUwEnph6EHr5ZXszsBVKCNrKXYBjzAXqav7/Afz5WwJ/1peZoTguCEJIg7ytmA==} + postcss-svgo@7.0.1: + resolution: {integrity: sha512-0WBUlSL4lhD9rA5k1e5D8EN5wCEyZD6HJk0jIvRxl+FDVOMlJ7DePHYWGGVc5QRqrJ3/06FTXM0bxjmJpmTPSA==} engines: {node: ^18.12.0 || ^20.9.0 || >= 18} peerDependencies: postcss: ^8.4.31 - postcss-unique-selectors@7.0.0: - resolution: {integrity: sha512-NYFqcft7vVQMZlQPsMdMPy+qU/zDpy95Malpw4GeA9ZZjM6dVXDshXtDmLc0m4WCD6XeZCJqjTfPT1USsdt+rA==} + postcss-unique-selectors@7.0.1: + resolution: {integrity: sha512-MH7QE/eKUftTB5ta40xcHLl7hkZjgDFydpfTK+QWXeHxghVt3VoPqYL5/G+zYZPPIs+8GuqFXSTgxBSoB1RZtQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -3822,8 +3814,8 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.3.0: - resolution: {integrity: sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==} + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} engines: {node: '>=14'} hasBin: true @@ -4041,8 +4033,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - start-server-and-test@2.0.3: - resolution: {integrity: sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==} + start-server-and-test@2.0.4: + resolution: {integrity: sha512-CKNeBTcP0hVqIlNismHMudb9q3lLdAjcVPO13/7gfI66fcJpeIb/o4NzQd1JK/CD+lfWVqr10ZH9Y14+OwlJuw==} engines: {node: '>=16'} hasBin: true @@ -4087,8 +4079,8 @@ packages: engines: {node: '>=4'} hasBin: true - stylehacks@7.0.0: - resolution: {integrity: sha512-47Nw4pQ6QJb4CA6dzF2m9810sjQik4dfk4UwAm5wlwhrW3syzZKF8AR4/cfO3Cr6lsFgAoznQq0Wg57qhjTA2A==} + stylehacks@7.0.1: + resolution: {integrity: sha512-PnrT4HzajnxbjfChpeBKLSpSykilnGBlD+pIffCoT5KbLur9fcL8uKRQJJap85byR2wCYZl/4Otk5eq76qeZxQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 @@ -4183,8 +4175,8 @@ packages: '@swc/wasm': optional: true - tsconfck@3.0.3: - resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==} + tsconfck@3.1.0: + resolution: {integrity: sha512-CMjc5zMnyAjcS9sPLytrbFmj89st2g+JYtY/c02ug4Q+CZaAtCgbyviI0n1YvjZE/pzoc6FbNsINS13DOL1B9w==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -4197,8 +4189,8 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tslib@2.6.3: + resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -4216,8 +4208,8 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - typescript-eslint@7.12.0: - resolution: {integrity: sha512-D6HKNbQcnNu3BaN4HkQCR16tgG8Q2AMUWPgvhrJksOXu+d6ys07yC06ONiV2kcsEfWC22voB6C3PvK2MqlBZ7w==} + typescript-eslint@7.13.0: + resolution: {integrity: sha512-upO0AXxyBwJ4BbiC6CRgAJKtGYha2zw4m1g7TIVPSonwYEuf7vCicw3syjS1OxdDMTz96sZIXl3Jx3vWJLLKFw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -4319,8 +4311,8 @@ packages: vite: optional: true - vite@5.2.12: - resolution: {integrity: sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==} + vite@5.2.13: + resolution: {integrity: sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4492,763 +4484,831 @@ snapshots: '@arrows/error': 1.0.2 fast-deep-equal: 3.1.3 - '@babel/code-frame@7.24.6': + '@babel/code-frame@7.24.7': dependencies: - '@babel/highlight': 7.24.6 + '@babel/highlight': 7.24.7 picocolors: 1.0.1 - '@babel/compat-data@7.24.6': {} + '@babel/compat-data@7.24.7': {} - '@babel/core@7.24.6': + '@babel/core@7.24.7': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.6 - '@babel/generator': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helpers': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/template': 7.24.6 - '@babel/traverse': 7.24.6 - '@babel/types': 7.24.6 + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/helpers': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/template': 7.24.7 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.5 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/generator@7.24.6': + '@babel/generator@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/helper-annotate-as-pure@7.24.6': + '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.6': + '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-compilation-targets@7.24.6': + '@babel/helper-compilation-targets@7.24.7': dependencies: - '@babel/compat-data': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - browserslist: 4.23.0 + '@babel/compat-data': 7.24.7 + '@babel/helper-validator-option': 7.24.7 + browserslist: 4.23.1 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-member-expression-to-functions': 7.24.6 - '@babel/helper-optimise-call-expression': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 + '@babel/helper-create-class-features-plugin@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-member-expression-to-functions': 7.24.7 + '@babel/helper-optimise-call-expression': 7.24.7 + '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 semver: 6.3.1 + transitivePeerDependencies: + - supports-color - '@babel/helper-create-regexp-features-plugin@7.24.6(@babel/core@7.24.6)': + '@babel/helper-create-regexp-features-plugin@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 regexpu-core: 5.3.2 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.6)': + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - debug: 4.3.4 + '@babel/core': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + debug: 4.3.5 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: - supports-color - '@babel/helper-environment-visitor@7.24.6': {} + '@babel/helper-environment-visitor@7.24.7': + dependencies: + '@babel/types': 7.24.7 - '@babel/helper-function-name@7.24.6': + '@babel/helper-function-name@7.24.7': dependencies: - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/template': 7.24.7 + '@babel/types': 7.24.7 - '@babel/helper-hoist-variables@7.24.6': + '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 - '@babel/helper-member-expression-to-functions@7.24.6': + '@babel/helper-member-expression-to-functions@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-module-imports@7.24.6': + '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-module-transforms@7.24.6(@babel/core@7.24.6)': + '@babel/helper-module-transforms@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-module-imports': 7.24.6 - '@babel/helper-simple-access': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-simple-access': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-optimise-call-expression@7.24.6': + '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 - '@babel/helper-plugin-utils@7.24.6': {} + '@babel/helper-plugin-utils@7.24.7': {} - '@babel/helper-remap-async-to-generator@7.24.6(@babel/core@7.24.6)': + '@babel/helper-remap-async-to-generator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-wrap-function': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-wrap-function': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-replace-supers@7.24.6(@babel/core@7.24.6)': + '@babel/helper-replace-supers@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-member-expression-to-functions': 7.24.6 - '@babel/helper-optimise-call-expression': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-member-expression-to-functions': 7.24.7 + '@babel/helper-optimise-call-expression': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-simple-access@7.24.6': + '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.24.6': + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helper-split-export-declaration@7.24.6': + '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 - '@babel/helper-string-parser@7.24.6': {} + '@babel/helper-string-parser@7.24.7': {} - '@babel/helper-validator-identifier@7.24.6': {} + '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-option@7.24.6': {} + '@babel/helper-validator-option@7.24.7': {} - '@babel/helper-wrap-function@7.24.6': + '@babel/helper-wrap-function@7.24.7': dependencies: - '@babel/helper-function-name': 7.24.6 - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/helper-function-name': 7.24.7 + '@babel/template': 7.24.7 + '@babel/traverse': 7.24.7 + '@babel/types': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/helpers@7.24.6': + '@babel/helpers@7.24.7': dependencies: - '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/template': 7.24.7 + '@babel/types': 7.24.7 - '@babel/highlight@7.24.6': + '@babel/highlight@7.24.7': dependencies: - '@babel/helper-validator-identifier': 7.24.6 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.24.6': + '@babel/parser@7.24.7': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.24.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/plugin-transform-optional-chaining': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/plugin-transform-optional-chaining': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-proposal-decorators@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-proposal-decorators@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-decorators': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-decorators': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.6)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 + '@babel/core': 7.24.7 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.6)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-decorators@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-decorators@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-import-assertions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-assertions@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-import-attributes@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-attributes@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-jsx@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.6)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.6)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.6)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-typescript@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.6)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-arrow-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-async-generator-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-async-generator-functions@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-remap-async-to-generator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-remap-async-to-generator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-async-to-generator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-imports': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-remap-async-to-generator': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-remap-async-to-generator': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-block-scoped-functions@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-block-scoped-functions@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-block-scoping@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-block-scoping@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-class-properties@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-class-properties@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-class-static-block@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-class-static-block@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-classes@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-classes@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) - '@babel/helper-split-export-declaration': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.7) + '@babel/helper-split-export-declaration': 7.24.7 globals: 11.12.0 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-computed-properties@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/template': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/template': 7.24.7 - '@babel/plugin-transform-destructuring@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-destructuring@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-dotall-regex@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-dotall-regex@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-duplicate-keys@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-duplicate-keys@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-dynamic-import@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-dynamic-import@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.7) - '@babel/plugin-transform-exponentiation-operator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-exponentiation-operator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-export-namespace-from@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-export-namespace-from@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.7) - '@babel/plugin-transform-for-of@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-for-of@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-function-name@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-function-name@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-json-strings@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-json-strings@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.7) - '@babel/plugin-transform-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-literals@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-logical-assignment-operators@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-logical-assignment-operators@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.7) - '@babel/plugin-transform-member-expression-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-member-expression-literals@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-modules-amd@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-amd@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-modules-commonjs@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-commonjs@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-simple-access': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-simple-access': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-modules-systemjs@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-systemjs@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-hoist-variables': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-modules-umd@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-modules-umd@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-transforms': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-new-target@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-new-target@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-nullish-coalescing-operator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.7) - '@babel/plugin-transform-numeric-separator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-numeric-separator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.7) - '@babel/plugin-transform-object-rest-spread@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-object-rest-spread@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-transform-parameters': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.24.7) - '@babel/plugin-transform-object-super@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-object-super@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-replace-supers': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-replace-supers': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-optional-catch-binding@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-optional-catch-binding@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.7) - '@babel/plugin-transform-optional-chaining@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-optional-chaining@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-parameters@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-private-methods@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-private-methods@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-private-property-in-object@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-property-literals@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-property-literals@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-regenerator@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-regenerator@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-reserved-words@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-runtime@7.24.6(@babel/core@7.24.6)': + '@babel/plugin-transform-runtime@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-module-imports': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.6) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.6) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.7) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.7) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.7) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-shorthand-properties@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-spread@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.6 - - '@babel/plugin-transform-sticky-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-template-literals@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-typeof-symbol@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-typescript@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-typescript': 7.24.6(@babel/core@7.24.6) - - '@babel/plugin-transform-unicode-escapes@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-property-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/plugin-transform-unicode-sets-regex@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/core': 7.24.6 - '@babel/helper-create-regexp-features-plugin': 7.24.6(@babel/core@7.24.6) - '@babel/helper-plugin-utils': 7.24.6 - - '@babel/preset-env@7.24.6(@babel/core@7.24.6)': - dependencies: - '@babel/compat-data': 7.24.6 - '@babel/core': 7.24.6 - '@babel/helper-compilation-targets': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.6) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.6) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.6) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-import-assertions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-import-attributes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.6) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.6) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.6) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.6) - '@babel/plugin-transform-arrow-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-async-generator-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-async-to-generator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-block-scoped-functions': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-block-scoping': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-class-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-class-static-block': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-classes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-computed-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-destructuring': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-dotall-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-duplicate-keys': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-dynamic-import': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-exponentiation-operator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-export-namespace-from': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-for-of': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-function-name': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-json-strings': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-logical-assignment-operators': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-member-expression-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-amd': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-commonjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-systemjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-umd': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-named-capturing-groups-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-new-target': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-numeric-separator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-object-rest-spread': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-object-super': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-optional-catch-binding': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-optional-chaining': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-parameters': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-private-methods': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-private-property-in-object': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-property-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-regenerator': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-reserved-words': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-shorthand-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-spread': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-sticky-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-template-literals': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-typeof-symbol': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-escapes': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-property-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-regex': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-unicode-sets-regex': 7.24.6(@babel/core@7.24.6) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.6) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.6) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.6) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.6) + '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-spread@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-template-literals@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-typeof-symbol@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-typescript@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-unicode-escapes@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-unicode-property-regex@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/plugin-transform-unicode-sets-regex@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/core': 7.24.7 + '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.24.7) + '@babel/helper-plugin-utils': 7.24.7 + + '@babel/preset-env@7.24.7(@babel/core@7.24.7)': + dependencies: + '@babel/compat-data': 7.24.7 + '@babel/core': 7.24.7 + '@babel/helper-compilation-targets': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-validator-option': 7.24.7 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.7) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.7) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.7) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.7) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-import-assertions': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.7) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.7) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.7) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.7) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.7) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.7) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.7) + '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-async-generator-functions': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-block-scoped-functions': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-block-scoping': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-classes': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-destructuring': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-dotall-regex': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-duplicate-keys': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-dynamic-import': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-exponentiation-operator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-export-namespace-from': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-for-of': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-function-name': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-json-strings': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-literals': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-logical-assignment-operators': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-member-expression-literals': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-modules-commonjs': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-modules-systemjs': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-modules-umd': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-new-target': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-numeric-separator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-object-rest-spread': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-object-super': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-optional-catch-binding': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-optional-chaining': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-property-literals': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-regenerator': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-reserved-words': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-template-literals': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-typeof-symbol': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-unicode-escapes': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-unicode-property-regex': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-unicode-sets-regex': 7.24.7(@babel/core@7.24.7) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.7) + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.7) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.7) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.7) core-js-compat: 3.37.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.6)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/types': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/types': 7.24.7 esutils: 2.0.3 - '@babel/preset-typescript@7.24.6(@babel/core@7.24.6)': + '@babel/preset-typescript@7.24.7(@babel/core@7.24.7)': dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/helper-validator-option': 7.24.6 - '@babel/plugin-syntax-jsx': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-modules-commonjs': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-typescript': 7.24.6(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-validator-option': 7.24.7 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-modules-commonjs': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-typescript': 7.24.7(@babel/core@7.24.7) + transitivePeerDependencies: + - supports-color '@babel/regjsgen@0.8.0': {} - '@babel/runtime@7.24.6': + '@babel/runtime@7.24.7': dependencies: regenerator-runtime: 0.14.1 - '@babel/standalone@7.24.6': {} + '@babel/standalone@7.24.7': {} - '@babel/template@7.24.6': + '@babel/template@7.24.7': dependencies: - '@babel/code-frame': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/types': 7.24.6 + '@babel/code-frame': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 - '@babel/traverse@7.24.6': + '@babel/traverse@7.24.7': dependencies: - '@babel/code-frame': 7.24.6 - '@babel/generator': 7.24.6 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-function-name': 7.24.6 - '@babel/helper-hoist-variables': 7.24.6 - '@babel/helper-split-export-declaration': 7.24.6 - '@babel/parser': 7.24.6 - '@babel/types': 7.24.6 - debug: 4.3.4 + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.7 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 + debug: 4.3.5 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.6': + '@babel/types@7.24.7': dependencies: - '@babel/helper-string-parser': 7.24.6 - '@babel/helper-validator-identifier': 7.24.6 + '@babel/helper-string-parser': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 '@bcoe/v8-coverage@0.2.3': {} @@ -5263,7 +5323,7 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true - '@esbuild/aix-ppc64@0.21.4': + '@esbuild/aix-ppc64@0.21.5': optional: true '@esbuild/android-arm64@0.19.12': @@ -5272,7 +5332,7 @@ snapshots: '@esbuild/android-arm64@0.20.2': optional: true - '@esbuild/android-arm64@0.21.4': + '@esbuild/android-arm64@0.21.5': optional: true '@esbuild/android-arm@0.19.12': @@ -5281,7 +5341,7 @@ snapshots: '@esbuild/android-arm@0.20.2': optional: true - '@esbuild/android-arm@0.21.4': + '@esbuild/android-arm@0.21.5': optional: true '@esbuild/android-x64@0.19.12': @@ -5290,7 +5350,7 @@ snapshots: '@esbuild/android-x64@0.20.2': optional: true - '@esbuild/android-x64@0.21.4': + '@esbuild/android-x64@0.21.5': optional: true '@esbuild/darwin-arm64@0.19.12': @@ -5299,7 +5359,7 @@ snapshots: '@esbuild/darwin-arm64@0.20.2': optional: true - '@esbuild/darwin-arm64@0.21.4': + '@esbuild/darwin-arm64@0.21.5': optional: true '@esbuild/darwin-x64@0.19.12': @@ -5308,7 +5368,7 @@ snapshots: '@esbuild/darwin-x64@0.20.2': optional: true - '@esbuild/darwin-x64@0.21.4': + '@esbuild/darwin-x64@0.21.5': optional: true '@esbuild/freebsd-arm64@0.19.12': @@ -5317,7 +5377,7 @@ snapshots: '@esbuild/freebsd-arm64@0.20.2': optional: true - '@esbuild/freebsd-arm64@0.21.4': + '@esbuild/freebsd-arm64@0.21.5': optional: true '@esbuild/freebsd-x64@0.19.12': @@ -5326,7 +5386,7 @@ snapshots: '@esbuild/freebsd-x64@0.20.2': optional: true - '@esbuild/freebsd-x64@0.21.4': + '@esbuild/freebsd-x64@0.21.5': optional: true '@esbuild/linux-arm64@0.19.12': @@ -5335,7 +5395,7 @@ snapshots: '@esbuild/linux-arm64@0.20.2': optional: true - '@esbuild/linux-arm64@0.21.4': + '@esbuild/linux-arm64@0.21.5': optional: true '@esbuild/linux-arm@0.19.12': @@ -5344,7 +5404,7 @@ snapshots: '@esbuild/linux-arm@0.20.2': optional: true - '@esbuild/linux-arm@0.21.4': + '@esbuild/linux-arm@0.21.5': optional: true '@esbuild/linux-ia32@0.19.12': @@ -5353,7 +5413,7 @@ snapshots: '@esbuild/linux-ia32@0.20.2': optional: true - '@esbuild/linux-ia32@0.21.4': + '@esbuild/linux-ia32@0.21.5': optional: true '@esbuild/linux-loong64@0.19.12': @@ -5362,7 +5422,7 @@ snapshots: '@esbuild/linux-loong64@0.20.2': optional: true - '@esbuild/linux-loong64@0.21.4': + '@esbuild/linux-loong64@0.21.5': optional: true '@esbuild/linux-mips64el@0.19.12': @@ -5371,7 +5431,7 @@ snapshots: '@esbuild/linux-mips64el@0.20.2': optional: true - '@esbuild/linux-mips64el@0.21.4': + '@esbuild/linux-mips64el@0.21.5': optional: true '@esbuild/linux-ppc64@0.19.12': @@ -5380,7 +5440,7 @@ snapshots: '@esbuild/linux-ppc64@0.20.2': optional: true - '@esbuild/linux-ppc64@0.21.4': + '@esbuild/linux-ppc64@0.21.5': optional: true '@esbuild/linux-riscv64@0.19.12': @@ -5389,7 +5449,7 @@ snapshots: '@esbuild/linux-riscv64@0.20.2': optional: true - '@esbuild/linux-riscv64@0.21.4': + '@esbuild/linux-riscv64@0.21.5': optional: true '@esbuild/linux-s390x@0.19.12': @@ -5398,7 +5458,7 @@ snapshots: '@esbuild/linux-s390x@0.20.2': optional: true - '@esbuild/linux-s390x@0.21.4': + '@esbuild/linux-s390x@0.21.5': optional: true '@esbuild/linux-x64@0.19.12': @@ -5407,7 +5467,7 @@ snapshots: '@esbuild/linux-x64@0.20.2': optional: true - '@esbuild/linux-x64@0.21.4': + '@esbuild/linux-x64@0.21.5': optional: true '@esbuild/netbsd-x64@0.19.12': @@ -5416,7 +5476,7 @@ snapshots: '@esbuild/netbsd-x64@0.20.2': optional: true - '@esbuild/netbsd-x64@0.21.4': + '@esbuild/netbsd-x64@0.21.5': optional: true '@esbuild/openbsd-x64@0.19.12': @@ -5425,7 +5485,7 @@ snapshots: '@esbuild/openbsd-x64@0.20.2': optional: true - '@esbuild/openbsd-x64@0.21.4': + '@esbuild/openbsd-x64@0.21.5': optional: true '@esbuild/sunos-x64@0.19.12': @@ -5434,7 +5494,7 @@ snapshots: '@esbuild/sunos-x64@0.20.2': optional: true - '@esbuild/sunos-x64@0.21.4': + '@esbuild/sunos-x64@0.21.5': optional: true '@esbuild/win32-arm64@0.19.12': @@ -5443,7 +5503,7 @@ snapshots: '@esbuild/win32-arm64@0.20.2': optional: true - '@esbuild/win32-arm64@0.21.4': + '@esbuild/win32-arm64@0.21.5': optional: true '@esbuild/win32-ia32@0.19.12': @@ -5452,7 +5512,7 @@ snapshots: '@esbuild/win32-ia32@0.20.2': optional: true - '@esbuild/win32-ia32@0.21.4': + '@esbuild/win32-ia32@0.21.5': optional: true '@esbuild/win32-x64@0.19.12': @@ -5461,7 +5521,7 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true - '@esbuild/win32-x64@0.21.4': + '@esbuild/win32-x64@0.21.5': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': @@ -5469,17 +5529,25 @@ snapshots: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.3.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.4.0)': dependencies: - eslint: 9.3.0 + eslint: 9.4.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.10.1': {} + + '@eslint/config-array@0.15.1': + dependencies: + '@eslint/object-schema': 2.1.3 + debug: 4.3.5 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.5 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -5493,7 +5561,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.5 espree: 10.0.1 globals: 14.0.0 ignore: 5.3.1 @@ -5506,10 +5574,10 @@ snapshots: '@eslint/js@8.57.0': {} - '@eslint/js@9.3.0': {} - '@eslint/js@9.4.0': {} + '@eslint/object-schema@2.1.3': {} + '@faker-js/faker@8.4.1': {} '@hapi/hoek@9.3.0': {} @@ -5521,15 +5589,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.5 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -5558,8 +5618,8 @@ snapshots: get-port-please: 3.1.2 h3: 1.11.1 http-shutdown: 1.2.2 - jiti: 1.21.0 - mlly: 1.7.0 + jiti: 1.21.6 + mlly: 1.7.1 node-forge: 1.3.1 pathe: 1.1.2 std-env: 3.7.0 @@ -5603,15 +5663,15 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@nrwl/devkit@19.1.2(nx@19.1.2)': + '@nrwl/devkit@19.2.3(nx@19.2.3)': dependencies: - '@nx/devkit': 19.1.2(nx@19.1.2) + '@nx/devkit': 19.2.3(nx@19.2.3) transitivePeerDependencies: - nx - '@nrwl/js@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)': + '@nrwl/js@19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)': dependencies: - '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) + '@nx/js': 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5624,18 +5684,18 @@ snapshots: - typescript - verdaccio - '@nrwl/tao@19.1.2': + '@nrwl/tao@19.2.3': dependencies: - nx: 19.1.2 - tslib: 2.6.2 + nx: 19.2.3 + tslib: 2.6.3 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' - debug - '@nrwl/vite@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': + '@nrwl/vite@19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2))(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0))': dependencies: - '@nx/vite': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) + '@nx/vite': 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2))(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0)) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5650,64 +5710,42 @@ snapshots: - vite - vitest - '@nrwl/workspace@19.1.2': + '@nrwl/workspace@19.2.3': dependencies: - '@nx/workspace': 19.1.2 + '@nx/workspace': 19.2.3 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' - debug - '@nx/devkit@19.1.2(nx@19.1.2)': + '@nx/devkit@19.2.3(nx@19.2.3)': dependencies: - '@nrwl/devkit': 19.1.2(nx@19.1.2) + '@nrwl/devkit': 19.2.3(nx@19.2.3) ejs: 3.1.10 enquirer: 2.3.6 ignore: 5.3.1 minimatch: 9.0.3 - nx: 19.1.2 + nx: 19.2.3 semver: 7.6.2 tmp: 0.2.3 - tslib: 2.6.2 + tslib: 2.6.3 yargs-parser: 21.1.1 - '@nx/eslint@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2)': - dependencies: - '@nx/devkit': 19.1.2(nx@19.1.2) - '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) - '@nx/linter': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) - eslint: 8.57.0 - semver: 7.6.2 - tslib: 2.6.2 - typescript: 5.4.5 - optionalDependencies: - '@zkochan/js-yaml': 0.0.7 - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - debug - - nx - - supports-color - - verdaccio - - '@nx/js@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)': - dependencies: - '@babel/core': 7.24.6 - '@babel/plugin-proposal-decorators': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-class-properties': 7.24.6(@babel/core@7.24.6) - '@babel/plugin-transform-runtime': 7.24.6(@babel/core@7.24.6) - '@babel/preset-env': 7.24.6(@babel/core@7.24.6) - '@babel/preset-typescript': 7.24.6(@babel/core@7.24.6) - '@babel/runtime': 7.24.6 - '@nrwl/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) - '@nx/devkit': 19.1.2(nx@19.1.2) - '@nx/workspace': 19.1.2 - babel-plugin-const-enum: 1.2.0(@babel/core@7.24.6) + '@nx/js@19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)': + dependencies: + '@babel/core': 7.24.7 + '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-runtime': 7.24.7(@babel/core@7.24.7) + '@babel/preset-env': 7.24.7(@babel/core@7.24.7) + '@babel/preset-typescript': 7.24.7(@babel/core@7.24.7) + '@babel/runtime': 7.24.7 + '@nrwl/js': 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5) + '@nx/devkit': 19.2.3(nx@19.2.3) + '@nx/workspace': 19.2.3 + babel-plugin-const-enum: 1.2.0(@babel/core@7.24.7) babel-plugin-macros: 2.8.0 - babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.24.6)(@babel/traverse@7.24.6) + babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.24.7)(@babel/traverse@7.24.7) chalk: 4.1.2 columnify: 1.6.0 detect-port: 1.6.1 @@ -5721,9 +5759,9 @@ snapshots: ora: 5.3.0 semver: 7.6.2 source-map-support: 0.5.19 - ts-node: 10.9.1(@types/node@20.14.1)(typescript@5.4.5) + ts-node: 10.9.1(@types/node@20.14.2)(typescript@5.4.5) tsconfig-paths: 4.2.0 - tslib: 2.6.2 + tslib: 2.6.3 transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5735,63 +5773,47 @@ snapshots: - supports-color - typescript - '@nx/linter@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2)': - dependencies: - '@nx/eslint': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - '@zkochan/js-yaml' - - debug - - eslint - - nx - - supports-color - - verdaccio - - '@nx/nx-darwin-arm64@19.1.2': + '@nx/nx-darwin-arm64@19.2.3': optional: true - '@nx/nx-darwin-x64@19.1.2': + '@nx/nx-darwin-x64@19.2.3': optional: true - '@nx/nx-freebsd-x64@19.1.2': + '@nx/nx-freebsd-x64@19.2.3': optional: true - '@nx/nx-linux-arm-gnueabihf@19.1.2': + '@nx/nx-linux-arm-gnueabihf@19.2.3': optional: true - '@nx/nx-linux-arm64-gnu@19.1.2': + '@nx/nx-linux-arm64-gnu@19.2.3': optional: true - '@nx/nx-linux-arm64-musl@19.1.2': + '@nx/nx-linux-arm64-musl@19.2.3': optional: true - '@nx/nx-linux-x64-gnu@19.1.2': + '@nx/nx-linux-x64-gnu@19.2.3': optional: true - '@nx/nx-linux-x64-musl@19.1.2': + '@nx/nx-linux-x64-musl@19.2.3': optional: true - '@nx/nx-win32-arm64-msvc@19.1.2': + '@nx/nx-win32-arm64-msvc@19.2.3': optional: true - '@nx/nx-win32-x64-msvc@19.1.2': + '@nx/nx-win32-x64-msvc@19.2.3': optional: true - '@nx/vite@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': + '@nx/vite@19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2))(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0))': dependencies: - '@nrwl/vite': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) - '@nx/devkit': 19.1.2(nx@19.1.2) - '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) + '@nrwl/vite': 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2))(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0)) + '@nx/devkit': 19.2.3(nx@19.2.3) + '@nx/js': 19.2.3(@babel/traverse@7.24.7)(@types/node@20.14.2)(nx@19.2.3)(typescript@5.4.5) '@phenomnomnominal/tsquery': 5.0.1(typescript@5.4.5) '@swc/helpers': 0.5.11 enquirer: 2.3.6 tsconfig-paths: 4.2.0 - vite: 5.2.12(@types/node@20.14.1) - vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) + vite: 5.2.13(@types/node@20.14.2) + vitest: 1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5804,14 +5826,14 @@ snapshots: - typescript - verdaccio - '@nx/workspace@19.1.2': + '@nx/workspace@19.2.3': dependencies: - '@nrwl/workspace': 19.1.2 - '@nx/devkit': 19.1.2(nx@19.1.2) + '@nrwl/workspace': 19.2.3 + '@nx/devkit': 19.2.3(nx@19.2.3) chalk: 4.1.2 enquirer: 2.3.6 - nx: 19.1.2 - tslib: 2.6.2 + nx: 19.2.3 + tslib: 2.6.3 yargs-parser: 21.1.1 transitivePeerDependencies: - '@swc-node/register' @@ -5920,7 +5942,7 @@ snapshots: optionalDependencies: rollup: 3.29.4 - '@rollup/plugin-replace@5.0.5(rollup@3.29.4)': + '@rollup/plugin-replace@5.0.7(rollup@3.29.4)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@3.29.4) magic-string: 0.30.10 @@ -5999,7 +6021,7 @@ snapshots: '@swc/helpers@0.5.11': dependencies: - tslib: 2.6.2 + tslib: 2.6.3 '@trysound/sax@0.2.0': {} @@ -6022,7 +6044,7 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/lodash@4.17.4': {} + '@types/lodash@4.17.5': {} '@types/minimatch@3.0.5': {} @@ -6030,11 +6052,7 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.14.0': - dependencies: - undici-types: 5.26.5 - - '@types/node@20.14.1': + '@types/node@20.14.2': dependencies: undici-types: 5.26.5 @@ -6048,16 +6066,16 @@ snapshots: '@types/ws@8.5.10': dependencies: - '@types/node': 20.14.0 + '@types/node': 20.14.2 - '@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.12.0 - '@typescript-eslint/type-utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.12.0 + '@eslint-community/regexpp': 4.10.1 + '@typescript-eslint/parser': 7.13.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.0 + '@typescript-eslint/type-utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -6068,29 +6086,29 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.12.0 - '@typescript-eslint/types': 7.12.0 - '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.12.0 - debug: 4.3.4 + '@typescript-eslint/scope-manager': 7.13.0 + '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.0 + debug: 4.3.5 eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.12.0': + '@typescript-eslint/scope-manager@7.13.0': dependencies: - '@typescript-eslint/types': 7.12.0 - '@typescript-eslint/visitor-keys': 7.12.0 + '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/visitor-keys': 7.13.0 - '@typescript-eslint/type-utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 + '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5) + debug: 4.3.5 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -6098,13 +6116,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.12.0': {} + '@typescript-eslint/types@7.13.0': {} - '@typescript-eslint/typescript-estree@7.12.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.13.0(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.12.0 - '@typescript-eslint/visitor-keys': 7.12.0 - debug: 4.3.4 + '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/visitor-keys': 7.13.0 + debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 @@ -6115,29 +6133,29 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.12.0 - '@typescript-eslint/types': 7.12.0 - '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.0 + '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.12.0': + '@typescript-eslint/visitor-keys@7.13.0': dependencies: - '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/types': 7.13.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': + '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.4 + debug: 4.3.5 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.4 @@ -6148,7 +6166,7 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) + vitest: 1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0) transitivePeerDependencies: - supports-color @@ -6183,7 +6201,7 @@ snapshots: pathe: 1.1.2 picocolors: 1.0.1 sirv: 2.0.4 - vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) + vitest: 1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0) '@vitest/utils@1.6.0': dependencies: @@ -6194,7 +6212,7 @@ snapshots: '@vue/compiler-core@3.4.27': dependencies: - '@babel/parser': 7.24.6 + '@babel/parser': 7.24.7 '@vue/shared': 3.4.27 entities: 4.5.0 estree-walker: 2.0.2 @@ -6207,7 +6225,7 @@ snapshots: '@vue/compiler-sfc@3.4.27': dependencies: - '@babel/parser': 7.24.6 + '@babel/parser': 7.24.7 '@vue/compiler-core': 3.4.27 '@vue/compiler-dom': 3.4.27 '@vue/compiler-ssr': 3.4.27 @@ -6229,7 +6247,7 @@ snapshots: '@yarnpkg/parsers@3.0.0-rc.46': dependencies: js-yaml: 3.14.1 - tslib: 2.6.2 + tslib: 2.6.3 '@zkochan/js-yaml@0.0.7': dependencies: @@ -6252,12 +6270,12 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ajv@8.15.0: + ajv@8.16.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 2.3.0 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + uri-js: 4.4.1 ansi-colors@4.1.3: {} @@ -6308,67 +6326,67 @@ snapshots: autoprefixer@10.4.19(postcss@8.4.38): dependencies: - browserslist: 4.23.0 - caniuse-lite: 1.0.30001621 + browserslist: 4.23.1 + caniuse-lite: 1.0.30001632 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.1 postcss: 8.4.38 postcss-value-parser: 4.2.0 - axios@1.7.2(debug@4.3.4): + axios@1.7.2(debug@4.3.5): dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.6(debug@4.3.5) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - babel-plugin-const-enum@1.2.0(@babel/core@7.24.6): + babel-plugin-const-enum@1.2.0(@babel/core@7.24.7): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 - '@babel/plugin-syntax-typescript': 7.24.6(@babel/core@7.24.6) - '@babel/traverse': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 + '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.7) + '@babel/traverse': 7.24.7 transitivePeerDependencies: - supports-color babel-plugin-macros@2.8.0: dependencies: - '@babel/runtime': 7.24.6 + '@babel/runtime': 7.24.7 cosmiconfig: 6.0.0 resolve: 1.22.8 - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.6): + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.7): dependencies: - '@babel/compat-data': 7.24.6 - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) + '@babel/compat-data': 7.24.7 + '@babel/core': 7.24.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.7) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.6): + babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.7): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.7) core-js-compat: 3.37.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.6): + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.7): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.6) + '@babel/core': 7.24.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.7) transitivePeerDependencies: - supports-color - babel-plugin-transform-typescript-metadata@0.3.2(@babel/core@7.24.6)(@babel/traverse@7.24.6): + babel-plugin-transform-typescript-metadata@0.3.2(@babel/core@7.24.7)(@babel/traverse@7.24.7): dependencies: - '@babel/core': 7.24.6 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.24.7 + '@babel/helper-plugin-utils': 7.24.7 optionalDependencies: - '@babel/traverse': 7.24.6 + '@babel/traverse': 7.24.7 balanced-match@1.0.2: {} @@ -6416,12 +6434,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.23.0: + browserslist@4.23.1: dependencies: - caniuse-lite: 1.0.30001621 - electron-to-chromium: 1.4.783 + caniuse-lite: 1.0.30001632 + electron-to-chromium: 1.4.798 node-releases: 2.0.14 - update-browserslist-db: 1.0.16(browserslist@4.23.0) + update-browserslist-db: 1.0.16(browserslist@4.23.1) buffer-from@1.1.2: {} @@ -6432,25 +6450,27 @@ snapshots: builtin-modules@3.3.0: {} - bun-types@1.1.12: + bun-types@1.1.13: dependencies: '@types/node': 20.12.14 '@types/ws': 8.5.10 - c12@1.10.0: + c12@1.11.1(magicast@0.3.4): dependencies: chokidar: 3.6.0 confbox: 0.1.7 defu: 6.1.4 dotenv: 16.4.5 giget: 1.2.3 - jiti: 1.21.0 - mlly: 1.7.0 + jiti: 1.21.6 + mlly: 1.7.1 ohash: 1.1.3 pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.1.1 rc9: 2.1.2 + optionalDependencies: + magicast: 0.3.4 cac@6.7.14: {} @@ -6462,18 +6482,18 @@ snapshots: caniuse-api@3.0.0: dependencies: - browserslist: 4.23.0 - caniuse-lite: 1.0.30001621 + browserslist: 4.23.1 + caniuse-lite: 1.0.30001632 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - caniuse-lite@1.0.30001621: {} + caniuse-lite@1.0.30001632: {} chai@4.4.1: dependencies: assertion-error: 1.1.0 check-error: 1.0.3 - deep-eql: 4.1.3 + deep-eql: 4.1.4 get-func-name: 2.0.2 loupe: 2.3.7 pathval: 1.1.1 @@ -6585,7 +6605,7 @@ snapshots: core-js-compat@3.37.1: dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 cosmiconfig@6.0.0: dependencies: @@ -6639,9 +6659,9 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-default@7.0.1(postcss@8.4.38): + cssnano-preset-default@7.0.2(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 css-declaration-sorter: 7.2.0(postcss@8.4.38) cssnano-utils: 5.0.0(postcss@8.4.38) postcss: 8.4.38 @@ -6652,12 +6672,12 @@ snapshots: postcss-discard-duplicates: 7.0.0(postcss@8.4.38) postcss-discard-empty: 7.0.0(postcss@8.4.38) postcss-discard-overridden: 7.0.0(postcss@8.4.38) - postcss-merge-longhand: 7.0.0(postcss@8.4.38) - postcss-merge-rules: 7.0.0(postcss@8.4.38) + postcss-merge-longhand: 7.0.1(postcss@8.4.38) + postcss-merge-rules: 7.0.1(postcss@8.4.38) postcss-minify-font-values: 7.0.0(postcss@8.4.38) postcss-minify-gradients: 7.0.0(postcss@8.4.38) postcss-minify-params: 7.0.0(postcss@8.4.38) - postcss-minify-selectors: 7.0.0(postcss@8.4.38) + postcss-minify-selectors: 7.0.1(postcss@8.4.38) postcss-normalize-charset: 7.0.0(postcss@8.4.38) postcss-normalize-display-values: 7.0.0(postcss@8.4.38) postcss-normalize-positions: 7.0.0(postcss@8.4.38) @@ -6670,28 +6690,28 @@ snapshots: postcss-ordered-values: 7.0.0(postcss@8.4.38) postcss-reduce-initial: 7.0.0(postcss@8.4.38) postcss-reduce-transforms: 7.0.0(postcss@8.4.38) - postcss-svgo: 7.0.0(postcss@8.4.38) - postcss-unique-selectors: 7.0.0(postcss@8.4.38) + postcss-svgo: 7.0.1(postcss@8.4.38) + postcss-unique-selectors: 7.0.1(postcss@8.4.38) cssnano-utils@5.0.0(postcss@8.4.38): dependencies: postcss: 8.4.38 - cssnano@7.0.1(postcss@8.4.38): + cssnano@7.0.2(postcss@8.4.38): dependencies: - cssnano-preset-default: 7.0.1(postcss@8.4.38) - lilconfig: 3.1.1 + cssnano-preset-default: 7.0.2(postcss@8.4.38) + lilconfig: 3.1.2 postcss: 8.4.38 csso@5.0.5: dependencies: css-tree: 2.2.1 - debug@4.3.4: + debug@4.3.5: dependencies: ms: 2.1.2 - deep-eql@4.1.3: + deep-eql@4.1.4: dependencies: type-detect: 4.0.8 @@ -6713,13 +6733,13 @@ snapshots: depcheck@1.4.7: dependencies: - '@babel/parser': 7.24.6 - '@babel/traverse': 7.24.6 + '@babel/parser': 7.24.7 + '@babel/traverse': 7.24.7 '@vue/compiler-sfc': 3.4.27 callsite: 1.0.0 camelcase: 6.3.0 cosmiconfig: 7.1.0 - debug: 4.3.4 + debug: 4.3.5 deps-regex: 0.2.0 findup-sync: 5.0.0 ignore: 5.3.1 @@ -6750,7 +6770,7 @@ snapshots: detect-port@1.6.1: dependencies: address: 1.2.2 - debug: 4.3.4 + debug: 4.3.5 transitivePeerDependencies: - supports-color @@ -6796,7 +6816,7 @@ snapshots: dependencies: jake: 10.9.1 - electron-to-chromium@1.4.783: {} + electron-to-chromium@1.4.798: {} emoji-regex@8.0.0: {} @@ -6804,7 +6824,7 @@ snapshots: dependencies: once: 1.4.0 - enhanced-resolve@5.16.1: + enhanced-resolve@5.17.0: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 @@ -6880,31 +6900,31 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - esbuild@0.21.4: + esbuild@0.21.5: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.4 - '@esbuild/android-arm': 0.21.4 - '@esbuild/android-arm64': 0.21.4 - '@esbuild/android-x64': 0.21.4 - '@esbuild/darwin-arm64': 0.21.4 - '@esbuild/darwin-x64': 0.21.4 - '@esbuild/freebsd-arm64': 0.21.4 - '@esbuild/freebsd-x64': 0.21.4 - '@esbuild/linux-arm': 0.21.4 - '@esbuild/linux-arm64': 0.21.4 - '@esbuild/linux-ia32': 0.21.4 - '@esbuild/linux-loong64': 0.21.4 - '@esbuild/linux-mips64el': 0.21.4 - '@esbuild/linux-ppc64': 0.21.4 - '@esbuild/linux-riscv64': 0.21.4 - '@esbuild/linux-s390x': 0.21.4 - '@esbuild/linux-x64': 0.21.4 - '@esbuild/netbsd-x64': 0.21.4 - '@esbuild/openbsd-x64': 0.21.4 - '@esbuild/sunos-x64': 0.21.4 - '@esbuild/win32-arm64': 0.21.4 - '@esbuild/win32-ia32': 0.21.4 - '@esbuild/win32-x64': 0.21.4 + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 escalade@3.1.2: {} @@ -6912,7 +6932,7 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.0(eslint@8.57.0): + eslint-compat-utils@0.5.1(eslint@8.57.0): dependencies: eslint: 8.57.0 semver: 7.6.2 @@ -6921,21 +6941,21 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-es-x@7.6.0(eslint@8.57.0): + eslint-plugin-es-x@7.7.0(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/regexpp': 4.10.1 eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-n@17.7.0(eslint@8.57.0): + eslint-plugin-n@17.8.1(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - enhanced-resolve: 5.16.1 + enhanced-resolve: 5.17.0 eslint: 8.57.0 - eslint-plugin-es-x: 7.6.0(eslint@8.57.0) + eslint-plugin-es-x: 7.7.0(eslint@8.57.0) get-tsconfig: 4.7.5 - globals: 15.3.0 + globals: 15.4.0 ignore: 5.3.1 minimatch: 9.0.4 semver: 7.6.2 @@ -6961,7 +6981,7 @@ snapshots: eslint@8.57.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/regexpp': 4.10.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 @@ -6971,7 +6991,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.5 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -7001,20 +7021,20 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.3.0: + eslint@9.4.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.4.0) + '@eslint-community/regexpp': 4.10.1 + '@eslint/config-array': 0.15.1 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.3.0 - '@humanwhocodes/config-array': 0.13.0 + '@eslint/js': 9.4.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.5 escape-string-regexp: 4.0.0 eslint-scope: 8.0.1 eslint-visitor-keys: 4.0.0 @@ -7136,8 +7156,6 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@2.3.0: {} - fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -7191,9 +7209,9 @@ snapshots: flatted@3.3.1: {} - follow-redirects@1.15.6(debug@4.3.4): + follow-redirects@1.15.6(debug@4.3.5): optionalDependencies: - debug: 4.3.4 + debug: 4.3.5 form-data@4.0.0: dependencies: @@ -7205,6 +7223,10 @@ snapshots: from@0.1.7: {} + front-matter@4.0.2: + dependencies: + js-yaml: 3.14.1 + fs-constants@1.0.0: {} fs-extra@10.1.0: @@ -7304,7 +7326,7 @@ snapshots: globals@14.0.0: {} - globals@15.3.0: {} + globals@15.4.0: {} globby@11.1.0: dependencies: @@ -7480,7 +7502,7 @@ snapshots: istanbul-lib-source-maps@5.0.4: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.4 + debug: 4.3.5 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -7508,7 +7530,7 @@ snapshots: jinx-rust@0.1.6: {} - jiti@1.21.0: {} + jiti@1.21.6: {} joi@17.13.1: dependencies: @@ -7576,7 +7598,7 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lilconfig@3.1.1: {} + lilconfig@3.1.2: {} lines-and-columns@1.2.4: {} @@ -7584,7 +7606,7 @@ snapshots: local-pkg@0.5.0: dependencies: - mlly: 1.7.0 + mlly: 1.7.1 pkg-types: 1.1.1 locate-path@6.0.0: @@ -7635,8 +7657,8 @@ snapshots: magicast@0.3.4: dependencies: - '@babel/parser': 7.24.6 - '@babel/types': 7.24.6 + '@babel/parser': 7.24.7 + '@babel/types': 7.24.7 source-map-js: 1.2.0 make-dir@4.0.0: @@ -7711,13 +7733,13 @@ snapshots: dependencies: autoprefixer: 10.4.19(postcss@8.4.38) citty: 0.1.6 - cssnano: 7.0.1(postcss@8.4.38) + cssnano: 7.0.2(postcss@8.4.38) defu: 6.1.4 esbuild: 0.20.2 fs-extra: 11.2.0 globby: 14.0.1 - jiti: 1.21.0 - mlly: 1.7.0 + jiti: 1.21.6 + mlly: 1.7.1 mri: 1.2.0 pathe: 1.1.2 pkg-types: 1.1.1 @@ -7727,7 +7749,7 @@ snapshots: optionalDependencies: typescript: 5.4.5 - mlly@1.7.0: + mlly@1.7.1: dependencies: acorn: 8.11.3 pathe: 1.1.2 @@ -7785,13 +7807,13 @@ snapshots: dependencies: boolbase: 1.0.0 - nx@19.1.2: + nx@19.2.3: dependencies: - '@nrwl/tao': 19.1.2 + '@nrwl/tao': 19.2.3 '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.7 - axios: 1.7.2(debug@4.3.4) + axios: 1.7.2(debug@4.3.5) chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -7801,6 +7823,7 @@ snapshots: enquirer: 2.3.6 figures: 3.2.0 flat: 5.0.2 + front-matter: 4.0.2 fs-extra: 11.2.0 ignore: 5.3.1 jest-diff: 29.7.0 @@ -7817,20 +7840,20 @@ snapshots: tar-stream: 2.2.0 tmp: 0.2.3 tsconfig-paths: 4.2.0 - tslib: 2.6.2 + tslib: 2.6.3 yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 19.1.2 - '@nx/nx-darwin-x64': 19.1.2 - '@nx/nx-freebsd-x64': 19.1.2 - '@nx/nx-linux-arm-gnueabihf': 19.1.2 - '@nx/nx-linux-arm64-gnu': 19.1.2 - '@nx/nx-linux-arm64-musl': 19.1.2 - '@nx/nx-linux-x64-gnu': 19.1.2 - '@nx/nx-linux-x64-musl': 19.1.2 - '@nx/nx-win32-arm64-msvc': 19.1.2 - '@nx/nx-win32-x64-msvc': 19.1.2 + '@nx/nx-darwin-arm64': 19.2.3 + '@nx/nx-darwin-x64': 19.2.3 + '@nx/nx-freebsd-x64': 19.2.3 + '@nx/nx-linux-arm-gnueabihf': 19.2.3 + '@nx/nx-linux-arm64-gnu': 19.2.3 + '@nx/nx-linux-arm64-musl': 19.2.3 + '@nx/nx-linux-x64-gnu': 19.2.3 + '@nx/nx-linux-x64-musl': 19.2.3 + '@nx/nx-win32-arm64-msvc': 19.2.3 + '@nx/nx-win32-x64-msvc': 19.2.3 transitivePeerDependencies: - debug @@ -7906,7 +7929,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.6 + '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -7944,7 +7967,7 @@ snapshots: pkg-types@1.1.1: dependencies: confbox: 0.1.7 - mlly: 1.7.0 + mlly: 1.7.1 pathe: 1.1.2 platform@1.3.6: {} @@ -7961,7 +7984,7 @@ snapshots: postcss-colormin@7.0.0(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.4.38 @@ -7969,7 +7992,7 @@ snapshots: postcss-convert-values@7.0.0(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 postcss: 8.4.38 postcss-value-parser: 4.2.0 @@ -7989,15 +8012,15 @@ snapshots: dependencies: postcss: 8.4.38 - postcss-merge-longhand@7.0.0(postcss@8.4.38): + postcss-merge-longhand@7.0.1(postcss@8.4.38): dependencies: postcss: 8.4.38 postcss-value-parser: 4.2.0 - stylehacks: 7.0.0(postcss@8.4.38) + stylehacks: 7.0.1(postcss@8.4.38) - postcss-merge-rules@7.0.0(postcss@8.4.38): + postcss-merge-rules@7.0.1(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 caniuse-api: 3.0.0 cssnano-utils: 5.0.0(postcss@8.4.38) postcss: 8.4.38 @@ -8017,12 +8040,12 @@ snapshots: postcss-minify-params@7.0.0(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 cssnano-utils: 5.0.0(postcss@8.4.38) postcss: 8.4.38 postcss-value-parser: 4.2.0 - postcss-minify-selectors@7.0.0(postcss@8.4.38): + postcss-minify-selectors@7.0.1(postcss@8.4.38): dependencies: postcss: 8.4.38 postcss-selector-parser: 6.1.0 @@ -8063,7 +8086,7 @@ snapshots: postcss-normalize-unicode@7.0.0(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 postcss: 8.4.38 postcss-value-parser: 4.2.0 @@ -8085,7 +8108,7 @@ snapshots: postcss-reduce-initial@7.0.0(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 caniuse-api: 3.0.0 postcss: 8.4.38 @@ -8099,13 +8122,13 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-svgo@7.0.0(postcss@8.4.38): + postcss-svgo@7.0.1(postcss@8.4.38): dependencies: postcss: 8.4.38 postcss-value-parser: 4.2.0 svgo: 3.3.2 - postcss-unique-selectors@7.0.0(postcss@8.4.38): + postcss-unique-selectors@7.0.1(postcss@8.4.38): dependencies: postcss: 8.4.38 postcss-selector-parser: 6.1.0 @@ -8129,7 +8152,7 @@ snapshots: prettier@3.2.5: {} - prettier@3.3.0: {} + prettier@3.3.2: {} pretty-bytes@6.1.1: {} @@ -8180,7 +8203,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.24.6 + '@babel/runtime': 7.24.7 regexpu-core@5.3.2: dependencies: @@ -8235,7 +8258,7 @@ snapshots: rollup: 3.29.4 typescript: 5.4.5 optionalDependencies: - '@babel/code-frame': 7.24.6 + '@babel/code-frame': 7.24.7 rollup@3.29.4: optionalDependencies: @@ -8269,7 +8292,7 @@ snapshots: rxjs@7.8.1: dependencies: - tslib: 2.6.2 + tslib: 2.6.3 safe-buffer@5.2.1: {} @@ -8335,16 +8358,16 @@ snapshots: stackback@0.0.2: {} - start-server-and-test@2.0.3: + start-server-and-test@2.0.4: dependencies: arg: 5.0.2 bluebird: 3.7.2 check-more-types: 2.24.0 - debug: 4.3.4 + debug: 4.3.5 execa: 5.1.1 lazy-ass: 1.6.0 ps-tree: 1.2.0 - wait-on: 7.2.0(debug@4.3.4) + wait-on: 7.2.0(debug@4.3.5) transitivePeerDependencies: - supports-color @@ -8386,9 +8409,9 @@ snapshots: minimist: 1.2.8 through: 2.3.8 - stylehacks@7.0.0(postcss@8.4.38): + stylehacks@7.0.1(postcss@8.4.38): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 postcss: 8.4.38 postcss-selector-parser: 6.1.0 @@ -8463,14 +8486,14 @@ snapshots: dependencies: typescript: 5.4.5 - ts-node@10.9.1(@types/node@20.14.1)(typescript@5.4.5): + ts-node@10.9.1(@types/node@20.14.2)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.1 + '@types/node': 20.14.2 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -8481,7 +8504,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - tsconfck@3.0.3(typescript@5.4.5): + tsconfck@3.1.0(typescript@5.4.5): optionalDependencies: typescript: 5.4.5 @@ -8491,7 +8514,7 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@2.6.2: {} + tslib@2.6.3: {} type-check@0.4.0: dependencies: @@ -8503,11 +8526,11 @@ snapshots: type-fest@0.21.3: {} - typescript-eslint@7.12.0(eslint@8.57.0)(typescript@5.4.5): + typescript-eslint@7.13.0(eslint@8.57.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.13.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 @@ -8524,7 +8547,7 @@ snapshots: '@rollup/plugin-commonjs': 25.0.8(rollup@3.29.4) '@rollup/plugin-json': 6.1.0(rollup@3.29.4) '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) - '@rollup/plugin-replace': 5.0.5(rollup@3.29.4) + '@rollup/plugin-replace': 5.0.7(rollup@3.29.4) '@rollup/pluginutils': 5.1.0(rollup@3.29.4) chalk: 5.3.0 citty: 0.1.6 @@ -8533,10 +8556,10 @@ snapshots: esbuild: 0.19.12 globby: 13.2.2 hookable: 5.5.3 - jiti: 1.21.0 + jiti: 1.21.6 magic-string: 0.30.10 mkdist: 1.5.1(typescript@5.4.5) - mlly: 1.7.0 + mlly: 1.7.1 pathe: 1.1.2 pkg-types: 1.1.1 pretty-bytes: 6.1.1 @@ -8586,19 +8609,19 @@ snapshots: untyped@1.4.2: dependencies: - '@babel/core': 7.24.6 - '@babel/standalone': 7.24.6 - '@babel/types': 7.24.6 + '@babel/core': 7.24.7 + '@babel/standalone': 7.24.7 + '@babel/types': 7.24.7 defu: 6.1.4 - jiti: 1.21.0 + jiti: 1.21.6 mri: 1.2.0 scule: 1.3.0 transitivePeerDependencies: - supports-color - update-browserslist-db@1.0.16(browserslist@4.23.0): + update-browserslist-db@1.0.16(browserslist@4.23.1): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 escalade: 3.1.2 picocolors: 1.0.1 @@ -8614,13 +8637,13 @@ snapshots: validate-npm-package-name@5.0.1: {} - vite-node@1.6.0(@types/node@20.14.1): + vite-node@1.6.0(@types/node@20.14.2): dependencies: cac: 6.7.14 - debug: 4.3.4 + debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.2.12(@types/node@20.14.1) + vite: 5.2.13(@types/node@20.14.2) transitivePeerDependencies: - '@types/node' - less @@ -8631,27 +8654,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1)): + vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2)): dependencies: - debug: 4.3.4 + debug: 4.3.5 globrex: 0.1.2 - tsconfck: 3.0.3(typescript@5.4.5) + tsconfck: 3.1.0(typescript@5.4.5) optionalDependencies: - vite: 5.2.12(@types/node@20.14.1) + vite: 5.2.13(@types/node@20.14.2) transitivePeerDependencies: - supports-color - typescript - vite@5.2.12(@types/node@20.14.1): + vite@5.2.13(@types/node@20.14.2): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.14.1 + '@types/node': 20.14.2 fsevents: 2.3.3 - vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0): + vitest@1.6.0(@types/node@20.14.2)(@vitest/ui@1.6.0): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -8660,7 +8683,7 @@ snapshots: '@vitest/utils': 1.6.0 acorn-walk: 8.3.2 chai: 4.4.1 - debug: 4.3.4 + debug: 4.3.5 execa: 8.0.1 local-pkg: 0.5.0 magic-string: 0.30.10 @@ -8670,11 +8693,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.12(@types/node@20.14.1) - vite-node: 1.6.0(@types/node@20.14.1) + vite: 5.2.13(@types/node@20.14.2) + vite-node: 1.6.0(@types/node@20.14.2) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.14.1 + '@types/node': 20.14.2 '@vitest/ui': 1.6.0(vitest@1.6.0) transitivePeerDependencies: - less @@ -8685,9 +8708,9 @@ snapshots: - supports-color - terser - wait-on@7.2.0(debug@4.3.4): + wait-on@7.2.0(debug@4.3.5): dependencies: - axios: 1.7.2(debug@4.3.4) + axios: 1.7.2(debug@4.3.5) joi: 17.13.1 lodash: 4.17.21 minimist: 1.2.8 diff --git a/tests/clients/dart/lib/test_client.rpc.dart b/tests/clients/dart/lib/test_client.rpc.dart index dcbddbf0..903b9f8c 100644 --- a/tests/clients/dart/lib/test_client.rpc.dart +++ b/tests/clients/dart/lib/test_client.rpc.dart @@ -1,9 +1,9 @@ // this file was autogenerated by arri -// ignore_for_file: type=lint, unused_field -import "dart:async"; -import "dart:convert"; -import "package:arri_client/arri_client.dart"; -import "package:http/http.dart" as http; +// ignore_for_file: type=lint, unused_field, unnecessary_cast +import 'dart:async'; +import 'dart:convert'; +import 'package:arri_client/arri_client.dart'; +import 'package:http/http.dart' as http; class TestClient { final http.Client? _httpClient; @@ -12,35 +12,29 @@ class TestClient { late final FutureOr> Function()? _headers; TestClient({ http.Client? httpClient, - String baseUrl = "", + required String baseUrl, FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; - TestClientTestsService get tests { - return TestClientTestsService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } + TestClientTestsService get tests => TestClientTestsService( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + ); - TestClientAdaptersService get adapters { - return TestClientAdaptersService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } + TestClientAdaptersService get adapters => TestClientAdaptersService( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + ); - TestClientUsersService get users { - return TestClientUsersService( - httpClient: _httpClient, - baseUrl: _baseUrl, - headers: _headers, - ); - } + TestClientUsersService get users => TestClientUsersService( + baseUrl: _baseUrl, + headers: _headers, + httpClient: _httpClient, + ); } class TestClientTestsService { @@ -50,367 +44,350 @@ class TestClientTestsService { late final FutureOr> Function()? _headers; TestClientTestsService({ http.Client? httpClient, - String baseUrl = "", + required String baseUrl, FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; - Future emptyParamsGetRequest() { + Future emptyParamsGetRequest() async { return parsedArriRequest( "$_baseUrl/rpcs/tests/empty-params-get-request", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, - params: null, - parser: (body) => DefaultPayload.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + parser: (body) => DefaultPayload.fromJsonString(body), ); } - Future emptyParamsPostRequest() { + Future emptyParamsPostRequest() async { return parsedArriRequest( "$_baseUrl/rpcs/tests/empty-params-post-request", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: null, - parser: (body) => DefaultPayload.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + parser: (body) => DefaultPayload.fromJsonString(body), ); } - Future emptyResponseGetRequest(DefaultPayload params) { + Future emptyResponseGetRequest(DefaultPayload params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/empty-response-get-request", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, params: params.toJson(), parser: (body) {}, - clientVersion: _clientVersion, ); } - Future emptyResponsePostRequest(DefaultPayload params) { + Future emptyResponsePostRequest(DefaultPayload params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/empty-response-post-request", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, params: params.toJson(), parser: (body) {}, - clientVersion: _clientVersion, ); } - /// If the target language supports it. Generated code should mark this procedure as deprecated. - @deprecated - Future deprecatedRpc(DeprecatedRpcParams params) { + Future deprecatedRpc(DeprecatedRpcParams params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/deprecated-rpc", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, params: params.toJson(), parser: (body) {}, - clientVersion: _clientVersion, ); } - Future sendObject(ObjectWithEveryType params) { + Future sendObject(ObjectWithEveryType params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/send-object", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => ObjectWithEveryType.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => ObjectWithEveryType.fromJsonString(body), ); } Future sendObjectWithNullableFields( - ObjectWithEveryNullableType params) { + ObjectWithEveryNullableType params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/send-object-with-nullable-fields", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => ObjectWithEveryNullableType.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => ObjectWithEveryNullableType.fromJsonString(body), ); } Future sendPartialObject( - ObjectWithEveryOptionalType params) { + ObjectWithEveryOptionalType params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/send-partial-object", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => ObjectWithEveryOptionalType.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => ObjectWithEveryOptionalType.fromJsonString(body), ); } - Future sendRecursiveObject(RecursiveObject params) { + Future sendRecursiveObject(RecursiveObject params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/send-recursive-object", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => RecursiveObject.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => RecursiveObject.fromJsonString(body), ); } - Future sendRecursiveUnion(RecursiveUnion params) { + Future sendRecursiveUnion(RecursiveUnion params) async { return parsedArriRequest( "$_baseUrl/rpcs/tests/send-recursive-union", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => RecursiveUnion.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => RecursiveUnion.fromJsonString(body), ); } EventSource streamAutoReconnect( AutoReconnectParams params, { - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(AutoReconnectResponse data, + EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function( + ArriError error, EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-auto-reconnect", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, params: params.toJson(), - parser: (body) => AutoReconnectResponse.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + parser: (body) => AutoReconnectResponse.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } - /// This route will always return an error. The client should automatically retry with exponential backoff. EventSource streamConnectionErrorTest( StreamConnectionErrorTestParams params, { - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? - onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(StreamConnectionErrorTestResponse data, + EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? + onClose, + void Function(ArriError error, + EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-connection-error-test", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, params: params.toJson(), - parser: (body) => StreamConnectionErrorTestResponse.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + parser: (body) => StreamConnectionErrorTestResponse.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } - /// Test to ensure that the client can handle receiving streams of large objects. When objects are large messages will sometimes get sent in chunks. Meaning you have to handle receiving a partial message EventSource streamLargeObjects({ - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(StreamLargeObjectsResponse data, + EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function(ArriError error, + EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-large-objects", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, - params: null, - parser: (body) => StreamLargeObjectsResponse.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, + parser: (body) => StreamLargeObjectsResponse.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } EventSource streamMessages( ChatMessageParams params, { - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(ChatMessage data, EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function(ArriError error, EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-messages", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, params: params.toJson(), - parser: (body) => ChatMessage.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + parser: (body) => ChatMessage.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } EventSource streamRetryWithNewCredentials({ - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? - onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(TestsStreamRetryWithNewCredentialsResponse data, + EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function( + EventSource connection)? + onClose, + void Function(ArriError error, + EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-retry-with-new-credentials", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, - params: null, - parser: (body) => TestsStreamRetryWithNewCredentialsResponse.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, + parser: (body) => + TestsStreamRetryWithNewCredentialsResponse.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } - /// When the client receives the 'done' event, it should close the connection and NOT reconnect EventSource streamTenEventsThenEnd({ - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(ChatMessage data, EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function(ArriError error, EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/tests/stream-ten-events-then-end", - httpClient: _httpClient, method: HttpMethod.get, - headers: _headers, - params: null, - parser: (body) => ChatMessage.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, - onOpen: onOpen, - onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, - ); - } - - EventSource streamTenEventsThenError({ - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, - String? lastEventId, - }) { - return parsedArriSseRequest( - "$_baseUrl/rpcs/tests/stream-ten-events-then-error", httpClient: _httpClient, - method: HttpMethod.post, headers: _headers, - params: null, - parser: (body) => ChatMessage.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, + parser: (body) => ChatMessage.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } Future> websocketRpc() { - return arriWebsocketRequest( + return arriWebsocketRequest( "$_baseUrl/rpcs/tests/websocket-rpc", headers: _headers, - parser: (body) => WsMessageResponse.fromJson(json.decode(body)), - serializer: (body) => json.encode(body.toJson()), clientVersion: _clientVersion, + parser: (msg) => WsMessageResponse.fromJsonString(msg), + serializer: (msg) => msg.toJsonString(), ); } - Future> + Future> websocketRpcSendTenLargeMessages() { - return arriWebsocketRequest( + return arriWebsocketRequest( "$_baseUrl/rpcs/tests/websocket-rpc-send-ten-large-messages", headers: _headers, - parser: (body) => StreamLargeObjectsResponse.fromJson(json.decode(body)), - serializer: (_) => "", clientVersion: _clientVersion, + parser: (msg) => StreamLargeObjectsResponse.fromJsonString(msg), + serializer: (msg) => "", ); } } @@ -422,23 +399,21 @@ class TestClientAdaptersService { late final FutureOr> Function()? _headers; TestClientAdaptersService({ http.Client? httpClient, - String baseUrl = "", + required String baseUrl, FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; - Future typebox(TypeBoxObject params) { + Future typebox(TypeBoxObject params) async { return parsedArriRequest( "$_baseUrl/rpcs/adapters/typebox", - httpClient: _httpClient, method: HttpMethod.post, + httpClient: _httpClient, headers: _headers, - params: params.toJson(), - parser: (body) => TypeBoxObject.fromJson( - json.decode(body), - ), clientVersion: _clientVersion, + params: params.toJson(), + parser: (body) => TypeBoxObject.fromJsonString(body), ); } } @@ -450,7 +425,7 @@ class TestClientUsersService { late final FutureOr> Function()? _headers; TestClientUsersService({ http.Client? httpClient, - String baseUrl = "", + required String baseUrl, FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, @@ -458,52 +433,84 @@ class TestClientUsersService { EventSource watchUser( UsersWatchUserParams params, { - SseHookOnData? onData, - SseHookOnError? onError, - SseHookOnConnectionError? onConnectionError, - SseHookOnOpen? onOpen, - SseHookOnClose? onClose, + void Function(UsersWatchUserResponse data, + EventSource connection)? + onMessage, + void Function(http.StreamedResponse response, + EventSource connection)? + onOpen, + void Function(EventSource connection)? onClose, + void Function( + ArriError error, EventSource connection)? + onError, + Duration? retryDelay, + int? maxRetryCount, String? lastEventId, }) { - return parsedArriSseRequest( + return parsedArriSseRequest( "$_baseUrl/rpcs/users/watch-user", - httpClient: _httpClient, method: HttpMethod.get, + httpClient: _httpClient, headers: _headers, + clientVersion: _clientVersion, + retryDelay: retryDelay, + maxRetryCount: maxRetryCount, + lastEventId: lastEventId, params: params.toJson(), - parser: (body) => UsersWatchUserResponse.fromJson( - json.decode(body), - ), - onData: onData, - onError: onError, - onConnectionError: onConnectionError, + parser: (body) => UsersWatchUserResponse.fromJsonString(body), + onMessage: onMessage, onOpen: onOpen, onClose: onClose, - lastEventId: lastEventId, - clientVersion: _clientVersion, + onError: onError, ); } } -class ManuallyAddedModel { +class ManuallyAddedModel implements ArriModel { final String hello; const ManuallyAddedModel({ required this.hello, }); - factory ManuallyAddedModel.fromJson(Map json) { + + factory ManuallyAddedModel.empty() { + return ManuallyAddedModel( + hello: "", + ); + } + + factory ManuallyAddedModel.fromJson(Map _input_) { + final hello = typeFromDynamic(_input_["hello"], ""); return ManuallyAddedModel( - hello: typeFromDynamic(json["hello"], ""), + hello: hello, ); } + factory ManuallyAddedModel.fromJsonString(String input) { + return ManuallyAddedModel.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "hello": hello, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("hello=$hello"); + return _queryParts_.join("&"); } + @override ManuallyAddedModel copyWith({ String? hello, }) { @@ -511,27 +518,71 @@ class ManuallyAddedModel { hello: hello ?? this.hello, ); } + + @override + List get props => [ + hello, + ]; + + @override + bool operator ==(Object other) { + return other is ManuallyAddedModel && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ManuallyAddedModel ${toJsonString()}"; + } } -class DefaultPayload { +class DefaultPayload implements ArriModel { final String message; const DefaultPayload({ required this.message, }); - factory DefaultPayload.fromJson(Map json) { + + factory DefaultPayload.empty() { + return DefaultPayload( + message: "", + ); + } + + factory DefaultPayload.fromJson(Map _input_) { + final message = typeFromDynamic(_input_["message"], ""); return DefaultPayload( - message: typeFromDynamic(json["message"], ""), + message: message, ); } + factory DefaultPayload.fromJsonString(String input) { + return DefaultPayload.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "message": message, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("message=$message"); + return _queryParts_.join("&"); } + @override DefaultPayload copyWith({ String? message, }) { @@ -539,9 +590,27 @@ class DefaultPayload { message: message ?? this.message, ); } + + @override + List get props => [ + message, + ]; + + @override + bool operator ==(Object other) { + return other is DefaultPayload && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "DefaultPayload ${toJsonString()}"; + } } -class TypeBoxObject { +class TypeBoxObject implements ArriModel { final String string; final bool boolean; final int integer; @@ -560,41 +629,90 @@ class TypeBoxObject { required this.array, this.optionalString, }); - factory TypeBoxObject.fromJson(Map json) { + + factory TypeBoxObject.empty() { + return TypeBoxObject( + string: "", + boolean: false, + integer: 0, + number: 0.0, + enumField: TypeBoxObjectEnumField.a, + object: TypeBoxObjectObject.empty(), + array: [], + ); + } + + factory TypeBoxObject.fromJson(Map _input_) { + final string = typeFromDynamic(_input_["string"], ""); + final boolean = typeFromDynamic(_input_["boolean"], false); + final integer = intFromDynamic(_input_["integer"], 0); + final number = doubleFromDynamic(_input_["number"], 0.0); + final enumField = TypeBoxObjectEnumField.fromString( + typeFromDynamic(_input_["enumField"], "")); + final object = _input_["object"] is Map + ? TypeBoxObjectObject.fromJson(_input_["object"]) + : TypeBoxObjectObject.empty(); + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : []; + final optionalString = + nullableTypeFromDynamic(_input_["optionalString"]); return TypeBoxObject( - string: typeFromDynamic(json["string"], ""), - boolean: typeFromDynamic(json["boolean"], false), - integer: intFromDynamic(json["integer"], 0), - number: doubleFromDynamic(json["number"], 0), - enumField: TypeBoxObjectEnumField.fromJson(json["enumField"]), - object: TypeBoxObjectObject.fromJson(json["object"]), - array: json["array"] is List - ? - // ignore: unnecessary_cast - (json["array"] as List) - .map((item) => typeFromDynamic(item, false)) - .toList() as List - : [], - optionalString: nullableTypeFromDynamic(json["optionalString"]), + string: string, + boolean: boolean, + integer: integer, + number: number, + enumField: enumField, + object: object, + array: array, + optionalString: optionalString, ); } + factory TypeBoxObject.fromJsonString(String input) { + return TypeBoxObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "string": string, "boolean": boolean, "integer": integer, "number": number, - "enumField": enumField.value, + "enumField": enumField.serialValue, "object": object.toJson(), - "array": array.map((item) => item).toList(), + "array": array.map((_el_) => _el_).toList(), }; - if (optionalString != null) { - __result["optionalString"] = optionalString; - } - return __result; + if (optionalString != null) _output_["optionalString"] = optionalString; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("integer=$integer"); + _queryParts_.add("number=$number"); + _queryParts_.add("enumField=${enumField.serialValue}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /TypeBoxObject/object."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /TypeBoxObject/array."); + if (optionalString != null) + _queryParts_.add("optionalString=$optionalString"); + return _queryParts_.join("&"); } + @override TypeBoxObject copyWith({ String? string, bool? boolean, @@ -603,7 +721,7 @@ class TypeBoxObject { TypeBoxObjectEnumField? enumField, TypeBoxObjectObject? object, List? array, - ArriBox? optionalString, + String? Function()? optionalString, }) { return TypeBoxObject( string: string ?? this.string, @@ -614,9 +732,34 @@ class TypeBoxObject { object: object ?? this.object, array: array ?? this.array, optionalString: - optionalString != null ? optionalString.value : this.optionalString, + optionalString != null ? optionalString() : this.optionalString, ); } + + @override + List get props => [ + string, + boolean, + integer, + number, + enumField, + object, + array, + optionalString, + ]; + + @override + bool operator ==(Object other) { + return other is TypeBoxObject && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "TypeBoxObject ${toJsonString()}"; + } } enum TypeBoxObjectEnumField implements Comparable { @@ -624,41 +767,67 @@ enum TypeBoxObjectEnumField implements Comparable { b("B"), c("C"); - const TypeBoxObjectEnumField(this.value); - final String value; + const TypeBoxObjectEnumField(this.serialValue); + final String serialValue; - factory TypeBoxObjectEnumField.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory TypeBoxObjectEnumField.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return a; } @override - compareTo(TypeBoxObjectEnumField other) => name.compareTo(other.name); + int compareTo(TypeBoxObjectEnumField other) => name.compareTo(other.name); } -class TypeBoxObjectObject { +class TypeBoxObjectObject implements ArriModel { final String string; const TypeBoxObjectObject({ required this.string, }); - factory TypeBoxObjectObject.fromJson(Map json) { + + factory TypeBoxObjectObject.empty() { + return TypeBoxObjectObject( + string: "", + ); + } + + factory TypeBoxObjectObject.fromJson(Map _input_) { + final string = typeFromDynamic(_input_["string"], ""); return TypeBoxObjectObject( - string: typeFromDynamic(json["string"], ""), + string: string, ); } + factory TypeBoxObjectObject.fromJsonString(String input) { + return TypeBoxObjectObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "string": string, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + return _queryParts_.join("&"); } + @override TypeBoxObjectObject copyWith({ String? string, }) { @@ -666,29 +835,72 @@ class TypeBoxObjectObject { string: string ?? this.string, ); } + + @override + List get props => [ + string, + ]; + + @override + bool operator ==(Object other) { + return other is TypeBoxObjectObject && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "TypeBoxObjectObject ${toJsonString()}"; + } } -@deprecated -class DeprecatedRpcParams { - @deprecated +class DeprecatedRpcParams implements ArriModel { final String deprecatedField; const DeprecatedRpcParams({ required this.deprecatedField, }); - factory DeprecatedRpcParams.fromJson(Map json) { + + factory DeprecatedRpcParams.empty() { + return DeprecatedRpcParams( + deprecatedField: "", + ); + } + + factory DeprecatedRpcParams.fromJson(Map _input_) { + final deprecatedField = + typeFromDynamic(_input_["deprecatedField"], ""); return DeprecatedRpcParams( - deprecatedField: typeFromDynamic(json["deprecatedField"], ""), + deprecatedField: deprecatedField, ); } + factory DeprecatedRpcParams.fromJsonString(String input) { + return DeprecatedRpcParams.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "deprecatedField": deprecatedField, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("deprecatedField=$deprecatedField"); + return _queryParts_.join("&"); } + @override DeprecatedRpcParams copyWith({ String? deprecatedField, }) { @@ -696,12 +908,30 @@ class DeprecatedRpcParams { deprecatedField: deprecatedField ?? this.deprecatedField, ); } -} -class ObjectWithEveryType { - final dynamic any; - final bool boolean; - final String string; + @override + List get props => [ + deprecatedField, + ]; + + @override + bool operator ==(Object other) { + return other is DeprecatedRpcParams && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "DeprecatedRpcParams ${toJsonString()}"; + } +} + +class ObjectWithEveryType implements ArriModel { + final dynamic any; + final bool boolean; + final String string; final DateTime timestamp; final double float32; final double float64; @@ -719,7 +949,7 @@ class ObjectWithEveryType { final Map record; final ObjectWithEveryTypeDiscriminator discriminator; final ObjectWithEveryTypeNestedObject nestedObject; - final List> nestedArray; + final List> nestedArray; const ObjectWithEveryType({ required this.any, required this.boolean, @@ -743,61 +973,116 @@ class ObjectWithEveryType { required this.nestedObject, required this.nestedArray, }); - factory ObjectWithEveryType.fromJson(Map json) { + + factory ObjectWithEveryType.empty() { return ObjectWithEveryType( - any: json["any"], - boolean: typeFromDynamic(json["boolean"], false), - string: typeFromDynamic(json["string"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - float32: doubleFromDynamic(json["float32"], 0), - float64: doubleFromDynamic(json["float64"], 0), - int8: intFromDynamic(json["int8"], 0), - uint8: intFromDynamic(json["uint8"], 0), - int16: intFromDynamic(json["int16"], 0), - uint16: intFromDynamic(json["uint16"], 0), - int32: intFromDynamic(json["int32"], 0), - uint32: intFromDynamic(json["uint32"], 0), - int64: bigIntFromDynamic(json["int64"], BigInt.zero), - uint64: bigIntFromDynamic(json["uint64"], BigInt.zero), - enumerator: ObjectWithEveryTypeEnumerator.fromJson(json["enumerator"]), - array: json["array"] is List - ? - // ignore: unnecessary_cast - (json["array"] as List) - .map((item) => typeFromDynamic(item, false)) - .toList() as List - : [], - object: ObjectWithEveryTypeObject.fromJson(json["object"]), - record: json["record"] is Map - ? (json["record"] as Map).map((key, value) => - MapEntry(key, typeFromDynamic(value, false))) - : {}, - discriminator: - ObjectWithEveryTypeDiscriminator.fromJson(json["discriminator"]), - nestedObject: - ObjectWithEveryTypeNestedObject.fromJson(json["nestedObject"]), - nestedArray: json["nestedArray"] is List - ? - // ignore: unnecessary_cast - (json["nestedArray"] as List) - .map((item) => item is List - ? - // ignore: unnecessary_cast - (item as List) - .map((item) => - ObjectWithEveryTypeNestedArrayItemItem.fromJson(item)) - .toList() as List - : []) - .toList() as List> - : >[], - ); + any: null, + boolean: false, + string: "", + timestamp: DateTime.now(), + float32: 0.0, + float64: 0.0, + int8: 0, + uint8: 0, + int16: 0, + uint16: 0, + int32: 0, + uint32: 0, + int64: BigInt.zero, + uint64: BigInt.zero, + enumerator: ObjectWithEveryTypeEnumerator.a, + array: [], + object: ObjectWithEveryTypeObject.empty(), + record: {}, + discriminator: ObjectWithEveryTypeDiscriminator.empty(), + nestedObject: ObjectWithEveryTypeNestedObject.empty(), + nestedArray: [], + ); + } + + factory ObjectWithEveryType.fromJson(Map _input_) { + final any = _input_["any"]; + final boolean = typeFromDynamic(_input_["boolean"], false); + final string = typeFromDynamic(_input_["string"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final float32 = doubleFromDynamic(_input_["float32"], 0.0); + final float64 = doubleFromDynamic(_input_["float64"], 0.0); + final int8 = intFromDynamic(_input_["int8"], 0); + final uint8 = intFromDynamic(_input_["uint8"], 0); + final int16 = intFromDynamic(_input_["int16"], 0); + final uint16 = intFromDynamic(_input_["uint16"], 0); + final int32 = intFromDynamic(_input_["int32"], 0); + final uint32 = intFromDynamic(_input_["uint32"], 0); + final int64 = bigIntFromDynamic(_input_["int64"], BigInt.zero); + final uint64 = bigIntFromDynamic(_input_["uint64"], BigInt.zero); + final enumerator = ObjectWithEveryTypeEnumerator.fromString( + typeFromDynamic(_input_["enumerator"], "")); + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : []; + final object = _input_["object"] is Map + ? ObjectWithEveryTypeObject.fromJson(_input_["object"]) + : ObjectWithEveryTypeObject.empty(); + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + typeFromDynamic(_val_, false), + ), + ) + : {}; + final discriminator = _input_["discriminator"] is Map + ? ObjectWithEveryTypeDiscriminator.fromJson(_input_["discriminator"]) + : ObjectWithEveryTypeDiscriminator.empty(); + final nestedObject = _input_["nestedObject"] is Map + ? ObjectWithEveryTypeNestedObject.fromJson(_input_["nestedObject"]) + : ObjectWithEveryTypeNestedObject.empty(); + final nestedArray = _input_["nestedArray"] is List + ? (_input_["nestedArray"] as List) + .map((_el_) => _el_ is List + ? (_el_ as List) + .map((_el_) => _el_ is Map + ? ObjectWithEveryTypeNestedArrayElementElement.fromJson( + _el_) + : ObjectWithEveryTypeNestedArrayElementElement.empty()) + .toList() + : []) + .toList() + : >[]; + return ObjectWithEveryType( + any: any, + boolean: boolean, + string: string, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + enumerator: enumerator, + array: array, + object: object, + record: record, + discriminator: discriminator, + nestedObject: nestedObject, + nestedArray: nestedArray, + ); + } + + factory ObjectWithEveryType.fromJsonString(String input) { + return ObjectWithEveryType.fromJson(json.decode(input)); } + @override Map toJson() { - final __result = { + final _output_ = { "any": any, "boolean": boolean, "string": string, @@ -812,20 +1097,65 @@ class ObjectWithEveryType { "uint32": uint32, "int64": int64.toString(), "uint64": uint64.toString(), - "enumerator": enumerator.value, - "array": array.map((item) => item).toList(), + "enumerator": enumerator.serialValue, + "array": array.map((_el_) => _el_).toList(), "object": object.toJson(), - "record": record.map((key, value) => MapEntry(key, value)), + "record": record.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ), "discriminator": discriminator.toJson(), "nestedObject": nestedObject.toJson(), "nestedArray": nestedArray - .map((item) => item.map((item) => item.toJson()).toList()) + .map((_el_) => _el_.map((_el_) => _el_.toJson()).toList()) .toList(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithEveryType/any."); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("string=$string"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + _queryParts_.add("float32=$float32"); + _queryParts_.add("float64=$float64"); + _queryParts_.add("int8=$int8"); + _queryParts_.add("uint8=$uint8"); + _queryParts_.add("int16=$int16"); + _queryParts_.add("uint16=$uint16"); + _queryParts_.add("int32=$int32"); + _queryParts_.add("uint32=$uint32"); + _queryParts_.add("int64=$int64"); + _queryParts_.add("uint64=$uint64"); + _queryParts_.add("enumerator=${enumerator.serialValue}"); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryType/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/object."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/discriminator."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryType/nestedObject."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryType/nestedArray."); + return _queryParts_.join("&"); } + @override ObjectWithEveryType copyWith({ dynamic any, bool? boolean, @@ -847,7 +1177,7 @@ class ObjectWithEveryType { Map? record, ObjectWithEveryTypeDiscriminator? discriminator, ObjectWithEveryTypeNestedObject? nestedObject, - List>? nestedArray, + List>? nestedArray, }) { return ObjectWithEveryType( any: any ?? this.any, @@ -873,6 +1203,44 @@ class ObjectWithEveryType { nestedArray: nestedArray ?? this.nestedArray, ); } + + @override + List get props => [ + any, + boolean, + string, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + enumerator, + array, + object, + record, + discriminator, + nestedObject, + nestedArray, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryType && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryType ${toJsonString()}"; + } } enum ObjectWithEveryTypeEnumerator @@ -881,23 +1249,24 @@ enum ObjectWithEveryTypeEnumerator b("B"), c("C"); - const ObjectWithEveryTypeEnumerator(this.value); - final String value; + const ObjectWithEveryTypeEnumerator(this.serialValue); + final String serialValue; - factory ObjectWithEveryTypeEnumerator.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory ObjectWithEveryTypeEnumerator.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return a; } @override - compareTo(ObjectWithEveryTypeEnumerator other) => name.compareTo(other.name); + int compareTo(ObjectWithEveryTypeEnumerator other) => + name.compareTo(other.name); } -class ObjectWithEveryTypeObject { +class ObjectWithEveryTypeObject implements ArriModel { final String string; final bool boolean; final DateTime timestamp; @@ -906,27 +1275,56 @@ class ObjectWithEveryTypeObject { required this.boolean, required this.timestamp, }); - factory ObjectWithEveryTypeObject.fromJson(Map json) { + + factory ObjectWithEveryTypeObject.empty() { return ObjectWithEveryTypeObject( - string: typeFromDynamic(json["string"], ""), - boolean: typeFromDynamic(json["boolean"], false), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + string: "", + boolean: false, + timestamp: DateTime.now(), + ); + } + + factory ObjectWithEveryTypeObject.fromJson(Map _input_) { + final string = typeFromDynamic(_input_["string"], ""); + final boolean = typeFromDynamic(_input_["boolean"], false); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + return ObjectWithEveryTypeObject( + string: string, + boolean: boolean, + timestamp: timestamp, ); } + factory ObjectWithEveryTypeObject.fromJsonString(String input) { + return ObjectWithEveryTypeObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "string": string, "boolean": boolean, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeObject copyWith({ String? string, bool? boolean, @@ -938,56 +1336,107 @@ class ObjectWithEveryTypeObject { timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + string, + boolean, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeObject ${toJsonString()}"; + } } -sealed class ObjectWithEveryTypeDiscriminator { - final String type; - const ObjectWithEveryTypeDiscriminator({ - required this.type, - }); - factory ObjectWithEveryTypeDiscriminator.fromJson(Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode ObjectWithEveryTypeDiscriminator. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { +sealed class ObjectWithEveryTypeDiscriminator implements ArriModel { + String get type; + const ObjectWithEveryTypeDiscriminator(); + + factory ObjectWithEveryTypeDiscriminator.empty() { + return ObjectWithEveryTypeDiscriminatorA.empty(); + } + + factory ObjectWithEveryTypeDiscriminator.fromJson( + Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "A": - return ObjectWithEveryTypeDiscriminatorA.fromJson(json); + return ObjectWithEveryTypeDiscriminatorA.fromJson(_input_); case "B": - return ObjectWithEveryTypeDiscriminatorB.fromJson(json); + return ObjectWithEveryTypeDiscriminatorB.fromJson(_input_); + default: + return ObjectWithEveryTypeDiscriminator.empty(); } - throw Exception( - "Unable to decode ObjectWithEveryTypeDiscriminator. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory ObjectWithEveryTypeDiscriminator.fromJsonString(String input) { + return ObjectWithEveryTypeDiscriminator.fromJson(json.decode(input)); + } } class ObjectWithEveryTypeDiscriminatorA implements ObjectWithEveryTypeDiscriminator { - @override - final String type = "A"; final String title; const ObjectWithEveryTypeDiscriminatorA({ required this.title, }); + + @override + String get type => "A"; + + factory ObjectWithEveryTypeDiscriminatorA.empty() { + return ObjectWithEveryTypeDiscriminatorA( + title: "", + ); + } + factory ObjectWithEveryTypeDiscriminatorA.fromJson( - Map json) { + Map _input_) { + final title = typeFromDynamic(_input_["title"], ""); return ObjectWithEveryTypeDiscriminatorA( - title: typeFromDynamic(json["title"], ""), + title: title, ); } + + factory ObjectWithEveryTypeDiscriminatorA.fromJsonString(String input) { + return ObjectWithEveryTypeDiscriminatorA.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeDiscriminatorA copyWith({ String? title, }) { @@ -995,36 +1444,86 @@ class ObjectWithEveryTypeDiscriminatorA title: title ?? this.title, ); } + + @override + List get props => [ + title, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeDiscriminatorA && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeDiscriminatorA ${toJsonString()}"; + } } class ObjectWithEveryTypeDiscriminatorB implements ObjectWithEveryTypeDiscriminator { - @override - final String type = "B"; final String title; final String description; const ObjectWithEveryTypeDiscriminatorB({ required this.title, required this.description, }); + + @override + String get type => "B"; + + factory ObjectWithEveryTypeDiscriminatorB.empty() { + return ObjectWithEveryTypeDiscriminatorB( + title: "", + description: "", + ); + } + factory ObjectWithEveryTypeDiscriminatorB.fromJson( - Map json) { + Map _input_) { + final title = typeFromDynamic(_input_["title"], ""); + final description = typeFromDynamic(_input_["description"], ""); return ObjectWithEveryTypeDiscriminatorB( - title: typeFromDynamic(json["title"], ""), - description: typeFromDynamic(json["description"], ""), + title: title, + description: description, ); } + + factory ObjectWithEveryTypeDiscriminatorB.fromJsonString(String input) { + return ObjectWithEveryTypeDiscriminatorB.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, "description": description, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + _queryParts_.add("description=$description"); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeDiscriminatorB copyWith({ String? title, String? description, @@ -1034,9 +1533,29 @@ class ObjectWithEveryTypeDiscriminatorB description: description ?? this.description, ); } + + @override + List get props => [ + title, + description, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeDiscriminatorB && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeDiscriminatorB ${toJsonString()}"; + } } -class ObjectWithEveryTypeNestedObject { +class ObjectWithEveryTypeNestedObject implements ArriModel { final String id; final DateTime timestamp; final ObjectWithEveryTypeNestedObjectData data; @@ -1045,27 +1564,60 @@ class ObjectWithEveryTypeNestedObject { required this.timestamp, required this.data, }); - factory ObjectWithEveryTypeNestedObject.fromJson(Map json) { + + factory ObjectWithEveryTypeNestedObject.empty() { return ObjectWithEveryTypeNestedObject( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - data: ObjectWithEveryTypeNestedObjectData.fromJson(json["data"]), + id: "", + timestamp: DateTime.now(), + data: ObjectWithEveryTypeNestedObjectData.empty(), + ); + } + + factory ObjectWithEveryTypeNestedObject.fromJson( + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final data = _input_["data"] is Map + ? ObjectWithEveryTypeNestedObjectData.fromJson(_input_["data"]) + : ObjectWithEveryTypeNestedObjectData.empty(); + return ObjectWithEveryTypeNestedObject( + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryTypeNestedObject.fromJsonString(String input) { + return ObjectWithEveryTypeNestedObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryTypeNestedObject/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeNestedObject copyWith({ String? id, DateTime? timestamp, @@ -1077,9 +1629,30 @@ class ObjectWithEveryTypeNestedObject { data: data ?? this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeNestedObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeNestedObject ${toJsonString()}"; + } } -class ObjectWithEveryTypeNestedObjectData { +class ObjectWithEveryTypeNestedObjectData implements ArriModel { final String id; final DateTime timestamp; final ObjectWithEveryTypeNestedObjectDataData data; @@ -1088,28 +1661,60 @@ class ObjectWithEveryTypeNestedObjectData { required this.timestamp, required this.data, }); + + factory ObjectWithEveryTypeNestedObjectData.empty() { + return ObjectWithEveryTypeNestedObjectData( + id: "", + timestamp: DateTime.now(), + data: ObjectWithEveryTypeNestedObjectDataData.empty(), + ); + } + factory ObjectWithEveryTypeNestedObjectData.fromJson( - Map json) { + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final data = _input_["data"] is Map + ? ObjectWithEveryTypeNestedObjectDataData.fromJson(_input_["data"]) + : ObjectWithEveryTypeNestedObjectDataData.empty(); return ObjectWithEveryTypeNestedObjectData( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - data: ObjectWithEveryTypeNestedObjectDataData.fromJson(json["data"]), + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryTypeNestedObjectData.fromJsonString(String input) { + return ObjectWithEveryTypeNestedObjectData.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryTypeNestedObjectData/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeNestedObjectData copyWith({ String? id, DateTime? timestamp, @@ -1121,35 +1726,82 @@ class ObjectWithEveryTypeNestedObjectData { data: data ?? this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeNestedObjectData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeNestedObjectData ${toJsonString()}"; + } } -class ObjectWithEveryTypeNestedObjectDataData { +class ObjectWithEveryTypeNestedObjectDataData implements ArriModel { final String id; final DateTime timestamp; const ObjectWithEveryTypeNestedObjectDataData({ required this.id, required this.timestamp, }); + + factory ObjectWithEveryTypeNestedObjectDataData.empty() { + return ObjectWithEveryTypeNestedObjectDataData( + id: "", + timestamp: DateTime.now(), + ); + } + factory ObjectWithEveryTypeNestedObjectDataData.fromJson( - Map json) { + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); return ObjectWithEveryTypeNestedObjectDataData( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + id: id, + timestamp: timestamp, ); } + factory ObjectWithEveryTypeNestedObjectDataData.fromJsonString(String input) { + return ObjectWithEveryTypeNestedObjectDataData.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } + @override ObjectWithEveryTypeNestedObjectDataData copyWith({ String? id, DateTime? timestamp, @@ -1159,47 +1811,115 @@ class ObjectWithEveryTypeNestedObjectDataData { timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeNestedObjectDataData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeNestedObjectDataData ${toJsonString()}"; + } } -class ObjectWithEveryTypeNestedArrayItemItem { +class ObjectWithEveryTypeNestedArrayElementElement implements ArriModel { final String id; final DateTime timestamp; - const ObjectWithEveryTypeNestedArrayItemItem({ + const ObjectWithEveryTypeNestedArrayElementElement({ required this.id, required this.timestamp, }); - factory ObjectWithEveryTypeNestedArrayItemItem.fromJson( - Map json) { - return ObjectWithEveryTypeNestedArrayItemItem( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + + factory ObjectWithEveryTypeNestedArrayElementElement.empty() { + return ObjectWithEveryTypeNestedArrayElementElement( + id: "", + timestamp: DateTime.now(), ); } + factory ObjectWithEveryTypeNestedArrayElementElement.fromJson( + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + return ObjectWithEveryTypeNestedArrayElementElement( + id: id, + timestamp: timestamp, + ); + } + + factory ObjectWithEveryTypeNestedArrayElementElement.fromJsonString( + String input) { + return ObjectWithEveryTypeNestedArrayElementElement.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } - ObjectWithEveryTypeNestedArrayItemItem copyWith({ + @override + ObjectWithEveryTypeNestedArrayElementElement copyWith({ String? id, DateTime? timestamp, }) { - return ObjectWithEveryTypeNestedArrayItemItem( + return ObjectWithEveryTypeNestedArrayElementElement( id: id ?? this.id, timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryTypeNestedArrayElementElement && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryTypeNestedArrayElementElement ${toJsonString()}"; + } } -class ObjectWithEveryNullableType { +class ObjectWithEveryNullableType implements ArriModel { final dynamic any; final bool? boolean; final String? string; @@ -1220,7 +1940,7 @@ class ObjectWithEveryNullableType { final Map? record; final ObjectWithEveryNullableTypeDiscriminator? discriminator; final ObjectWithEveryNullableTypeNestedObject? nestedObject; - final List?>? + final List?>? nestedArray; const ObjectWithEveryNullableType({ required this.any, @@ -1245,70 +1965,120 @@ class ObjectWithEveryNullableType { required this.nestedObject, required this.nestedArray, }); - factory ObjectWithEveryNullableType.fromJson(Map json) { + + factory ObjectWithEveryNullableType.empty() { return ObjectWithEveryNullableType( - any: json["any"], - boolean: nullableTypeFromDynamic(json["boolean"]), - string: nullableTypeFromDynamic(json["string"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), - float32: nullableDoubleFromDynamic(json["float32"]), - float64: nullableDoubleFromDynamic(json["float64"]), - int8: nullableIntFromDynamic(json["int8"]), - uint8: nullableIntFromDynamic(json["uint8"]), - int16: nullableIntFromDynamic(json["int16"]), - uint16: nullableIntFromDynamic(json["uint16"]), - int32: nullableIntFromDynamic(json["int32"]), - uint32: nullableIntFromDynamic(json["uint32"]), - int64: nullableBigIntFromDynamic(json["int64"]), - uint64: nullableBigIntFromDynamic(json["uint64"]), - enumerator: json["enumerator"] is String - ? ObjectWithEveryNullableTypeEnumerator.fromJson(json["enumerator"]) - : null, - array: json["array"] is List - ? - // ignore: unnecessary_cast - (json["array"] as List) - .map((item) => nullableTypeFromDynamic(item)) - .toList() as List? - : null, - object: json["object"] is Map - ? ObjectWithEveryNullableTypeObject.fromJson(json["object"]) - : null, - record: json["record"] is Map - ? (json["record"] as Map).map((key, value) => - MapEntry(key, nullableTypeFromDynamic(value))) - : {}, - discriminator: json["discriminator"] is Map - ? ObjectWithEveryNullableTypeDiscriminator.fromJson( - json["discriminator"]) - : null, - nestedObject: json["nestedObject"] is Map - ? ObjectWithEveryNullableTypeNestedObject.fromJson( - json["nestedObject"]) - : null, - nestedArray: json["nestedArray"] is List - ? - // ignore: unnecessary_cast - (json["nestedArray"] as List) - .map((item) => item is List - ? - // ignore: unnecessary_cast - (item as List) - .map((item) => item is Map - ? ObjectWithEveryNullableTypeNestedArrayItemItem - .fromJson(item) - : null) - .toList() - as List? - : null) - .toList() - as List?>? - : null, - ); + any: null, + boolean: null, + string: null, + timestamp: null, + float32: null, + float64: null, + int8: null, + uint8: null, + int16: null, + uint16: null, + int32: null, + uint32: null, + int64: null, + uint64: null, + enumerator: null, + array: null, + object: null, + record: null, + discriminator: null, + nestedObject: null, + nestedArray: null, + ); + } + + factory ObjectWithEveryNullableType.fromJson(Map _input_) { + final any = _input_["any"]; + final boolean = nullableTypeFromDynamic(_input_["boolean"]); + final string = nullableTypeFromDynamic(_input_["string"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final float32 = nullableDoubleFromDynamic(_input_["float32"]); + final float64 = nullableDoubleFromDynamic(_input_["float64"]); + final int8 = nullableIntFromDynamic(_input_["int8"]); + final uint8 = nullableIntFromDynamic(_input_["uint8"]); + final int16 = nullableIntFromDynamic(_input_["int16"]); + final uint16 = nullableIntFromDynamic(_input_["uint16"]); + final int32 = nullableIntFromDynamic(_input_["int32"]); + final uint32 = nullableIntFromDynamic(_input_["uint32"]); + final int64 = nullableBigIntFromDynamic(_input_["int64"]); + final uint64 = nullableBigIntFromDynamic(_input_["uint64"]); + final enumerator = _input_["enumerator"] is String + ? ObjectWithEveryNullableTypeEnumerator.fromString( + _input_["enumerator"]) + : null; + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => nullableTypeFromDynamic(_el_)) + .toList() + : null; + final object = _input_["object"] is Map + ? ObjectWithEveryNullableTypeObject.fromJson(_input_["object"]) + : null; + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + nullableTypeFromDynamic(_val_), + ), + ) + : null; + final discriminator = _input_["discriminator"] is Map + ? ObjectWithEveryNullableTypeDiscriminator.fromJson( + _input_["discriminator"]) + : null; + final nestedObject = _input_["nestedObject"] is Map + ? ObjectWithEveryNullableTypeNestedObject.fromJson( + _input_["nestedObject"]) + : null; + final nestedArray = _input_["nestedArray"] is List + ? (_input_["nestedArray"] as List) + .map((_el_) => _el_ is List + ? (_el_ as List) + .map((_el_) => _el_ is Map + ? ObjectWithEveryNullableTypeNestedArrayElementElement + .fromJson(_el_) + : null) + .toList() + : null) + .toList() + : null; + return ObjectWithEveryNullableType( + any: any, + boolean: boolean, + string: string, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + enumerator: enumerator, + array: array, + object: object, + record: record, + discriminator: discriminator, + nestedObject: nestedObject, + nestedArray: nestedArray, + ); + } + + factory ObjectWithEveryNullableType.fromJsonString(String input) { + return ObjectWithEveryNullableType.fromJson(json.decode(input)); } + @override Map toJson() { - final __result = { + final _output_ = { "any": any, "boolean": boolean, "string": string, @@ -1323,96 +2093,180 @@ class ObjectWithEveryNullableType { "uint32": uint32, "int64": int64?.toString(), "uint64": uint64?.toString(), - "enumerator": enumerator?.value, - "array": array?.map((item) => item).toList(), + "enumerator": enumerator?.serialValue, + "array": array?.map((_el_) => _el_).toList(), "object": object?.toJson(), - "record": record?.map((key, value) => MapEntry(key, value)), + "record": record?.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ), "discriminator": discriminator?.toJson(), "nestedObject": nestedObject?.toJson(), "nestedArray": nestedArray - ?.map((item) => item?.map((item) => item?.toJson()).toList()) + ?.map((_el_) => _el_?.map((_el_) => _el_?.toJson()).toList()) .toList(), }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/any."); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("string=$string"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + _queryParts_.add("float32=$float32"); + _queryParts_.add("float64=$float64"); + _queryParts_.add("int8=$int8"); + _queryParts_.add("uint8=$uint8"); + _queryParts_.add("int16=$int16"); + _queryParts_.add("uint16=$uint16"); + _queryParts_.add("int32=$int32"); + _queryParts_.add("uint32=$uint32"); + _queryParts_.add("int64=$int64"); + _queryParts_.add("uint64=$uint64"); + _queryParts_.add("enumerator=${enumerator?.serialValue}"); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/object."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/discriminator."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/nestedObject."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableType/nestedArray."); + return _queryParts_.join("&"); + } + + @override ObjectWithEveryNullableType copyWith({ - dynamic any, - ArriBox? boolean, - ArriBox? string, - ArriBox? timestamp, - ArriBox? float32, - ArriBox? float64, - ArriBox? int8, - ArriBox? uint8, - ArriBox? int16, - ArriBox? uint16, - ArriBox? int32, - ArriBox? uint32, - ArriBox? int64, - ArriBox? uint64, - ObjectWithEveryNullableTypeEnumerator? enumerator, - ArriBox?>? array, - ArriBox? object, - ArriBox?>? record, - ArriBox? discriminator, - ArriBox? nestedObject, - ArriBox?>?>? + dynamic Function()? any, + bool? Function()? boolean, + String? Function()? string, + DateTime? Function()? timestamp, + double? Function()? float32, + double? Function()? float64, + int? Function()? int8, + int? Function()? uint8, + int? Function()? int16, + int? Function()? uint16, + int? Function()? int32, + int? Function()? uint32, + BigInt? Function()? int64, + BigInt? Function()? uint64, + ObjectWithEveryNullableTypeEnumerator? Function()? enumerator, + List? Function()? array, + ObjectWithEveryNullableTypeObject? Function()? object, + Map? Function()? record, + ObjectWithEveryNullableTypeDiscriminator? Function()? discriminator, + ObjectWithEveryNullableTypeNestedObject? Function()? nestedObject, + List?>? + Function()? nestedArray, }) { return ObjectWithEveryNullableType( - any: any ?? this.any, - boolean: boolean != null ? boolean.value : this.boolean, - string: string != null ? string.value : this.string, - timestamp: timestamp != null ? timestamp.value : this.timestamp, - float32: float32 != null ? float32.value : this.float32, - float64: float64 != null ? float64.value : this.float64, - int8: int8 != null ? int8.value : this.int8, - uint8: uint8 != null ? uint8.value : this.uint8, - int16: int16 != null ? int16.value : this.int16, - uint16: uint16 != null ? uint16.value : this.uint16, - int32: int32 != null ? int32.value : this.int32, - uint32: uint32 != null ? uint32.value : this.uint32, - int64: int64 != null ? int64.value : this.int64, - uint64: uint64 != null ? uint64.value : this.uint64, - enumerator: enumerator ?? this.enumerator, - array: array != null ? array.value : this.array, - object: object != null ? object.value : this.object, - record: record != null ? record.value : this.record, + any: any != null ? any() : this.any, + boolean: boolean != null ? boolean() : this.boolean, + string: string != null ? string() : this.string, + timestamp: timestamp != null ? timestamp() : this.timestamp, + float32: float32 != null ? float32() : this.float32, + float64: float64 != null ? float64() : this.float64, + int8: int8 != null ? int8() : this.int8, + uint8: uint8 != null ? uint8() : this.uint8, + int16: int16 != null ? int16() : this.int16, + uint16: uint16 != null ? uint16() : this.uint16, + int32: int32 != null ? int32() : this.int32, + uint32: uint32 != null ? uint32() : this.uint32, + int64: int64 != null ? int64() : this.int64, + uint64: uint64 != null ? uint64() : this.uint64, + enumerator: enumerator != null ? enumerator() : this.enumerator, + array: array != null ? array() : this.array, + object: object != null ? object() : this.object, + record: record != null ? record() : this.record, discriminator: - discriminator != null ? discriminator.value : this.discriminator, - nestedObject: - nestedObject != null ? nestedObject.value : this.nestedObject, - nestedArray: nestedArray != null ? nestedArray.value : this.nestedArray, + discriminator != null ? discriminator() : this.discriminator, + nestedObject: nestedObject != null ? nestedObject() : this.nestedObject, + nestedArray: nestedArray != null ? nestedArray() : this.nestedArray, ); } -} -enum ObjectWithEveryNullableTypeEnumerator - implements Comparable { - a("A"), - b("B"), - c("C"); + @override + List get props => [ + any, + boolean, + string, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + enumerator, + array, + object, + record, + discriminator, + nestedObject, + nestedArray, + ]; - const ObjectWithEveryNullableTypeEnumerator(this.value); - final String value; + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableType && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableType ${toJsonString()}"; + } +} + +enum ObjectWithEveryNullableTypeEnumerator + implements Comparable { + a("A"), + b("B"), + c("C"); + + const ObjectWithEveryNullableTypeEnumerator(this.serialValue); + final String serialValue; - factory ObjectWithEveryNullableTypeEnumerator.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory ObjectWithEveryNullableTypeEnumerator.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return a; } @override - compareTo(ObjectWithEveryNullableTypeEnumerator other) => + int compareTo(ObjectWithEveryNullableTypeEnumerator other) => name.compareTo(other.name); } -class ObjectWithEveryNullableTypeObject { +class ObjectWithEveryNullableTypeObject implements ArriModel { final String? string; final bool? boolean; final DateTime? timestamp; @@ -1421,136 +2275,294 @@ class ObjectWithEveryNullableTypeObject { required this.boolean, required this.timestamp, }); + + factory ObjectWithEveryNullableTypeObject.empty() { + return ObjectWithEveryNullableTypeObject( + string: null, + boolean: null, + timestamp: null, + ); + } + factory ObjectWithEveryNullableTypeObject.fromJson( - Map json) { + Map _input_) { + final string = nullableTypeFromDynamic(_input_["string"]); + final boolean = nullableTypeFromDynamic(_input_["boolean"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); return ObjectWithEveryNullableTypeObject( - string: nullableTypeFromDynamic(json["string"]), - boolean: nullableTypeFromDynamic(json["boolean"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), + string: string, + boolean: boolean, + timestamp: timestamp, ); } + factory ObjectWithEveryNullableTypeObject.fromJsonString(String input) { + return ObjectWithEveryNullableTypeObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "string": string, "boolean": boolean, "timestamp": timestamp?.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeObject copyWith({ - ArriBox? string, - ArriBox? boolean, - ArriBox? timestamp, + String? Function()? string, + bool? Function()? boolean, + DateTime? Function()? timestamp, }) { return ObjectWithEveryNullableTypeObject( - string: string != null ? string.value : this.string, - boolean: boolean != null ? boolean.value : this.boolean, - timestamp: timestamp != null ? timestamp.value : this.timestamp, + string: string != null ? string() : this.string, + boolean: boolean != null ? boolean() : this.boolean, + timestamp: timestamp != null ? timestamp() : this.timestamp, ); } + + @override + List get props => [ + string, + boolean, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeObject ${toJsonString()}"; + } } -sealed class ObjectWithEveryNullableTypeDiscriminator { - final String type; - const ObjectWithEveryNullableTypeDiscriminator({ - required this.type, - }); +sealed class ObjectWithEveryNullableTypeDiscriminator implements ArriModel { + String get type; + const ObjectWithEveryNullableTypeDiscriminator(); + + factory ObjectWithEveryNullableTypeDiscriminator.empty() { + return ObjectWithEveryNullableTypeDiscriminatorA.empty(); + } + factory ObjectWithEveryNullableTypeDiscriminator.fromJson( - Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode ObjectWithEveryNullableTypeDiscriminator. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { + Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "A": - return ObjectWithEveryNullableTypeDiscriminatorA.fromJson(json); + return ObjectWithEveryNullableTypeDiscriminatorA.fromJson(_input_); case "B": - return ObjectWithEveryNullableTypeDiscriminatorB.fromJson(json); + return ObjectWithEveryNullableTypeDiscriminatorB.fromJson(_input_); + default: + return ObjectWithEveryNullableTypeDiscriminator.empty(); } - throw Exception( - "Unable to decode ObjectWithEveryNullableTypeDiscriminator. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory ObjectWithEveryNullableTypeDiscriminator.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeDiscriminator.fromJson( + json.decode(input)); + } } class ObjectWithEveryNullableTypeDiscriminatorA implements ObjectWithEveryNullableTypeDiscriminator { - @override - final String type = "A"; final String? title; const ObjectWithEveryNullableTypeDiscriminatorA({ required this.title, }); + + @override + String get type => "A"; + + factory ObjectWithEveryNullableTypeDiscriminatorA.empty() { + return ObjectWithEveryNullableTypeDiscriminatorA( + title: null, + ); + } + factory ObjectWithEveryNullableTypeDiscriminatorA.fromJson( - Map json) { + Map _input_) { + final title = nullableTypeFromDynamic(_input_["title"]); return ObjectWithEveryNullableTypeDiscriminatorA( - title: nullableTypeFromDynamic(json["title"]), + title: title, ); } + + factory ObjectWithEveryNullableTypeDiscriminatorA.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeDiscriminatorA.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeDiscriminatorA copyWith({ - ArriBox? title, + String? Function()? title, }) { return ObjectWithEveryNullableTypeDiscriminatorA( - title: title != null ? title.value : this.title, + title: title != null ? title() : this.title, ); } + + @override + List get props => [ + title, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeDiscriminatorA && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeDiscriminatorA ${toJsonString()}"; + } } class ObjectWithEveryNullableTypeDiscriminatorB implements ObjectWithEveryNullableTypeDiscriminator { - @override - final String type = "B"; final String? title; final String? description; const ObjectWithEveryNullableTypeDiscriminatorB({ required this.title, required this.description, }); + + @override + String get type => "B"; + + factory ObjectWithEveryNullableTypeDiscriminatorB.empty() { + return ObjectWithEveryNullableTypeDiscriminatorB( + title: null, + description: null, + ); + } + factory ObjectWithEveryNullableTypeDiscriminatorB.fromJson( - Map json) { + Map _input_) { + final title = nullableTypeFromDynamic(_input_["title"]); + final description = nullableTypeFromDynamic(_input_["description"]); return ObjectWithEveryNullableTypeDiscriminatorB( - title: nullableTypeFromDynamic(json["title"]), - description: nullableTypeFromDynamic(json["description"]), + title: title, + description: description, ); } + + factory ObjectWithEveryNullableTypeDiscriminatorB.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeDiscriminatorB.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, "description": description, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + _queryParts_.add("description=$description"); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeDiscriminatorB copyWith({ - ArriBox? title, - ArriBox? description, + String? Function()? title, + String? Function()? description, }) { return ObjectWithEveryNullableTypeDiscriminatorB( - title: title != null ? title.value : this.title, - description: description != null ? description.value : this.description, + title: title != null ? title() : this.title, + description: description != null ? description() : this.description, ); } + + @override + List get props => [ + title, + description, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeDiscriminatorB && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeDiscriminatorB ${toJsonString()}"; + } } -class ObjectWithEveryNullableTypeNestedObject { +class ObjectWithEveryNullableTypeNestedObject implements ArriModel { final String? id; final DateTime? timestamp; final ObjectWithEveryNullableTypeNestedObjectData? data; @@ -1559,41 +2571,95 @@ class ObjectWithEveryNullableTypeNestedObject { required this.timestamp, required this.data, }); + + factory ObjectWithEveryNullableTypeNestedObject.empty() { + return ObjectWithEveryNullableTypeNestedObject( + id: null, + timestamp: null, + data: null, + ); + } + factory ObjectWithEveryNullableTypeNestedObject.fromJson( - Map json) { + Map _input_) { + final id = nullableTypeFromDynamic(_input_["id"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final data = _input_["data"] is Map + ? ObjectWithEveryNullableTypeNestedObjectData.fromJson(_input_["data"]) + : null; return ObjectWithEveryNullableTypeNestedObject( - id: nullableTypeFromDynamic(json["id"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), - data: json["data"] is Map - ? ObjectWithEveryNullableTypeNestedObjectData.fromJson(json["data"]) - : null, + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryNullableTypeNestedObject.fromJsonString(String input) { + return ObjectWithEveryNullableTypeNestedObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp?.toUtc().toIso8601String(), "data": data?.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableTypeNestedObject/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeNestedObject copyWith({ - ArriBox? id, - ArriBox? timestamp, - ArriBox? data, + String? Function()? id, + DateTime? Function()? timestamp, + ObjectWithEveryNullableTypeNestedObjectData? Function()? data, }) { return ObjectWithEveryNullableTypeNestedObject( - id: id != null ? id.value : this.id, - timestamp: timestamp != null ? timestamp.value : this.timestamp, - data: data != null ? data.value : this.data, + id: id != null ? id() : this.id, + timestamp: timestamp != null ? timestamp() : this.timestamp, + data: data != null ? data() : this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeNestedObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeNestedObject ${toJsonString()}"; + } } -class ObjectWithEveryNullableTypeNestedObjectData { +class ObjectWithEveryNullableTypeNestedObjectData implements ArriModel { final String? id; final DateTime? timestamp; final ObjectWithEveryNullableTypeNestedObjectDataData? data; @@ -1602,112 +2668,271 @@ class ObjectWithEveryNullableTypeNestedObjectData { required this.timestamp, required this.data, }); + + factory ObjectWithEveryNullableTypeNestedObjectData.empty() { + return ObjectWithEveryNullableTypeNestedObjectData( + id: null, + timestamp: null, + data: null, + ); + } + factory ObjectWithEveryNullableTypeNestedObjectData.fromJson( - Map json) { + Map _input_) { + final id = nullableTypeFromDynamic(_input_["id"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final data = _input_["data"] is Map + ? ObjectWithEveryNullableTypeNestedObjectDataData.fromJson( + _input_["data"]) + : null; return ObjectWithEveryNullableTypeNestedObjectData( - id: nullableTypeFromDynamic(json["id"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), - data: json["data"] is Map - ? ObjectWithEveryNullableTypeNestedObjectDataData.fromJson( - json["data"]) - : null, + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryNullableTypeNestedObjectData.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeNestedObjectData.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp?.toUtc().toIso8601String(), "data": data?.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryNullableTypeNestedObjectData/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeNestedObjectData copyWith({ - ArriBox? id, - ArriBox? timestamp, - ArriBox? data, + String? Function()? id, + DateTime? Function()? timestamp, + ObjectWithEveryNullableTypeNestedObjectDataData? Function()? data, }) { return ObjectWithEveryNullableTypeNestedObjectData( - id: id != null ? id.value : this.id, - timestamp: timestamp != null ? timestamp.value : this.timestamp, - data: data != null ? data.value : this.data, + id: id != null ? id() : this.id, + timestamp: timestamp != null ? timestamp() : this.timestamp, + data: data != null ? data() : this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeNestedObjectData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeNestedObjectData ${toJsonString()}"; + } } -class ObjectWithEveryNullableTypeNestedObjectDataData { +class ObjectWithEveryNullableTypeNestedObjectDataData implements ArriModel { final String? id; final DateTime? timestamp; const ObjectWithEveryNullableTypeNestedObjectDataData({ required this.id, required this.timestamp, }); + + factory ObjectWithEveryNullableTypeNestedObjectDataData.empty() { + return ObjectWithEveryNullableTypeNestedObjectDataData( + id: null, + timestamp: null, + ); + } + factory ObjectWithEveryNullableTypeNestedObjectDataData.fromJson( - Map json) { + Map _input_) { + final id = nullableTypeFromDynamic(_input_["id"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); return ObjectWithEveryNullableTypeNestedObjectDataData( - id: nullableTypeFromDynamic(json["id"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), + id: id, + timestamp: timestamp, ); } + factory ObjectWithEveryNullableTypeNestedObjectDataData.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeNestedObjectDataData.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp?.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } + @override ObjectWithEveryNullableTypeNestedObjectDataData copyWith({ - ArriBox? id, - ArriBox? timestamp, + String? Function()? id, + DateTime? Function()? timestamp, }) { return ObjectWithEveryNullableTypeNestedObjectDataData( - id: id != null ? id.value : this.id, - timestamp: timestamp != null ? timestamp.value : this.timestamp, + id: id != null ? id() : this.id, + timestamp: timestamp != null ? timestamp() : this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeNestedObjectDataData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeNestedObjectDataData ${toJsonString()}"; + } } -class ObjectWithEveryNullableTypeNestedArrayItemItem { +class ObjectWithEveryNullableTypeNestedArrayElementElement + implements ArriModel { final String? id; final DateTime? timestamp; - const ObjectWithEveryNullableTypeNestedArrayItemItem({ + const ObjectWithEveryNullableTypeNestedArrayElementElement({ required this.id, required this.timestamp, }); - factory ObjectWithEveryNullableTypeNestedArrayItemItem.fromJson( - Map json) { - return ObjectWithEveryNullableTypeNestedArrayItemItem( - id: nullableTypeFromDynamic(json["id"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), + + factory ObjectWithEveryNullableTypeNestedArrayElementElement.empty() { + return ObjectWithEveryNullableTypeNestedArrayElementElement( + id: null, + timestamp: null, ); } + factory ObjectWithEveryNullableTypeNestedArrayElementElement.fromJson( + Map _input_) { + final id = nullableTypeFromDynamic(_input_["id"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + return ObjectWithEveryNullableTypeNestedArrayElementElement( + id: id, + timestamp: timestamp, + ); + } + + factory ObjectWithEveryNullableTypeNestedArrayElementElement.fromJsonString( + String input) { + return ObjectWithEveryNullableTypeNestedArrayElementElement.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp?.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp?.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } - ObjectWithEveryNullableTypeNestedArrayItemItem copyWith({ - ArriBox? id, - ArriBox? timestamp, + @override + ObjectWithEveryNullableTypeNestedArrayElementElement copyWith({ + String? Function()? id, + DateTime? Function()? timestamp, }) { - return ObjectWithEveryNullableTypeNestedArrayItemItem( - id: id != null ? id.value : this.id, - timestamp: timestamp != null ? timestamp.value : this.timestamp, + return ObjectWithEveryNullableTypeNestedArrayElementElement( + id: id != null ? id() : this.id, + timestamp: timestamp != null ? timestamp() : this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryNullableTypeNestedArrayElementElement && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryNullableTypeNestedArrayElementElement ${toJsonString()}"; + } } -class ObjectWithEveryOptionalType { +class ObjectWithEveryOptionalType implements ArriModel { final dynamic any; final bool? boolean; final String? string; @@ -1728,7 +2953,8 @@ class ObjectWithEveryOptionalType { final Map? record; final ObjectWithEveryOptionalTypeDiscriminator? discriminator; final ObjectWithEveryOptionalTypeNestedObject? nestedObject; - final List>? nestedArray; + final List>? + nestedArray; const ObjectWithEveryOptionalType({ this.any, this.boolean, @@ -1752,187 +2978,265 @@ class ObjectWithEveryOptionalType { this.nestedObject, this.nestedArray, }); - factory ObjectWithEveryOptionalType.fromJson(Map json) { + + factory ObjectWithEveryOptionalType.empty() { + return ObjectWithEveryOptionalType(); + } + + factory ObjectWithEveryOptionalType.fromJson(Map _input_) { + final any = _input_["any"]; + final boolean = nullableTypeFromDynamic(_input_["boolean"]); + final string = nullableTypeFromDynamic(_input_["string"]); + final timestamp = nullableDateTimeFromDynamic(_input_["timestamp"]); + final float32 = nullableDoubleFromDynamic(_input_["float32"]); + final float64 = nullableDoubleFromDynamic(_input_["float64"]); + final int8 = nullableIntFromDynamic(_input_["int8"]); + final uint8 = nullableIntFromDynamic(_input_["uint8"]); + final int16 = nullableIntFromDynamic(_input_["int16"]); + final uint16 = nullableIntFromDynamic(_input_["uint16"]); + final int32 = nullableIntFromDynamic(_input_["int32"]); + final uint32 = nullableIntFromDynamic(_input_["uint32"]); + final int64 = nullableBigIntFromDynamic(_input_["int64"]); + final uint64 = nullableBigIntFromDynamic(_input_["uint64"]); + final enumerator = _input_["enumerator"] is String + ? ObjectWithEveryOptionalTypeEnumerator.fromString( + _input_["enumerator"]) + : null; + final array = _input_["array"] is List + ? (_input_["array"] as List) + .map((_el_) => typeFromDynamic(_el_, false)) + .toList() + : null; + final object = _input_["object"] is Map + ? ObjectWithEveryOptionalTypeObject.fromJson(_input_["object"]) + : null; + final record = _input_["record"] is Map + ? (_input_["record"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + typeFromDynamic(_val_, false), + ), + ) + : null; + final discriminator = _input_["discriminator"] is Map + ? ObjectWithEveryOptionalTypeDiscriminator.fromJson( + _input_["discriminator"]) + : null; + final nestedObject = _input_["nestedObject"] is Map + ? ObjectWithEveryOptionalTypeNestedObject.fromJson( + _input_["nestedObject"]) + : null; + final nestedArray = _input_["nestedArray"] is List + ? (_input_["nestedArray"] as List) + .map((_el_) => _el_ is List + ? (_el_ as List) + .map((_el_) => _el_ is Map + ? ObjectWithEveryOptionalTypeNestedArrayElementElement + .fromJson(_el_) + : ObjectWithEveryOptionalTypeNestedArrayElementElement + .empty()) + .toList() + : []) + .toList() + : null; return ObjectWithEveryOptionalType( - any: json["any"], - boolean: nullableTypeFromDynamic(json["boolean"]), - string: nullableTypeFromDynamic(json["string"]), - timestamp: nullableDateTimeFromDynamic(json["timestamp"]), - float32: nullableDoubleFromDynamic(json["float32"]), - float64: nullableDoubleFromDynamic(json["float64"]), - int8: nullableIntFromDynamic(json["int8"]), - uint8: nullableIntFromDynamic(json["uint8"]), - int16: nullableIntFromDynamic(json["int16"]), - uint16: nullableIntFromDynamic(json["uint16"]), - int32: nullableIntFromDynamic(json["int32"]), - uint32: nullableIntFromDynamic(json["uint32"]), - int64: nullableBigIntFromDynamic(json["int64"]), - uint64: nullableBigIntFromDynamic(json["uint64"]), - enumerator: json["enumerator"] is String - ? ObjectWithEveryOptionalTypeEnumerator.fromJson(json["enumerator"]) - : null, - array: json["array"] is List - ? - // ignore: unnecessary_cast - (json["array"] as List) - .map((item) => typeFromDynamic(item, false)) - .toList() as List? - : null, - object: json["object"] is Map - ? ObjectWithEveryOptionalTypeObject.fromJson(json["object"]) - : null, - record: json["record"] is Map - ? (json["record"] as Map).map((key, value) => - MapEntry(key, typeFromDynamic(value, false))) - : {}, - discriminator: json["discriminator"] is Map - ? ObjectWithEveryOptionalTypeDiscriminator.fromJson( - json["discriminator"]) - : null, - nestedObject: json["nestedObject"] is Map - ? ObjectWithEveryOptionalTypeNestedObject.fromJson( - json["nestedObject"]) - : null, - nestedArray: json["nestedArray"] is List - ? - // ignore: unnecessary_cast - (json["nestedArray"] as List) - .map((item) => item is List - ? - // ignore: unnecessary_cast - (item as List) - .map((item) => - ObjectWithEveryOptionalTypeNestedArrayItemItem - .fromJson(item)) - .toList() - as List - : []) - .toList() - as List>? - : null, - ); + any: any, + boolean: boolean, + string: string, + timestamp: timestamp, + float32: float32, + float64: float64, + int8: int8, + uint8: uint8, + int16: int16, + uint16: uint16, + int32: int32, + uint32: uint32, + int64: int64, + uint64: uint64, + enumerator: enumerator, + array: array, + object: object, + record: record, + discriminator: discriminator, + nestedObject: nestedObject, + nestedArray: nestedArray, + ); + } + + factory ObjectWithEveryOptionalType.fromJsonString(String input) { + return ObjectWithEveryOptionalType.fromJson(json.decode(input)); } + @override Map toJson() { - final __result = {}; - if (any != null) { - __result["any"] = any; - } - if (boolean != null) { - __result["boolean"] = boolean; - } - if (string != null) { - __result["string"] = string; - } - if (timestamp != null) { - __result["timestamp"] = timestamp?.toUtc().toIso8601String(); - } - if (float32 != null) { - __result["float32"] = float32; - } - if (float64 != null) { - __result["float64"] = float64; - } - if (int8 != null) { - __result["int8"] = int8; - } - if (uint8 != null) { - __result["uint8"] = uint8; - } - if (int16 != null) { - __result["int16"] = int16; - } - if (uint16 != null) { - __result["uint16"] = uint16; - } - if (int32 != null) { - __result["int32"] = int32; - } - if (uint32 != null) { - __result["uint32"] = uint32; - } - if (int64 != null) { - __result["int64"] = int64?.toString(); - } - if (uint64 != null) { - __result["uint64"] = uint64?.toString(); - } - if (enumerator != null) { - __result["enumerator"] = enumerator?.value; - } - if (array != null) { - __result["array"] = array?.map((item) => item).toList(); - } - if (object != null) { - __result["object"] = object?.toJson(); - } - if (record != null) { - __result["record"] = record?.map((key, value) => MapEntry(key, value)); - } - if (discriminator != null) { - __result["discriminator"] = discriminator?.toJson(); - } - if (nestedObject != null) { - __result["nestedObject"] = nestedObject?.toJson(); - } - if (nestedArray != null) { - __result["nestedArray"] = nestedArray - ?.map((item) => item.map((item) => item.toJson()).toList()) + final _output_ = {}; + if (any != null) _output_["any"] = any; + if (boolean != null) _output_["boolean"] = boolean; + if (string != null) _output_["string"] = string; + if (timestamp != null) + _output_["timestamp"] = timestamp!.toUtc().toIso8601String(); + if (float32 != null) _output_["float32"] = float32; + if (float64 != null) _output_["float64"] = float64; + if (int8 != null) _output_["int8"] = int8; + if (uint8 != null) _output_["uint8"] = uint8; + if (int16 != null) _output_["int16"] = int16; + if (uint16 != null) _output_["uint16"] = uint16; + if (int32 != null) _output_["int32"] = int32; + if (uint32 != null) _output_["uint32"] = uint32; + if (int64 != null) _output_["int64"] = int64!.toString(); + if (uint64 != null) _output_["uint64"] = uint64!.toString(); + if (enumerator != null) _output_["enumerator"] = enumerator!.serialValue; + if (array != null) _output_["array"] = array!.map((_el_) => _el_).toList(); + if (object != null) _output_["object"] = object!.toJson(); + if (record != null) + _output_["record"] = record!.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ); + if (discriminator != null) + _output_["discriminator"] = discriminator!.toJson(); + if (nestedObject != null) _output_["nestedObject"] = nestedObject!.toJson(); + if (nestedArray != null) + _output_["nestedArray"] = nestedArray! + .map((_el_) => _el_.map((_el_) => _el_.toJson()).toList()) .toList(); - } - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); } + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] any's cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/any."); + if (boolean != null) _queryParts_.add("boolean=$boolean"); + if (string != null) _queryParts_.add("string=$string"); + if (timestamp != null) + _queryParts_.add("timestamp=${timestamp!.toUtc().toIso8601String()}"); + if (float32 != null) _queryParts_.add("float32=$float32"); + if (float64 != null) _queryParts_.add("float64=$float64"); + if (int8 != null) _queryParts_.add("int8=$int8"); + if (uint8 != null) _queryParts_.add("uint8=$uint8"); + if (int16 != null) _queryParts_.add("int16=$int16"); + if (uint16 != null) _queryParts_.add("uint16=$uint16"); + if (int32 != null) _queryParts_.add("int32=$int32"); + if (uint32 != null) _queryParts_.add("uint32=$uint32"); + if (int64 != null) _queryParts_.add("int64=$int64"); + if (uint64 != null) _queryParts_.add("uint64=$uint64"); + if (enumerator != null) + _queryParts_.add("enumerator=${enumerator!.serialValue}"); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/array."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/object."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/record."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/discriminator."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/nestedObject."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalType/nestedArray."); + return _queryParts_.join("&"); + } + + @override ObjectWithEveryOptionalType copyWith({ - dynamic any, - ArriBox? boolean, - ArriBox? string, - ArriBox? timestamp, - ArriBox? float32, - ArriBox? float64, - ArriBox? int8, - ArriBox? uint8, - ArriBox? int16, - ArriBox? uint16, - ArriBox? int32, - ArriBox? uint32, - ArriBox? int64, - ArriBox? uint64, - ObjectWithEveryOptionalTypeEnumerator? enumerator, - ArriBox?>? array, - ArriBox? object, - ArriBox?>? record, - ArriBox? discriminator, - ArriBox? nestedObject, - ArriBox>?>? + dynamic Function()? any, + bool? Function()? boolean, + String? Function()? string, + DateTime? Function()? timestamp, + double? Function()? float32, + double? Function()? float64, + int? Function()? int8, + int? Function()? uint8, + int? Function()? int16, + int? Function()? uint16, + int? Function()? int32, + int? Function()? uint32, + BigInt? Function()? int64, + BigInt? Function()? uint64, + ObjectWithEveryOptionalTypeEnumerator? Function()? enumerator, + List? Function()? array, + ObjectWithEveryOptionalTypeObject? Function()? object, + Map? Function()? record, + ObjectWithEveryOptionalTypeDiscriminator? Function()? discriminator, + ObjectWithEveryOptionalTypeNestedObject? Function()? nestedObject, + List>? + Function()? nestedArray, }) { return ObjectWithEveryOptionalType( - any: any ?? this.any, - boolean: boolean != null ? boolean.value : this.boolean, - string: string != null ? string.value : this.string, - timestamp: timestamp != null ? timestamp.value : this.timestamp, - float32: float32 != null ? float32.value : this.float32, - float64: float64 != null ? float64.value : this.float64, - int8: int8 != null ? int8.value : this.int8, - uint8: uint8 != null ? uint8.value : this.uint8, - int16: int16 != null ? int16.value : this.int16, - uint16: uint16 != null ? uint16.value : this.uint16, - int32: int32 != null ? int32.value : this.int32, - uint32: uint32 != null ? uint32.value : this.uint32, - int64: int64 != null ? int64.value : this.int64, - uint64: uint64 != null ? uint64.value : this.uint64, - enumerator: enumerator ?? this.enumerator, - array: array != null ? array.value : this.array, - object: object != null ? object.value : this.object, - record: record != null ? record.value : this.record, + any: any != null ? any() : this.any, + boolean: boolean != null ? boolean() : this.boolean, + string: string != null ? string() : this.string, + timestamp: timestamp != null ? timestamp() : this.timestamp, + float32: float32 != null ? float32() : this.float32, + float64: float64 != null ? float64() : this.float64, + int8: int8 != null ? int8() : this.int8, + uint8: uint8 != null ? uint8() : this.uint8, + int16: int16 != null ? int16() : this.int16, + uint16: uint16 != null ? uint16() : this.uint16, + int32: int32 != null ? int32() : this.int32, + uint32: uint32 != null ? uint32() : this.uint32, + int64: int64 != null ? int64() : this.int64, + uint64: uint64 != null ? uint64() : this.uint64, + enumerator: enumerator != null ? enumerator() : this.enumerator, + array: array != null ? array() : this.array, + object: object != null ? object() : this.object, + record: record != null ? record() : this.record, discriminator: - discriminator != null ? discriminator.value : this.discriminator, - nestedObject: - nestedObject != null ? nestedObject.value : this.nestedObject, - nestedArray: nestedArray != null ? nestedArray.value : this.nestedArray, + discriminator != null ? discriminator() : this.discriminator, + nestedObject: nestedObject != null ? nestedObject() : this.nestedObject, + nestedArray: nestedArray != null ? nestedArray() : this.nestedArray, ); } + + @override + List get props => [ + any, + boolean, + string, + timestamp, + float32, + float64, + int8, + uint8, + int16, + uint16, + int32, + uint32, + int64, + uint64, + enumerator, + array, + object, + record, + discriminator, + nestedObject, + nestedArray, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalType && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalType ${toJsonString()}"; + } } enum ObjectWithEveryOptionalTypeEnumerator @@ -1941,24 +3245,24 @@ enum ObjectWithEveryOptionalTypeEnumerator b("B"), c("C"); - const ObjectWithEveryOptionalTypeEnumerator(this.value); - final String value; + const ObjectWithEveryOptionalTypeEnumerator(this.serialValue); + final String serialValue; - factory ObjectWithEveryOptionalTypeEnumerator.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory ObjectWithEveryOptionalTypeEnumerator.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return a; } @override - compareTo(ObjectWithEveryOptionalTypeEnumerator other) => + int compareTo(ObjectWithEveryOptionalTypeEnumerator other) => name.compareTo(other.name); } -class ObjectWithEveryOptionalTypeObject { +class ObjectWithEveryOptionalTypeObject implements ArriModel { final String string; final bool boolean; final DateTime timestamp; @@ -1967,28 +3271,57 @@ class ObjectWithEveryOptionalTypeObject { required this.boolean, required this.timestamp, }); - factory ObjectWithEveryOptionalTypeObject.fromJson( - Map json) { + + factory ObjectWithEveryOptionalTypeObject.empty() { return ObjectWithEveryOptionalTypeObject( - string: typeFromDynamic(json["string"], ""), - boolean: typeFromDynamic(json["boolean"], false), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + string: "", + boolean: false, + timestamp: DateTime.now(), + ); + } + + factory ObjectWithEveryOptionalTypeObject.fromJson( + Map _input_) { + final string = typeFromDynamic(_input_["string"], ""); + final boolean = typeFromDynamic(_input_["boolean"], false); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + return ObjectWithEveryOptionalTypeObject( + string: string, + boolean: boolean, + timestamp: timestamp, ); } + factory ObjectWithEveryOptionalTypeObject.fromJsonString(String input) { + return ObjectWithEveryOptionalTypeObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "string": string, "boolean": boolean, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("string=$string"); + _queryParts_.add("boolean=$boolean"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); } + @override ObjectWithEveryOptionalTypeObject copyWith({ String? string, bool? boolean, @@ -2000,57 +3333,111 @@ class ObjectWithEveryOptionalTypeObject { timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + string, + boolean, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeObject ${toJsonString()}"; + } } -sealed class ObjectWithEveryOptionalTypeDiscriminator { - final String type; - const ObjectWithEveryOptionalTypeDiscriminator({ - required this.type, - }); +sealed class ObjectWithEveryOptionalTypeDiscriminator implements ArriModel { + String get type; + const ObjectWithEveryOptionalTypeDiscriminator(); + + factory ObjectWithEveryOptionalTypeDiscriminator.empty() { + return ObjectWithEveryOptionalTypeDiscriminatorA.empty(); + } + factory ObjectWithEveryOptionalTypeDiscriminator.fromJson( - Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode ObjectWithEveryOptionalTypeDiscriminator. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { + Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "A": - return ObjectWithEveryOptionalTypeDiscriminatorA.fromJson(json); + return ObjectWithEveryOptionalTypeDiscriminatorA.fromJson(_input_); case "B": - return ObjectWithEveryOptionalTypeDiscriminatorB.fromJson(json); + return ObjectWithEveryOptionalTypeDiscriminatorB.fromJson(_input_); + default: + return ObjectWithEveryOptionalTypeDiscriminator.empty(); } - throw Exception( - "Unable to decode ObjectWithEveryOptionalTypeDiscriminator. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory ObjectWithEveryOptionalTypeDiscriminator.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeDiscriminator.fromJson( + json.decode(input)); + } } class ObjectWithEveryOptionalTypeDiscriminatorA implements ObjectWithEveryOptionalTypeDiscriminator { - @override - final String type = "A"; final String title; const ObjectWithEveryOptionalTypeDiscriminatorA({ required this.title, }); + + @override + String get type => "A"; + + factory ObjectWithEveryOptionalTypeDiscriminatorA.empty() { + return ObjectWithEveryOptionalTypeDiscriminatorA( + title: "", + ); + } + factory ObjectWithEveryOptionalTypeDiscriminatorA.fromJson( - Map json) { + Map _input_) { + final title = typeFromDynamic(_input_["title"], ""); return ObjectWithEveryOptionalTypeDiscriminatorA( - title: typeFromDynamic(json["title"], ""), + title: title, ); } + + factory ObjectWithEveryOptionalTypeDiscriminatorA.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeDiscriminatorA.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + return _queryParts_.join("&"); + } + + @override ObjectWithEveryOptionalTypeDiscriminatorA copyWith({ String? title, }) { @@ -2058,36 +3445,88 @@ class ObjectWithEveryOptionalTypeDiscriminatorA title: title ?? this.title, ); } + + @override + List get props => [ + title, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeDiscriminatorA && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeDiscriminatorA ${toJsonString()}"; + } } class ObjectWithEveryOptionalTypeDiscriminatorB implements ObjectWithEveryOptionalTypeDiscriminator { - @override - final String type = "B"; final String title; final String description; const ObjectWithEveryOptionalTypeDiscriminatorB({ required this.title, required this.description, }); + + @override + String get type => "B"; + + factory ObjectWithEveryOptionalTypeDiscriminatorB.empty() { + return ObjectWithEveryOptionalTypeDiscriminatorB( + title: "", + description: "", + ); + } + factory ObjectWithEveryOptionalTypeDiscriminatorB.fromJson( - Map json) { + Map _input_) { + final title = typeFromDynamic(_input_["title"], ""); + final description = typeFromDynamic(_input_["description"], ""); return ObjectWithEveryOptionalTypeDiscriminatorB( - title: typeFromDynamic(json["title"], ""), - description: typeFromDynamic(json["description"], ""), + title: title, + description: description, ); } + + factory ObjectWithEveryOptionalTypeDiscriminatorB.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeDiscriminatorB.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "title": title, "description": description, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("title=$title"); + _queryParts_.add("description=$description"); + return _queryParts_.join("&"); + } + + @override ObjectWithEveryOptionalTypeDiscriminatorB copyWith({ String? title, String? description, @@ -2097,9 +3536,29 @@ class ObjectWithEveryOptionalTypeDiscriminatorB description: description ?? this.description, ); } + + @override + List get props => [ + title, + description, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeDiscriminatorB && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeDiscriminatorB ${toJsonString()}"; + } } -class ObjectWithEveryOptionalTypeNestedObject { +class ObjectWithEveryOptionalTypeNestedObject implements ArriModel { final String id; final DateTime timestamp; final ObjectWithEveryOptionalTypeNestedObjectData data; @@ -2108,28 +3567,60 @@ class ObjectWithEveryOptionalTypeNestedObject { required this.timestamp, required this.data, }); + + factory ObjectWithEveryOptionalTypeNestedObject.empty() { + return ObjectWithEveryOptionalTypeNestedObject( + id: "", + timestamp: DateTime.now(), + data: ObjectWithEveryOptionalTypeNestedObjectData.empty(), + ); + } + factory ObjectWithEveryOptionalTypeNestedObject.fromJson( - Map json) { + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final data = _input_["data"] is Map + ? ObjectWithEveryOptionalTypeNestedObjectData.fromJson(_input_["data"]) + : ObjectWithEveryOptionalTypeNestedObjectData.empty(); return ObjectWithEveryOptionalTypeNestedObject( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - data: ObjectWithEveryOptionalTypeNestedObjectData.fromJson(json["data"]), + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryOptionalTypeNestedObject.fromJsonString(String input) { + return ObjectWithEveryOptionalTypeNestedObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalTypeNestedObject/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryOptionalTypeNestedObject copyWith({ String? id, DateTime? timestamp, @@ -2141,9 +3632,30 @@ class ObjectWithEveryOptionalTypeNestedObject { data: data ?? this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeNestedObject && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeNestedObject ${toJsonString()}"; + } } -class ObjectWithEveryOptionalTypeNestedObjectData { +class ObjectWithEveryOptionalTypeNestedObjectData implements ArriModel { final String id; final DateTime timestamp; final ObjectWithEveryOptionalTypeNestedObjectDataData data; @@ -2152,29 +3664,63 @@ class ObjectWithEveryOptionalTypeNestedObjectData { required this.timestamp, required this.data, }); + + factory ObjectWithEveryOptionalTypeNestedObjectData.empty() { + return ObjectWithEveryOptionalTypeNestedObjectData( + id: "", + timestamp: DateTime.now(), + data: ObjectWithEveryOptionalTypeNestedObjectDataData.empty(), + ); + } + factory ObjectWithEveryOptionalTypeNestedObjectData.fromJson( - Map json) { + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + final data = _input_["data"] is Map + ? ObjectWithEveryOptionalTypeNestedObjectDataData.fromJson( + _input_["data"]) + : ObjectWithEveryOptionalTypeNestedObjectDataData.empty(); return ObjectWithEveryOptionalTypeNestedObjectData( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - data: ObjectWithEveryOptionalTypeNestedObjectDataData.fromJson( - json["data"]), + id: id, + timestamp: timestamp, + data: data, ); } + factory ObjectWithEveryOptionalTypeNestedObjectData.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeNestedObjectData.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /ObjectWithEveryOptionalTypeNestedObjectData/data."); + return _queryParts_.join("&"); } + @override ObjectWithEveryOptionalTypeNestedObjectData copyWith({ String? id, DateTime? timestamp, @@ -2186,35 +3732,84 @@ class ObjectWithEveryOptionalTypeNestedObjectData { data: data ?? this.data, ); } + + @override + List get props => [ + id, + timestamp, + data, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeNestedObjectData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeNestedObjectData ${toJsonString()}"; + } } -class ObjectWithEveryOptionalTypeNestedObjectDataData { +class ObjectWithEveryOptionalTypeNestedObjectDataData implements ArriModel { final String id; final DateTime timestamp; const ObjectWithEveryOptionalTypeNestedObjectDataData({ required this.id, required this.timestamp, }); + + factory ObjectWithEveryOptionalTypeNestedObjectDataData.empty() { + return ObjectWithEveryOptionalTypeNestedObjectDataData( + id: "", + timestamp: DateTime.now(), + ); + } + factory ObjectWithEveryOptionalTypeNestedObjectDataData.fromJson( - Map json) { + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); return ObjectWithEveryOptionalTypeNestedObjectDataData( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + id: id, + timestamp: timestamp, ); } + factory ObjectWithEveryOptionalTypeNestedObjectDataData.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeNestedObjectDataData.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); + } + + @override ObjectWithEveryOptionalTypeNestedObjectDataData copyWith({ String? id, DateTime? timestamp, @@ -2224,47 +3819,116 @@ class ObjectWithEveryOptionalTypeNestedObjectDataData { timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeNestedObjectDataData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeNestedObjectDataData ${toJsonString()}"; + } } -class ObjectWithEveryOptionalTypeNestedArrayItemItem { +class ObjectWithEveryOptionalTypeNestedArrayElementElement + implements ArriModel { final String id; final DateTime timestamp; - const ObjectWithEveryOptionalTypeNestedArrayItemItem({ + const ObjectWithEveryOptionalTypeNestedArrayElementElement({ required this.id, required this.timestamp, }); - factory ObjectWithEveryOptionalTypeNestedArrayItemItem.fromJson( - Map json) { - return ObjectWithEveryOptionalTypeNestedArrayItemItem( - id: typeFromDynamic(json["id"], ""), - timestamp: dateTimeFromDynamic( - json["timestamp"], - DateTime.fromMillisecondsSinceEpoch(0), - ), + + factory ObjectWithEveryOptionalTypeNestedArrayElementElement.empty() { + return ObjectWithEveryOptionalTypeNestedArrayElementElement( + id: "", + timestamp: DateTime.now(), ); } + factory ObjectWithEveryOptionalTypeNestedArrayElementElement.fromJson( + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final timestamp = dateTimeFromDynamic(_input_["timestamp"], DateTime.now()); + return ObjectWithEveryOptionalTypeNestedArrayElementElement( + id: id, + timestamp: timestamp, + ); + } + + factory ObjectWithEveryOptionalTypeNestedArrayElementElement.fromJsonString( + String input) { + return ObjectWithEveryOptionalTypeNestedArrayElementElement.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "timestamp": timestamp.toUtc().toIso8601String(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); } - ObjectWithEveryOptionalTypeNestedArrayItemItem copyWith({ + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("timestamp=${timestamp.toUtc().toIso8601String()}"); + return _queryParts_.join("&"); + } + + @override + ObjectWithEveryOptionalTypeNestedArrayElementElement copyWith({ String? id, DateTime? timestamp, }) { - return ObjectWithEveryOptionalTypeNestedArrayItemItem( + return ObjectWithEveryOptionalTypeNestedArrayElementElement( id: id ?? this.id, timestamp: timestamp ?? this.timestamp, ); } + + @override + List get props => [ + id, + timestamp, + ]; + + @override + bool operator ==(Object other) { + return other is ObjectWithEveryOptionalTypeNestedArrayElementElement && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ObjectWithEveryOptionalTypeNestedArrayElementElement ${toJsonString()}"; + } } -class RecursiveObject { +class RecursiveObject implements ArriModel { final RecursiveObject? left; final RecursiveObject? right; final String value; @@ -2273,91 +3937,177 @@ class RecursiveObject { required this.right, required this.value, }); - factory RecursiveObject.fromJson(Map json) { + + factory RecursiveObject.empty() { return RecursiveObject( - left: json["left"] is Map - ? RecursiveObject.fromJson(json["left"]) - : null, - right: json["right"] is Map - ? RecursiveObject.fromJson(json["right"]) - : null, - value: typeFromDynamic(json["value"], ""), + left: null, + right: null, + value: "", ); } + factory RecursiveObject.fromJson(Map _input_) { + final left = _input_["left"] is Map + ? RecursiveObject.fromJson(_input_["left"]) + : null; + final right = _input_["right"] is Map + ? RecursiveObject.fromJson(_input_["right"]) + : null; + final value = typeFromDynamic(_input_["value"], ""); + return RecursiveObject( + left: left, + right: right, + value: value, + ); + } + + factory RecursiveObject.fromJsonString(String input) { + return RecursiveObject.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "left": left?.toJson(), "right": right?.toJson(), "value": value, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveObject/left."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveObject/right."); + _queryParts_.add("value=$value"); + return _queryParts_.join("&"); + } + + @override RecursiveObject copyWith({ - ArriBox? left, - ArriBox? right, + RecursiveObject? Function()? left, + RecursiveObject? Function()? right, String? value, }) { return RecursiveObject( - left: left != null ? left.value : this.left, - right: right != null ? right.value : this.right, + left: left != null ? left() : this.left, + right: right != null ? right() : this.right, value: value ?? this.value, ); } + + @override + List get props => [ + left, + right, + value, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveObject && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveObject ${toJsonString()}"; + } } -sealed class RecursiveUnion { - final String type; - const RecursiveUnion({ - required this.type, - }); - factory RecursiveUnion.fromJson(Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode RecursiveUnion. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { +sealed class RecursiveUnion implements ArriModel { + String get type; + const RecursiveUnion(); + + factory RecursiveUnion.empty() { + return RecursiveUnionChild.empty(); + } + + factory RecursiveUnion.fromJson(Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "CHILD": - return RecursiveUnionChild.fromJson(json); + return RecursiveUnionChild.fromJson(_input_); case "CHILDREN": - return RecursiveUnionChildren.fromJson(json); + return RecursiveUnionChildren.fromJson(_input_); case "TEXT": - return RecursiveUnionText.fromJson(json); + return RecursiveUnionText.fromJson(_input_); case "SHAPE": - return RecursiveUnionShape.fromJson(json); + return RecursiveUnionShape.fromJson(_input_); + default: + return RecursiveUnion.empty(); } - throw Exception( - "Unable to decode RecursiveUnion. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory RecursiveUnion.fromJsonString(String input) { + return RecursiveUnion.fromJson(json.decode(input)); + } } class RecursiveUnionChild implements RecursiveUnion { - @override - final String type = "CHILD"; final RecursiveUnion data; const RecursiveUnionChild({ required this.data, }); - factory RecursiveUnionChild.fromJson(Map json) { + + @override + String get type => "CHILD"; + + factory RecursiveUnionChild.empty() { return RecursiveUnionChild( - data: RecursiveUnion.fromJson(json["data"]), + data: RecursiveUnion.empty(), ); } + + factory RecursiveUnionChild.fromJson(Map _input_) { + final data = _input_["data"] is Map + ? RecursiveUnion.fromJson(_input_["data"]) + : RecursiveUnion.empty(); + return RecursiveUnionChild( + data: data, + ); + } + + factory RecursiveUnionChild.fromJsonString(String input) { + return RecursiveUnionChild.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); } + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveUnionChild/data."); + return _queryParts_.join("&"); + } + + @override RecursiveUnionChild copyWith({ RecursiveUnion? data, }) { @@ -2365,36 +4115,83 @@ class RecursiveUnionChild implements RecursiveUnion { data: data ?? this.data, ); } + + @override + List get props => [ + data, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveUnionChild && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveUnionChild ${toJsonString()}"; + } } class RecursiveUnionChildren implements RecursiveUnion { - @override - final String type = "CHILDREN"; final List data; const RecursiveUnionChildren({ required this.data, }); - factory RecursiveUnionChildren.fromJson(Map json) { + + @override + String get type => "CHILDREN"; + + factory RecursiveUnionChildren.empty() { + return RecursiveUnionChildren( + data: [], + ); + } + + factory RecursiveUnionChildren.fromJson(Map _input_) { + final data = _input_["data"] is List + ? (_input_["data"] as List) + .map((_el_) => _el_ is Map + ? RecursiveUnion.fromJson(_el_) + : RecursiveUnion.empty()) + .toList() + : []; return RecursiveUnionChildren( - data: json["data"] is List - ? - // ignore: unnecessary_cast - (json["data"] as List) - .map((item) => RecursiveUnion.fromJson(item)) - .toList() as List - : [], + data: data, ); } + + factory RecursiveUnionChildren.fromJsonString(String input) { + return RecursiveUnionChildren.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, - "data": data.map((item) => item.toJson()).toList(), + "data": data.map((_el_) => _el_.toJson()).toList(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /RecursiveUnionChildren/data."); + return _queryParts_.join("&"); } + @override RecursiveUnionChildren copyWith({ List? data, }) { @@ -2402,30 +4199,76 @@ class RecursiveUnionChildren implements RecursiveUnion { data: data ?? this.data, ); } + + @override + List get props => [ + data, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveUnionChildren && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveUnionChildren ${toJsonString()}"; + } } class RecursiveUnionText implements RecursiveUnion { - @override - final String type = "TEXT"; final String data; const RecursiveUnionText({ required this.data, }); - factory RecursiveUnionText.fromJson(Map json) { + + @override + String get type => "TEXT"; + + factory RecursiveUnionText.empty() { + return RecursiveUnionText( + data: "", + ); + } + + factory RecursiveUnionText.fromJson(Map _input_) { + final data = typeFromDynamic(_input_["data"], ""); return RecursiveUnionText( - data: typeFromDynamic(json["data"], ""), + data: data, ); } + + factory RecursiveUnionText.fromJsonString(String input) { + return RecursiveUnionText.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "data": data, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("data=$data"); + return _queryParts_.join("&"); + } + + @override RecursiveUnionText copyWith({ String? data, }) { @@ -2433,30 +4276,79 @@ class RecursiveUnionText implements RecursiveUnion { data: data ?? this.data, ); } + + @override + List get props => [ + data, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveUnionText && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveUnionText ${toJsonString()}"; + } } class RecursiveUnionShape implements RecursiveUnion { - @override - final String type = "SHAPE"; final RecursiveUnionShapeData data; const RecursiveUnionShape({ required this.data, }); - factory RecursiveUnionShape.fromJson(Map json) { + + @override + String get type => "SHAPE"; + + factory RecursiveUnionShape.empty() { + return RecursiveUnionShape( + data: RecursiveUnionShapeData.empty(), + ); + } + + factory RecursiveUnionShape.fromJson(Map _input_) { + final data = _input_["data"] is Map + ? RecursiveUnionShapeData.fromJson(_input_["data"]) + : RecursiveUnionShapeData.empty(); return RecursiveUnionShape( - data: RecursiveUnionShapeData.fromJson(json["data"]), + data: data, ); } + + factory RecursiveUnionShape.fromJsonString(String input) { + return RecursiveUnionShape.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "data": data.toJson(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); } + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /RecursiveUnionShape/data."); + return _queryParts_.join("&"); + } + + @override RecursiveUnionShape copyWith({ RecursiveUnionShapeData? data, }) { @@ -2464,9 +4356,27 @@ class RecursiveUnionShape implements RecursiveUnion { data: data ?? this.data, ); } + + @override + List get props => [ + data, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveUnionShape && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveUnionShape ${toJsonString()}"; + } } -class RecursiveUnionShapeData { +class RecursiveUnionShapeData implements ArriModel { final double width; final double height; final String color; @@ -2475,24 +4385,56 @@ class RecursiveUnionShapeData { required this.height, required this.color, }); - factory RecursiveUnionShapeData.fromJson(Map json) { + + factory RecursiveUnionShapeData.empty() { + return RecursiveUnionShapeData( + width: 0.0, + height: 0.0, + color: "", + ); + } + + factory RecursiveUnionShapeData.fromJson(Map _input_) { + final width = doubleFromDynamic(_input_["width"], 0.0); + final height = doubleFromDynamic(_input_["height"], 0.0); + final color = typeFromDynamic(_input_["color"], ""); return RecursiveUnionShapeData( - width: doubleFromDynamic(json["width"], 0), - height: doubleFromDynamic(json["height"], 0), - color: typeFromDynamic(json["color"], ""), + width: width, + height: height, + color: color, ); } + factory RecursiveUnionShapeData.fromJsonString(String input) { + return RecursiveUnionShapeData.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "width": width, "height": height, "color": color, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("width=$width"); + _queryParts_.add("height=$height"); + _queryParts_.add("color=$color"); + return _queryParts_.join("&"); } + @override RecursiveUnionShapeData copyWith({ double? width, double? height, @@ -2504,27 +4446,74 @@ class RecursiveUnionShapeData { color: color ?? this.color, ); } + + @override + List get props => [ + width, + height, + color, + ]; + + @override + bool operator ==(Object other) { + return other is RecursiveUnionShapeData && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "RecursiveUnionShapeData ${toJsonString()}"; + } } -class AutoReconnectParams { +class AutoReconnectParams implements ArriModel { final int messageCount; const AutoReconnectParams({ required this.messageCount, }); - factory AutoReconnectParams.fromJson(Map json) { + + factory AutoReconnectParams.empty() { return AutoReconnectParams( - messageCount: intFromDynamic(json["messageCount"], 0), + messageCount: 0, ); } + factory AutoReconnectParams.fromJson(Map _input_) { + final messageCount = intFromDynamic(_input_["messageCount"], 0); + return AutoReconnectParams( + messageCount: messageCount, + ); + } + + factory AutoReconnectParams.fromJsonString(String input) { + return AutoReconnectParams.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "messageCount": messageCount, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("messageCount=$messageCount"); + return _queryParts_.join("&"); + } + + @override AutoReconnectParams copyWith({ int? messageCount, }) { @@ -2532,31 +4521,78 @@ class AutoReconnectParams { messageCount: messageCount ?? this.messageCount, ); } + + @override + List get props => [ + messageCount, + ]; + + @override + bool operator ==(Object other) { + return other is AutoReconnectParams && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "AutoReconnectParams ${toJsonString()}"; + } } -class AutoReconnectResponse { +class AutoReconnectResponse implements ArriModel { final int count; final String message; const AutoReconnectResponse({ required this.count, required this.message, }); - factory AutoReconnectResponse.fromJson(Map json) { + + factory AutoReconnectResponse.empty() { + return AutoReconnectResponse( + count: 0, + message: "", + ); + } + + factory AutoReconnectResponse.fromJson(Map _input_) { + final count = intFromDynamic(_input_["count"], 0); + final message = typeFromDynamic(_input_["message"], ""); return AutoReconnectResponse( - count: intFromDynamic(json["count"], 0), - message: typeFromDynamic(json["message"], ""), + count: count, + message: message, ); } + factory AutoReconnectResponse.fromJsonString(String input) { + return AutoReconnectResponse.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "count": count, "message": message, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("count=$count"); + _queryParts_.add("message=$message"); + return _queryParts_.join("&"); + } + + @override AutoReconnectResponse copyWith({ int? count, String? message, @@ -2566,31 +4602,80 @@ class AutoReconnectResponse { message: message ?? this.message, ); } + + @override + List get props => [ + count, + message, + ]; + + @override + bool operator ==(Object other) { + return other is AutoReconnectResponse && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "AutoReconnectResponse ${toJsonString()}"; + } } -class StreamConnectionErrorTestParams { +class StreamConnectionErrorTestParams implements ArriModel { final int statusCode; final String statusMessage; const StreamConnectionErrorTestParams({ required this.statusCode, required this.statusMessage, }); - factory StreamConnectionErrorTestParams.fromJson(Map json) { + + factory StreamConnectionErrorTestParams.empty() { + return StreamConnectionErrorTestParams( + statusCode: 0, + statusMessage: "", + ); + } + + factory StreamConnectionErrorTestParams.fromJson( + Map _input_) { + final statusCode = intFromDynamic(_input_["statusCode"], 0); + final statusMessage = typeFromDynamic(_input_["statusMessage"], ""); return StreamConnectionErrorTestParams( - statusCode: intFromDynamic(json["statusCode"], 0), - statusMessage: typeFromDynamic(json["statusMessage"], ""), + statusCode: statusCode, + statusMessage: statusMessage, ); } + factory StreamConnectionErrorTestParams.fromJsonString(String input) { + return StreamConnectionErrorTestParams.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "statusCode": statusCode, "statusMessage": statusMessage, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("statusCode=$statusCode"); + _queryParts_.add("statusMessage=$statusMessage"); + return _queryParts_.join("&"); } + @override StreamConnectionErrorTestParams copyWith({ int? statusCode, String? statusMessage, @@ -2600,28 +4685,74 @@ class StreamConnectionErrorTestParams { statusMessage: statusMessage ?? this.statusMessage, ); } + + @override + List get props => [ + statusCode, + statusMessage, + ]; + + @override + bool operator ==(Object other) { + return other is StreamConnectionErrorTestParams && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "StreamConnectionErrorTestParams ${toJsonString()}"; + } } -class StreamConnectionErrorTestResponse { +class StreamConnectionErrorTestResponse implements ArriModel { final String message; const StreamConnectionErrorTestResponse({ required this.message, }); + + factory StreamConnectionErrorTestResponse.empty() { + return StreamConnectionErrorTestResponse( + message: "", + ); + } + factory StreamConnectionErrorTestResponse.fromJson( - Map json) { + Map _input_) { + final message = typeFromDynamic(_input_["message"], ""); return StreamConnectionErrorTestResponse( - message: typeFromDynamic(json["message"], ""), + message: message, ); } + factory StreamConnectionErrorTestResponse.fromJsonString(String input) { + return StreamConnectionErrorTestResponse.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "message": message, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("message=$message"); + return _queryParts_.join("&"); + } + + @override StreamConnectionErrorTestResponse copyWith({ String? message, }) { @@ -2629,115 +4760,263 @@ class StreamConnectionErrorTestResponse { message: message ?? this.message, ); } + + @override + List get props => [ + message, + ]; + + @override + bool operator ==(Object other) { + return other is StreamConnectionErrorTestResponse && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "StreamConnectionErrorTestResponse ${toJsonString()}"; + } } -class StreamLargeObjectsResponse { +class StreamLargeObjectsResponse implements ArriModel { final List numbers; - final List objects; + final List objects; const StreamLargeObjectsResponse({ required this.numbers, required this.objects, }); - factory StreamLargeObjectsResponse.fromJson(Map json) { + + factory StreamLargeObjectsResponse.empty() { + return StreamLargeObjectsResponse( + numbers: [], + objects: [], + ); + } + + factory StreamLargeObjectsResponse.fromJson(Map _input_) { + final numbers = _input_["numbers"] is List + ? (_input_["numbers"] as List) + .map((_el_) => doubleFromDynamic(_el_, 0.0)) + .toList() + : []; + final objects = _input_["objects"] is List + ? (_input_["objects"] as List) + .map((_el_) => _el_ is Map + ? StreamLargeObjectsResponseObjectsElement.fromJson(_el_) + : StreamLargeObjectsResponseObjectsElement.empty()) + .toList() + : []; return StreamLargeObjectsResponse( - numbers: json["numbers"] is List - ? - // ignore: unnecessary_cast - (json["numbers"] as List) - .map((item) => doubleFromDynamic(item, 0)) - .toList() as List - : [], - objects: json["objects"] is List - ? - // ignore: unnecessary_cast - (json["objects"] as List) - .map((item) => - StreamLargeObjectsResponseObjectsItem.fromJson(item)) - .toList() as List - : [], + numbers: numbers, + objects: objects, ); } + factory StreamLargeObjectsResponse.fromJsonString(String input) { + return StreamLargeObjectsResponse.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { - "numbers": numbers.map((item) => item).toList(), - "objects": objects.map((item) => item.toJson()).toList(), + final _output_ = { + "numbers": numbers.map((_el_) => _el_).toList(), + "objects": objects.map((_el_) => _el_.toJson()).toList(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /StreamLargeObjectsResponse/numbers."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /StreamLargeObjectsResponse/objects."); + return _queryParts_.join("&"); } + @override StreamLargeObjectsResponse copyWith({ List? numbers, - List? objects, + List? objects, }) { return StreamLargeObjectsResponse( numbers: numbers ?? this.numbers, objects: objects ?? this.objects, ); } + + @override + List get props => [ + numbers, + objects, + ]; + + @override + bool operator ==(Object other) { + return other is StreamLargeObjectsResponse && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "StreamLargeObjectsResponse ${toJsonString()}"; + } } -class StreamLargeObjectsResponseObjectsItem { +class StreamLargeObjectsResponseObjectsElement implements ArriModel { final String id; final String name; final String email; - const StreamLargeObjectsResponseObjectsItem({ + const StreamLargeObjectsResponseObjectsElement({ required this.id, required this.name, required this.email, }); - factory StreamLargeObjectsResponseObjectsItem.fromJson( - Map json) { - return StreamLargeObjectsResponseObjectsItem( - id: typeFromDynamic(json["id"], ""), - name: typeFromDynamic(json["name"], ""), - email: typeFromDynamic(json["email"], ""), + + factory StreamLargeObjectsResponseObjectsElement.empty() { + return StreamLargeObjectsResponseObjectsElement( + id: "", + name: "", + email: "", + ); + } + + factory StreamLargeObjectsResponseObjectsElement.fromJson( + Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final name = typeFromDynamic(_input_["name"], ""); + final email = typeFromDynamic(_input_["email"], ""); + return StreamLargeObjectsResponseObjectsElement( + id: id, + name: name, + email: email, ); } + factory StreamLargeObjectsResponseObjectsElement.fromJsonString( + String input) { + return StreamLargeObjectsResponseObjectsElement.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, "name": name, "email": email, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("name=$name"); + _queryParts_.add("email=$email"); + return _queryParts_.join("&"); } - StreamLargeObjectsResponseObjectsItem copyWith({ + @override + StreamLargeObjectsResponseObjectsElement copyWith({ String? id, String? name, String? email, }) { - return StreamLargeObjectsResponseObjectsItem( + return StreamLargeObjectsResponseObjectsElement( id: id ?? this.id, name: name ?? this.name, email: email ?? this.email, ); } + + @override + List get props => [ + id, + name, + email, + ]; + + @override + bool operator ==(Object other) { + return other is StreamLargeObjectsResponseObjectsElement && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "StreamLargeObjectsResponseObjectsElement ${toJsonString()}"; + } } -class ChatMessageParams { +class ChatMessageParams implements ArriModel { final String channelId; const ChatMessageParams({ required this.channelId, }); - factory ChatMessageParams.fromJson(Map json) { + + factory ChatMessageParams.empty() { + return ChatMessageParams( + channelId: "", + ); + } + + factory ChatMessageParams.fromJson(Map _input_) { + final channelId = typeFromDynamic(_input_["channelId"], ""); return ChatMessageParams( - channelId: typeFromDynamic(json["channelId"], ""), + channelId: channelId, ); } + factory ChatMessageParams.fromJsonString(String input) { + return ChatMessageParams.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "channelId": channelId, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("channelId=$channelId"); + return _queryParts_.join("&"); } + @override ChatMessageParams copyWith({ String? channelId, }) { @@ -2745,37 +5024,54 @@ class ChatMessageParams { channelId: channelId ?? this.channelId, ); } + + @override + List get props => [ + channelId, + ]; + + @override + bool operator ==(Object other) { + return other is ChatMessageParams && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ChatMessageParams ${toJsonString()}"; + } } -sealed class ChatMessage { - final String messageType; - const ChatMessage({ - required this.messageType, - }); - factory ChatMessage.fromJson(Map json) { - if (json["messageType"] is! String) { - throw Exception( - "Unable to decode ChatMessage. Expected String from \"messageType\". Received ${json["messageType"]}}", - ); - } - switch (json["messageType"]) { +sealed class ChatMessage implements ArriModel { + String get messageType; + const ChatMessage(); + + factory ChatMessage.empty() { + return ChatMessageText.empty(); + } + + factory ChatMessage.fromJson(Map _input_) { + final messageType = typeFromDynamic(_input_["messageType"], ""); + switch (messageType) { case "TEXT": - return ChatMessageText.fromJson(json); + return ChatMessageText.fromJson(_input_); case "IMAGE": - return ChatMessageImage.fromJson(json); + return ChatMessageImage.fromJson(_input_); case "URL": - return ChatMessageUrl.fromJson(json); + return ChatMessageUrl.fromJson(_input_); + default: + return ChatMessage.empty(); } - throw Exception( - "Unable to decode ChatMessage. \"${json["messageType"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory ChatMessage.fromJsonString(String input) { + return ChatMessage.fromJson(json.decode(input)); + } } class ChatMessageText implements ChatMessage { - @override - final String messageType = "TEXT"; final String id; final String channelId; final String userId; @@ -2788,21 +5084,42 @@ class ChatMessageText implements ChatMessage { required this.date, required this.text, }); - factory ChatMessageText.fromJson(Map json) { + + @override + String get messageType => "TEXT"; + + factory ChatMessageText.empty() { return ChatMessageText( - id: typeFromDynamic(json["id"], ""), - channelId: typeFromDynamic(json["channelId"], ""), - userId: typeFromDynamic(json["userId"], ""), - date: dateTimeFromDynamic( - json["date"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - text: typeFromDynamic(json["text"], ""), + id: "", + channelId: "", + userId: "", + date: DateTime.now(), + text: "", + ); + } + + factory ChatMessageText.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final channelId = typeFromDynamic(_input_["channelId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + final date = dateTimeFromDynamic(_input_["date"], DateTime.now()); + final text = typeFromDynamic(_input_["text"], ""); + return ChatMessageText( + id: id, + channelId: channelId, + userId: userId, + date: date, + text: text, ); } + + factory ChatMessageText.fromJsonString(String input) { + return ChatMessageText.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "messageType": messageType, "id": id, "channelId": channelId, @@ -2811,9 +5128,27 @@ class ChatMessageText implements ChatMessage { "text": text, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("messageType=$messageType"); + _queryParts_.add("id=$id"); + _queryParts_.add("channelId=$channelId"); + _queryParts_.add("userId=$userId"); + _queryParts_.add("date=${date.toUtc().toIso8601String()}"); + _queryParts_.add("text=$text"); + return _queryParts_.join("&"); } + @override ChatMessageText copyWith({ String? id, String? channelId, @@ -2829,11 +5164,31 @@ class ChatMessageText implements ChatMessage { text: text ?? this.text, ); } + + @override + List get props => [ + id, + channelId, + userId, + date, + text, + ]; + + @override + bool operator ==(Object other) { + return other is ChatMessageText && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ChatMessageText ${toJsonString()}"; + } } class ChatMessageImage implements ChatMessage { - @override - final String messageType = "IMAGE"; final String id; final String channelId; final String userId; @@ -2846,21 +5201,42 @@ class ChatMessageImage implements ChatMessage { required this.date, required this.image, }); - factory ChatMessageImage.fromJson(Map json) { + + @override + String get messageType => "IMAGE"; + + factory ChatMessageImage.empty() { return ChatMessageImage( - id: typeFromDynamic(json["id"], ""), - channelId: typeFromDynamic(json["channelId"], ""), - userId: typeFromDynamic(json["userId"], ""), - date: dateTimeFromDynamic( - json["date"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - image: typeFromDynamic(json["image"], ""), + id: "", + channelId: "", + userId: "", + date: DateTime.now(), + image: "", + ); + } + + factory ChatMessageImage.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final channelId = typeFromDynamic(_input_["channelId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + final date = dateTimeFromDynamic(_input_["date"], DateTime.now()); + final image = typeFromDynamic(_input_["image"], ""); + return ChatMessageImage( + id: id, + channelId: channelId, + userId: userId, + date: date, + image: image, ); } + + factory ChatMessageImage.fromJsonString(String input) { + return ChatMessageImage.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "messageType": messageType, "id": id, "channelId": channelId, @@ -2869,9 +5245,27 @@ class ChatMessageImage implements ChatMessage { "image": image, }; - return __result; + return _output_; } + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("messageType=$messageType"); + _queryParts_.add("id=$id"); + _queryParts_.add("channelId=$channelId"); + _queryParts_.add("userId=$userId"); + _queryParts_.add("date=${date.toUtc().toIso8601String()}"); + _queryParts_.add("image=$image"); + return _queryParts_.join("&"); + } + + @override ChatMessageImage copyWith({ String? id, String? channelId, @@ -2887,11 +5281,31 @@ class ChatMessageImage implements ChatMessage { image: image ?? this.image, ); } + + @override + List get props => [ + id, + channelId, + userId, + date, + image, + ]; + + @override + bool operator ==(Object other) { + return other is ChatMessageImage && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ChatMessageImage ${toJsonString()}"; + } } class ChatMessageUrl implements ChatMessage { - @override - final String messageType = "URL"; final String id; final String channelId; final String userId; @@ -2904,21 +5318,42 @@ class ChatMessageUrl implements ChatMessage { required this.date, required this.url, }); - factory ChatMessageUrl.fromJson(Map json) { + + @override + String get messageType => "URL"; + + factory ChatMessageUrl.empty() { return ChatMessageUrl( - id: typeFromDynamic(json["id"], ""), - channelId: typeFromDynamic(json["channelId"], ""), - userId: typeFromDynamic(json["userId"], ""), - date: dateTimeFromDynamic( - json["date"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - url: typeFromDynamic(json["url"], ""), + id: "", + channelId: "", + userId: "", + date: DateTime.now(), + url: "", + ); + } + + factory ChatMessageUrl.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final channelId = typeFromDynamic(_input_["channelId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + final date = dateTimeFromDynamic(_input_["date"], DateTime.now()); + final url = typeFromDynamic(_input_["url"], ""); + return ChatMessageUrl( + id: id, + channelId: channelId, + userId: userId, + date: date, + url: url, ); } + + factory ChatMessageUrl.fromJsonString(String input) { + return ChatMessageUrl.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "messageType": messageType, "id": id, "channelId": channelId, @@ -2927,9 +5362,27 @@ class ChatMessageUrl implements ChatMessage { "url": url, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("messageType=$messageType"); + _queryParts_.add("id=$id"); + _queryParts_.add("channelId=$channelId"); + _queryParts_.add("userId=$userId"); + _queryParts_.add("date=${date.toUtc().toIso8601String()}"); + _queryParts_.add("url=$url"); + return _queryParts_.join("&"); } + @override ChatMessageUrl copyWith({ String? id, String? channelId, @@ -2945,28 +5398,78 @@ class ChatMessageUrl implements ChatMessage { url: url ?? this.url, ); } + + @override + List get props => [ + id, + channelId, + userId, + date, + url, + ]; + + @override + bool operator ==(Object other) { + return other is ChatMessageUrl && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "ChatMessageUrl ${toJsonString()}"; + } } -class TestsStreamRetryWithNewCredentialsResponse { +class TestsStreamRetryWithNewCredentialsResponse implements ArriModel { final String message; const TestsStreamRetryWithNewCredentialsResponse({ required this.message, }); + + factory TestsStreamRetryWithNewCredentialsResponse.empty() { + return TestsStreamRetryWithNewCredentialsResponse( + message: "", + ); + } + factory TestsStreamRetryWithNewCredentialsResponse.fromJson( - Map json) { + Map _input_) { + final message = typeFromDynamic(_input_["message"], ""); return TestsStreamRetryWithNewCredentialsResponse( - message: typeFromDynamic(json["message"], ""), + message: message, ); } + factory TestsStreamRetryWithNewCredentialsResponse.fromJsonString( + String input) { + return TestsStreamRetryWithNewCredentialsResponse.fromJson( + json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "message": message, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("message=$message"); + return _queryParts_.join("&"); } + @override TestsStreamRetryWithNewCredentialsResponse copyWith({ String? message, }) { @@ -2974,37 +5477,55 @@ class TestsStreamRetryWithNewCredentialsResponse { message: message ?? this.message, ); } + + @override + List get props => [ + message, + ]; + + @override + bool operator ==(Object other) { + return other is TestsStreamRetryWithNewCredentialsResponse && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "TestsStreamRetryWithNewCredentialsResponse ${toJsonString()}"; + } } -sealed class WsMessageParams { - final String type; - const WsMessageParams({ - required this.type, - }); - factory WsMessageParams.fromJson(Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode WsMessageParams. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { +sealed class WsMessageParams implements ArriModel { + String get type; + const WsMessageParams(); + + factory WsMessageParams.empty() { + return WsMessageParamsCreateEntity.empty(); + } + + factory WsMessageParams.fromJson(Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "CREATE_ENTITY": - return WsMessageParamsCreateEntity.fromJson(json); + return WsMessageParamsCreateEntity.fromJson(_input_); case "UPDATE_ENTITY": - return WsMessageParamsUpdateEntity.fromJson(json); + return WsMessageParamsUpdateEntity.fromJson(_input_); case "DISCONNECT": - return WsMessageParamsDisconnect.fromJson(json); + return WsMessageParamsDisconnect.fromJson(_input_); + default: + return WsMessageParams.empty(); } - throw Exception( - "Unable to decode WsMessageParams. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory WsMessageParams.fromJsonString(String input) { + return WsMessageParams.fromJson(json.decode(input)); + } } class WsMessageParamsCreateEntity implements WsMessageParams { - @override - final String type = "CREATE_ENTITY"; final String entityId; final double x; final double y; @@ -3013,25 +5534,61 @@ class WsMessageParamsCreateEntity implements WsMessageParams { required this.x, required this.y, }); - factory WsMessageParamsCreateEntity.fromJson(Map json) { + + @override + String get type => "CREATE_ENTITY"; + + factory WsMessageParamsCreateEntity.empty() { + return WsMessageParamsCreateEntity( + entityId: "", + x: 0.0, + y: 0.0, + ); + } + + factory WsMessageParamsCreateEntity.fromJson(Map _input_) { + final entityId = typeFromDynamic(_input_["entityId"], ""); + final x = doubleFromDynamic(_input_["x"], 0.0); + final y = doubleFromDynamic(_input_["y"], 0.0); return WsMessageParamsCreateEntity( - entityId: typeFromDynamic(json["entityId"], ""), - x: doubleFromDynamic(json["x"], 0), - y: doubleFromDynamic(json["y"], 0), + entityId: entityId, + x: x, + y: y, ); } + + factory WsMessageParamsCreateEntity.fromJsonString(String input) { + return WsMessageParamsCreateEntity.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "entityId": entityId, "x": x, "y": y, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("entityId=$entityId"); + _queryParts_.add("x=$x"); + _queryParts_.add("y=$y"); + return _queryParts_.join("&"); } + @override WsMessageParamsCreateEntity copyWith({ String? entityId, double? x, @@ -3043,11 +5600,30 @@ class WsMessageParamsCreateEntity implements WsMessageParams { y: y ?? this.y, ); } + + @override + List get props => [ + entityId, + x, + y, + ]; + + @override + bool operator ==(Object other) { + return other is WsMessageParamsCreateEntity && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "WsMessageParamsCreateEntity ${toJsonString()}"; + } } class WsMessageParamsUpdateEntity implements WsMessageParams { - @override - final String type = "UPDATE_ENTITY"; final String entityId; final double x; final double y; @@ -3056,25 +5632,61 @@ class WsMessageParamsUpdateEntity implements WsMessageParams { required this.x, required this.y, }); - factory WsMessageParamsUpdateEntity.fromJson(Map json) { + + @override + String get type => "UPDATE_ENTITY"; + + factory WsMessageParamsUpdateEntity.empty() { return WsMessageParamsUpdateEntity( - entityId: typeFromDynamic(json["entityId"], ""), - x: doubleFromDynamic(json["x"], 0), - y: doubleFromDynamic(json["y"], 0), + entityId: "", + x: 0.0, + y: 0.0, ); } + + factory WsMessageParamsUpdateEntity.fromJson(Map _input_) { + final entityId = typeFromDynamic(_input_["entityId"], ""); + final x = doubleFromDynamic(_input_["x"], 0.0); + final y = doubleFromDynamic(_input_["y"], 0.0); + return WsMessageParamsUpdateEntity( + entityId: entityId, + x: x, + y: y, + ); + } + + factory WsMessageParamsUpdateEntity.fromJsonString(String input) { + return WsMessageParamsUpdateEntity.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "entityId": entityId, "x": x, "y": y, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("entityId=$entityId"); + _queryParts_.add("x=$x"); + _queryParts_.add("y=$y"); + return _queryParts_.join("&"); } + @override WsMessageParamsUpdateEntity copyWith({ String? entityId, double? x, @@ -3086,30 +5698,79 @@ class WsMessageParamsUpdateEntity implements WsMessageParams { y: y ?? this.y, ); } + + @override + List get props => [ + entityId, + x, + y, + ]; + + @override + bool operator ==(Object other) { + return other is WsMessageParamsUpdateEntity && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "WsMessageParamsUpdateEntity ${toJsonString()}"; + } } class WsMessageParamsDisconnect implements WsMessageParams { - @override - final String type = "DISCONNECT"; final String reason; const WsMessageParamsDisconnect({ required this.reason, }); - factory WsMessageParamsDisconnect.fromJson(Map json) { + + @override + String get type => "DISCONNECT"; + + factory WsMessageParamsDisconnect.empty() { + return WsMessageParamsDisconnect( + reason: "", + ); + } + + factory WsMessageParamsDisconnect.fromJson(Map _input_) { + final reason = typeFromDynamic(_input_["reason"], ""); return WsMessageParamsDisconnect( - reason: typeFromDynamic(json["reason"], ""), + reason: reason, ); } + + factory WsMessageParamsDisconnect.fromJsonString(String input) { + return WsMessageParamsDisconnect.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "reason": reason, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("reason=$reason"); + return _queryParts_.join("&"); } + @override WsMessageParamsDisconnect copyWith({ String? reason, }) { @@ -3117,35 +5778,53 @@ class WsMessageParamsDisconnect implements WsMessageParams { reason: reason ?? this.reason, ); } -} -sealed class WsMessageResponse { - final String type; - const WsMessageResponse({ - required this.type, - }); - factory WsMessageResponse.fromJson(Map json) { - if (json["type"] is! String) { - throw Exception( - "Unable to decode WsMessageResponse. Expected String from \"type\". Received ${json["type"]}}", - ); - } - switch (json["type"]) { + @override + List get props => [ + reason, + ]; + + @override + bool operator ==(Object other) { + return other is WsMessageParamsDisconnect && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "WsMessageParamsDisconnect ${toJsonString()}"; + } +} + +sealed class WsMessageResponse implements ArriModel { + String get type; + const WsMessageResponse(); + + factory WsMessageResponse.empty() { + return WsMessageResponseEntityCreated.empty(); + } + + factory WsMessageResponse.fromJson(Map _input_) { + final type = typeFromDynamic(_input_["type"], ""); + switch (type) { case "ENTITY_CREATED": - return WsMessageResponseEntityCreated.fromJson(json); + return WsMessageResponseEntityCreated.fromJson(_input_); case "ENTITY_UPDATED": - return WsMessageResponseEntityUpdated.fromJson(json); + return WsMessageResponseEntityUpdated.fromJson(_input_); + default: + return WsMessageResponse.empty(); } - throw Exception( - "Unable to decode WsMessageResponse. \"${json["type"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory WsMessageResponse.fromJsonString(String input) { + return WsMessageResponse.fromJson(json.decode(input)); + } } class WsMessageResponseEntityCreated implements WsMessageResponse { - @override - final String type = "ENTITY_CREATED"; final String entityId; final double x; final double y; @@ -3154,25 +5833,62 @@ class WsMessageResponseEntityCreated implements WsMessageResponse { required this.x, required this.y, }); - factory WsMessageResponseEntityCreated.fromJson(Map json) { + + @override + String get type => "ENTITY_CREATED"; + + factory WsMessageResponseEntityCreated.empty() { + return WsMessageResponseEntityCreated( + entityId: "", + x: 0.0, + y: 0.0, + ); + } + + factory WsMessageResponseEntityCreated.fromJson( + Map _input_) { + final entityId = typeFromDynamic(_input_["entityId"], ""); + final x = doubleFromDynamic(_input_["x"], 0.0); + final y = doubleFromDynamic(_input_["y"], 0.0); return WsMessageResponseEntityCreated( - entityId: typeFromDynamic(json["entityId"], ""), - x: doubleFromDynamic(json["x"], 0), - y: doubleFromDynamic(json["y"], 0), + entityId: entityId, + x: x, + y: y, ); } + + factory WsMessageResponseEntityCreated.fromJsonString(String input) { + return WsMessageResponseEntityCreated.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "entityId": entityId, "x": x, "y": y, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("entityId=$entityId"); + _queryParts_.add("x=$x"); + _queryParts_.add("y=$y"); + return _queryParts_.join("&"); } + @override WsMessageResponseEntityCreated copyWith({ String? entityId, double? x, @@ -3184,11 +5900,30 @@ class WsMessageResponseEntityCreated implements WsMessageResponse { y: y ?? this.y, ); } + + @override + List get props => [ + entityId, + x, + y, + ]; + + @override + bool operator ==(Object other) { + return other is WsMessageResponseEntityCreated && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "WsMessageResponseEntityCreated ${toJsonString()}"; + } } class WsMessageResponseEntityUpdated implements WsMessageResponse { - @override - final String type = "ENTITY_UPDATED"; final String entityId; final double x; final double y; @@ -3197,25 +5932,62 @@ class WsMessageResponseEntityUpdated implements WsMessageResponse { required this.x, required this.y, }); - factory WsMessageResponseEntityUpdated.fromJson(Map json) { + + @override + String get type => "ENTITY_UPDATED"; + + factory WsMessageResponseEntityUpdated.empty() { + return WsMessageResponseEntityUpdated( + entityId: "", + x: 0.0, + y: 0.0, + ); + } + + factory WsMessageResponseEntityUpdated.fromJson( + Map _input_) { + final entityId = typeFromDynamic(_input_["entityId"], ""); + final x = doubleFromDynamic(_input_["x"], 0.0); + final y = doubleFromDynamic(_input_["y"], 0.0); return WsMessageResponseEntityUpdated( - entityId: typeFromDynamic(json["entityId"], ""), - x: doubleFromDynamic(json["x"], 0), - y: doubleFromDynamic(json["y"], 0), + entityId: entityId, + x: x, + y: y, ); } + + factory WsMessageResponseEntityUpdated.fromJsonString(String input) { + return WsMessageResponseEntityUpdated.fromJson(json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "type": type, "entityId": entityId, "x": x, "y": y, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("type=$type"); + _queryParts_.add("entityId=$entityId"); + _queryParts_.add("x=$x"); + _queryParts_.add("y=$y"); + return _queryParts_.join("&"); } + @override WsMessageResponseEntityUpdated copyWith({ String? entityId, double? x, @@ -3227,27 +5999,74 @@ class WsMessageResponseEntityUpdated implements WsMessageResponse { y: y ?? this.y, ); } + + @override + List get props => [ + entityId, + x, + y, + ]; + + @override + bool operator ==(Object other) { + return other is WsMessageResponseEntityUpdated && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "WsMessageResponseEntityUpdated ${toJsonString()}"; + } } -class UsersWatchUserParams { +class UsersWatchUserParams implements ArriModel { final String userId; const UsersWatchUserParams({ required this.userId, }); - factory UsersWatchUserParams.fromJson(Map json) { + + factory UsersWatchUserParams.empty() { return UsersWatchUserParams( - userId: typeFromDynamic(json["userId"], ""), + userId: "", ); } + factory UsersWatchUserParams.fromJson(Map _input_) { + final userId = typeFromDynamic(_input_["userId"], ""); + return UsersWatchUserParams( + userId: userId, + ); + } + + factory UsersWatchUserParams.fromJsonString(String input) { + return UsersWatchUserParams.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "userId": userId, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("userId=$userId"); + return _queryParts_.join("&"); } + @override UsersWatchUserParams copyWith({ String? userId, }) { @@ -3255,19 +6074,36 @@ class UsersWatchUserParams { userId: userId ?? this.userId, ); } + + @override + List get props => [ + userId, + ]; + + @override + bool operator ==(Object other) { + return other is UsersWatchUserParams && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UsersWatchUserParams ${toJsonString()}"; + } } -class UsersWatchUserResponse { +class UsersWatchUserResponse implements ArriModel { final String id; final UsersWatchUserResponseRole role; - - /// A profile picture final UserPhoto? photo; final DateTime createdAt; final int numFollowers; final UserSettings settings; - final List recentNotifications; - final Map bookmarks; + final List + recentNotifications; + final Map bookmarks; final Map metadata; final List randomList; final String? bio; @@ -3284,83 +6120,158 @@ class UsersWatchUserResponse { required this.randomList, this.bio, }); - factory UsersWatchUserResponse.fromJson(Map json) { + + factory UsersWatchUserResponse.empty() { return UsersWatchUserResponse( - id: typeFromDynamic(json["id"], ""), - role: UsersWatchUserResponseRole.fromJson(json["role"]), - photo: json["photo"] is Map - ? UserPhoto.fromJson(json["photo"]) - : null, - createdAt: dateTimeFromDynamic( - json["createdAt"], - DateTime.fromMillisecondsSinceEpoch(0), - ), - numFollowers: intFromDynamic(json["numFollowers"], 0), - settings: UserSettings.fromJson(json["settings"]), - recentNotifications: json["recentNotifications"] is List - ? - // ignore: unnecessary_cast - (json["recentNotifications"] as List) - .map((item) => - UsersWatchUserResponseRecentNotificationsItem.fromJson(item)) - .toList() as List - : [], - bookmarks: json["bookmarks"] is Map - ? (json["bookmarks"] as Map).map((key, value) => - MapEntry( - key, UsersWatchUserResponseBookmarksValue.fromJson(value))) - : {}, - metadata: json["metadata"] is Map - ? (json["metadata"] as Map) - .map((key, value) => MapEntry(key, value)) - : {}, - randomList: json["randomList"] is List - ? - // ignore: unnecessary_cast - (json["randomList"] as List).map((item) => item).toList() - as List - : [], - bio: nullableTypeFromDynamic(json["bio"]), + id: "", + role: UsersWatchUserResponseRole.standard, + photo: null, + createdAt: DateTime.now(), + numFollowers: 0, + settings: UserSettings.empty(), + recentNotifications: [], + bookmarks: {}, + metadata: {}, + randomList: [], + ); + } + + factory UsersWatchUserResponse.fromJson(Map _input_) { + final id = typeFromDynamic(_input_["id"], ""); + final role = UsersWatchUserResponseRole.fromString( + typeFromDynamic(_input_["role"], "")); + final photo = _input_["photo"] is Map + ? UserPhoto.fromJson(_input_["photo"]) + : null; + final createdAt = dateTimeFromDynamic(_input_["createdAt"], DateTime.now()); + final numFollowers = intFromDynamic(_input_["numFollowers"], 0); + final settings = _input_["settings"] is Map + ? UserSettings.fromJson(_input_["settings"]) + : UserSettings.empty(); + final recentNotifications = _input_["recentNotifications"] is List + ? (_input_["recentNotifications"] as List) + .map((_el_) => _el_ is Map + ? UsersWatchUserResponseRecentNotificationsElement.fromJson( + _el_) + : UsersWatchUserResponseRecentNotificationsElement.empty()) + .toList() + : []; + final bookmarks = _input_["bookmarks"] is Map + ? (_input_["bookmarks"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + _val_ is Map + ? UsersWatchUserResponseBookmarksentry.fromJson(_val_) + : UsersWatchUserResponseBookmarksentry.empty(), + ), + ) + : {}; + final metadata = _input_["metadata"] is Map + ? (_input_["metadata"] as Map).map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ) + : {}; + final randomList = _input_["randomList"] is List + ? (_input_["randomList"] as List).map((_el_) => _el_).toList() + : []; + final bio = nullableTypeFromDynamic(_input_["bio"]); + return UsersWatchUserResponse( + id: id, + role: role, + photo: photo, + createdAt: createdAt, + numFollowers: numFollowers, + settings: settings, + recentNotifications: recentNotifications, + bookmarks: bookmarks, + metadata: metadata, + randomList: randomList, + bio: bio, ); } + factory UsersWatchUserResponse.fromJsonString(String input) { + return UsersWatchUserResponse.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "id": id, - "role": role.value, + "role": role.serialValue, "photo": photo?.toJson(), "createdAt": createdAt.toUtc().toIso8601String(), "numFollowers": numFollowers, "settings": settings.toJson(), "recentNotifications": - recentNotifications.map((item) => item.toJson()).toList(), - "bookmarks": bookmarks.map((key, value) => MapEntry(key, value.toJson())), - "metadata": metadata.map((key, value) => MapEntry(key, value)), - "randomList": randomList.map((item) => item).toList(), + recentNotifications.map((_el_) => _el_.toJson()).toList(), + "bookmarks": bookmarks.map( + (_key_, _val_) => MapEntry( + _key_, + _val_.toJson(), + ), + ), + "metadata": metadata.map( + (_key_, _val_) => MapEntry( + _key_, + _val_, + ), + ), + "randomList": randomList.map((_el_) => _el_).toList(), }; - if (bio != null) { - __result["bio"] = bio; - } - return __result; + if (bio != null) _output_["bio"] = bio; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("id=$id"); + _queryParts_.add("role=${role.serialValue}"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/photo."); + _queryParts_.add("createdAt=${createdAt.toUtc().toIso8601String()}"); + _queryParts_.add("numFollowers=$numFollowers"); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/settings."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/recentNotifications."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/bookmarks."); + print( + "[WARNING] nested objects cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/metadata."); + print( + "[WARNING] arrays cannot be serialized to query params. Skipping field at /UsersWatchUserResponse/randomList."); + if (bio != null) _queryParts_.add("bio=$bio"); + return _queryParts_.join("&"); } + @override UsersWatchUserResponse copyWith({ String? id, UsersWatchUserResponseRole? role, - ArriBox? photo, + UserPhoto? Function()? photo, DateTime? createdAt, int? numFollowers, UserSettings? settings, - List? recentNotifications, - Map? bookmarks, + List? recentNotifications, + Map? bookmarks, Map? metadata, List? randomList, - ArriBox? bio, + String? Function()? bio, }) { return UsersWatchUserResponse( id: id ?? this.id, role: role ?? this.role, - photo: photo != null ? photo.value : this.photo, + photo: photo != null ? photo() : this.photo, createdAt: createdAt ?? this.createdAt, numFollowers: numFollowers ?? this.numFollowers, settings: settings ?? this.settings, @@ -3368,9 +6279,37 @@ class UsersWatchUserResponse { bookmarks: bookmarks ?? this.bookmarks, metadata: metadata ?? this.metadata, randomList: randomList ?? this.randomList, - bio: bio != null ? bio.value : this.bio, + bio: bio != null ? bio() : this.bio, ); } + + @override + List get props => [ + id, + role, + photo, + createdAt, + numFollowers, + settings, + recentNotifications, + bookmarks, + metadata, + randomList, + bio, + ]; + + @override + bool operator ==(Object other) { + return other is UsersWatchUserResponse && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UsersWatchUserResponse ${toJsonString()}"; + } } enum UsersWatchUserResponseRole @@ -3378,30 +6317,27 @@ enum UsersWatchUserResponseRole standard("standard"), admin("admin"); - const UsersWatchUserResponseRole(this.value); - final String value; + const UsersWatchUserResponseRole(this.serialValue); + final String serialValue; - factory UsersWatchUserResponseRole.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory UsersWatchUserResponseRole.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return standard; } @override - compareTo(UsersWatchUserResponseRole other) => name.compareTo(other.name); + int compareTo(UsersWatchUserResponseRole other) => name.compareTo(other.name); } -/// A profile picture -class UserPhoto { +class UserPhoto implements ArriModel { final String url; final double width; final double height; final BigInt bytes; - - /// When the photo was last updated in nanoseconds final BigInt nanoseconds; const UserPhoto({ required this.url, @@ -3410,18 +6346,39 @@ class UserPhoto { required this.bytes, required this.nanoseconds, }); - factory UserPhoto.fromJson(Map json) { + + factory UserPhoto.empty() { + return UserPhoto( + url: "", + width: 0.0, + height: 0.0, + bytes: BigInt.zero, + nanoseconds: BigInt.zero, + ); + } + + factory UserPhoto.fromJson(Map _input_) { + final url = typeFromDynamic(_input_["url"], ""); + final width = doubleFromDynamic(_input_["width"], 0.0); + final height = doubleFromDynamic(_input_["height"], 0.0); + final bytes = bigIntFromDynamic(_input_["bytes"], BigInt.zero); + final nanoseconds = bigIntFromDynamic(_input_["nanoseconds"], BigInt.zero); return UserPhoto( - url: typeFromDynamic(json["url"], ""), - width: doubleFromDynamic(json["width"], 0), - height: doubleFromDynamic(json["height"], 0), - bytes: bigIntFromDynamic(json["bytes"], BigInt.zero), - nanoseconds: bigIntFromDynamic(json["nanoseconds"], BigInt.zero), + url: url, + width: width, + height: height, + bytes: bytes, + nanoseconds: nanoseconds, ); } + factory UserPhoto.fromJsonString(String input) { + return UserPhoto.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "url": url, "width": width, "height": height, @@ -3429,9 +6386,26 @@ class UserPhoto { "nanoseconds": nanoseconds.toString(), }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("url=$url"); + _queryParts_.add("width=$width"); + _queryParts_.add("height=$height"); + _queryParts_.add("bytes=$bytes"); + _queryParts_.add("nanoseconds=$nanoseconds"); + return _queryParts_.join("&"); } + @override UserPhoto copyWith({ String? url, double? width, @@ -3447,209 +6421,443 @@ class UserPhoto { nanoseconds: nanoseconds ?? this.nanoseconds, ); } + + @override + List get props => [ + url, + width, + height, + bytes, + nanoseconds, + ]; + + @override + bool operator ==(Object other) { + return other is UserPhoto && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UserPhoto ${toJsonString()}"; + } } -class UserSettings { +class UserSettings implements ArriModel { final bool notificationsEnabled; - final UsersWatchUserResponseSettingsPreferredTheme preferredTheme; + final UserSettingsPreferredTheme preferredTheme; const UserSettings({ required this.notificationsEnabled, required this.preferredTheme, }); - factory UserSettings.fromJson(Map json) { + + factory UserSettings.empty() { + return UserSettings( + notificationsEnabled: false, + preferredTheme: UserSettingsPreferredTheme.darkMode, + ); + } + + factory UserSettings.fromJson(Map _input_) { + final notificationsEnabled = + typeFromDynamic(_input_["notificationsEnabled"], false); + final preferredTheme = UserSettingsPreferredTheme.fromString( + typeFromDynamic(_input_["preferredTheme"], "")); return UserSettings( - notificationsEnabled: - typeFromDynamic(json["notificationsEnabled"], false), - preferredTheme: UsersWatchUserResponseSettingsPreferredTheme.fromJson( - json["preferredTheme"]), + notificationsEnabled: notificationsEnabled, + preferredTheme: preferredTheme, ); } + factory UserSettings.fromJsonString(String input) { + return UserSettings.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "notificationsEnabled": notificationsEnabled, - "preferredTheme": preferredTheme.value, + "preferredTheme": preferredTheme.serialValue, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("notificationsEnabled=$notificationsEnabled"); + _queryParts_.add("preferredTheme=${preferredTheme.serialValue}"); + return _queryParts_.join("&"); } + @override UserSettings copyWith({ bool? notificationsEnabled, - UsersWatchUserResponseSettingsPreferredTheme? preferredTheme, + UserSettingsPreferredTheme? preferredTheme, }) { return UserSettings( notificationsEnabled: notificationsEnabled ?? this.notificationsEnabled, preferredTheme: preferredTheme ?? this.preferredTheme, ); } + + @override + List get props => [ + notificationsEnabled, + preferredTheme, + ]; + + @override + bool operator ==(Object other) { + return other is UserSettings && listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UserSettings ${toJsonString()}"; + } } -enum UsersWatchUserResponseSettingsPreferredTheme - implements Comparable { +enum UserSettingsPreferredTheme + implements Comparable { darkMode("dark-mode"), lightMode("light-mode"), system("system"); - const UsersWatchUserResponseSettingsPreferredTheme(this.value); - final String value; + const UserSettingsPreferredTheme(this.serialValue); + final String serialValue; - factory UsersWatchUserResponseSettingsPreferredTheme.fromJson(dynamic json) { - for (final v in values) { - if (v.value == json) { - return v; + factory UserSettingsPreferredTheme.fromString(String input) { + for (final val in values) { + if (val.serialValue == input) { + return val; } } return darkMode; } @override - compareTo(UsersWatchUserResponseSettingsPreferredTheme other) => - name.compareTo(other.name); + int compareTo(UserSettingsPreferredTheme other) => name.compareTo(other.name); } -sealed class UsersWatchUserResponseRecentNotificationsItem { - final String notificationType; - const UsersWatchUserResponseRecentNotificationsItem({ - required this.notificationType, - }); - factory UsersWatchUserResponseRecentNotificationsItem.fromJson( - Map json) { - if (json["notificationType"] is! String) { - throw Exception( - "Unable to decode UsersWatchUserResponseRecentNotificationsItem. Expected String from \"notificationType\". Received ${json["notificationType"]}}", - ); - } - switch (json["notificationType"]) { +sealed class UsersWatchUserResponseRecentNotificationsElement + implements ArriModel { + String get notificationType; + const UsersWatchUserResponseRecentNotificationsElement(); + + factory UsersWatchUserResponseRecentNotificationsElement.empty() { + return UsersWatchUserResponseRecentNotificationsElementPostLike.empty(); + } + + factory UsersWatchUserResponseRecentNotificationsElement.fromJson( + Map _input_) { + final notificationType = + typeFromDynamic(_input_["notificationType"], ""); + switch (notificationType) { case "POST_LIKE": - return UsersWatchUserResponseRecentNotificationsItemPostLike.fromJson( - json); + return UsersWatchUserResponseRecentNotificationsElementPostLike + .fromJson(_input_); case "POST_COMMENT": - return UsersWatchUserResponseRecentNotificationsItemPostComment - .fromJson(json); + return UsersWatchUserResponseRecentNotificationsElementPostComment + .fromJson(_input_); + default: + return UsersWatchUserResponseRecentNotificationsElement.empty(); } - throw Exception( - "Unable to decode UsersWatchUserResponseRecentNotificationsItem. \"${json["notificationType"]}\" doesn't match any of the accepted discriminator values.", - ); } - Map toJson(); + + factory UsersWatchUserResponseRecentNotificationsElement.fromJsonString( + String input) { + return UsersWatchUserResponseRecentNotificationsElement.fromJson( + json.decode(input)); + } } -class UsersWatchUserResponseRecentNotificationsItemPostLike - implements UsersWatchUserResponseRecentNotificationsItem { - @override - final String notificationType = "POST_LIKE"; +class UsersWatchUserResponseRecentNotificationsElementPostLike + implements UsersWatchUserResponseRecentNotificationsElement { final String postId; final String userId; - const UsersWatchUserResponseRecentNotificationsItemPostLike({ + const UsersWatchUserResponseRecentNotificationsElementPostLike({ required this.postId, required this.userId, }); - factory UsersWatchUserResponseRecentNotificationsItemPostLike.fromJson( - Map json) { - return UsersWatchUserResponseRecentNotificationsItemPostLike( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), + + @override + String get notificationType => "POST_LIKE"; + + factory UsersWatchUserResponseRecentNotificationsElementPostLike.empty() { + return UsersWatchUserResponseRecentNotificationsElementPostLike( + postId: "", + userId: "", + ); + } + + factory UsersWatchUserResponseRecentNotificationsElementPostLike.fromJson( + Map _input_) { + final postId = typeFromDynamic(_input_["postId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + return UsersWatchUserResponseRecentNotificationsElementPostLike( + postId: postId, + userId: userId, ); } + + factory UsersWatchUserResponseRecentNotificationsElementPostLike.fromJsonString( + String input) { + return UsersWatchUserResponseRecentNotificationsElementPostLike.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "notificationType": notificationType, "postId": postId, "userId": userId, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("notificationType=$notificationType"); + _queryParts_.add("postId=$postId"); + _queryParts_.add("userId=$userId"); + return _queryParts_.join("&"); } - UsersWatchUserResponseRecentNotificationsItemPostLike copyWith({ + @override + UsersWatchUserResponseRecentNotificationsElementPostLike copyWith({ String? postId, String? userId, }) { - return UsersWatchUserResponseRecentNotificationsItemPostLike( + return UsersWatchUserResponseRecentNotificationsElementPostLike( postId: postId ?? this.postId, userId: userId ?? this.userId, ); } -} -class UsersWatchUserResponseRecentNotificationsItemPostComment - implements UsersWatchUserResponseRecentNotificationsItem { @override - final String notificationType = "POST_COMMENT"; + List get props => [ + postId, + userId, + ]; + + @override + bool operator ==(Object other) { + return other is UsersWatchUserResponseRecentNotificationsElementPostLike && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UsersWatchUserResponseRecentNotificationsElementPostLike ${toJsonString()}"; + } +} + +class UsersWatchUserResponseRecentNotificationsElementPostComment + implements UsersWatchUserResponseRecentNotificationsElement { final String postId; final String userId; final String commentText; - const UsersWatchUserResponseRecentNotificationsItemPostComment({ + const UsersWatchUserResponseRecentNotificationsElementPostComment({ required this.postId, required this.userId, required this.commentText, }); - factory UsersWatchUserResponseRecentNotificationsItemPostComment.fromJson( - Map json) { - return UsersWatchUserResponseRecentNotificationsItemPostComment( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), - commentText: typeFromDynamic(json["commentText"], ""), + + @override + String get notificationType => "POST_COMMENT"; + + factory UsersWatchUserResponseRecentNotificationsElementPostComment.empty() { + return UsersWatchUserResponseRecentNotificationsElementPostComment( + postId: "", + userId: "", + commentText: "", + ); + } + + factory UsersWatchUserResponseRecentNotificationsElementPostComment.fromJson( + Map _input_) { + final postId = typeFromDynamic(_input_["postId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + final commentText = typeFromDynamic(_input_["commentText"], ""); + return UsersWatchUserResponseRecentNotificationsElementPostComment( + postId: postId, + userId: userId, + commentText: commentText, ); } + + factory UsersWatchUserResponseRecentNotificationsElementPostComment.fromJsonString( + String input) { + return UsersWatchUserResponseRecentNotificationsElementPostComment.fromJson( + json.decode(input)); + } + @override Map toJson() { - final __result = { + final _output_ = { "notificationType": notificationType, "postId": postId, "userId": userId, "commentText": commentText, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("notificationType=$notificationType"); + _queryParts_.add("postId=$postId"); + _queryParts_.add("userId=$userId"); + _queryParts_.add("commentText=$commentText"); + return _queryParts_.join("&"); } - UsersWatchUserResponseRecentNotificationsItemPostComment copyWith({ + @override + UsersWatchUserResponseRecentNotificationsElementPostComment copyWith({ String? postId, String? userId, String? commentText, }) { - return UsersWatchUserResponseRecentNotificationsItemPostComment( + return UsersWatchUserResponseRecentNotificationsElementPostComment( postId: postId ?? this.postId, userId: userId ?? this.userId, commentText: commentText ?? this.commentText, ); } + + @override + List get props => [ + postId, + userId, + commentText, + ]; + + @override + bool operator ==(Object other) { + return other + is UsersWatchUserResponseRecentNotificationsElementPostComment && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UsersWatchUserResponseRecentNotificationsElementPostComment ${toJsonString()}"; + } } -class UsersWatchUserResponseBookmarksValue { +class UsersWatchUserResponseBookmarksentry implements ArriModel { final String postId; final String userId; - const UsersWatchUserResponseBookmarksValue({ + const UsersWatchUserResponseBookmarksentry({ required this.postId, required this.userId, }); - factory UsersWatchUserResponseBookmarksValue.fromJson( - Map json) { - return UsersWatchUserResponseBookmarksValue( - postId: typeFromDynamic(json["postId"], ""), - userId: typeFromDynamic(json["userId"], ""), + + factory UsersWatchUserResponseBookmarksentry.empty() { + return UsersWatchUserResponseBookmarksentry( + postId: "", + userId: "", + ); + } + + factory UsersWatchUserResponseBookmarksentry.fromJson( + Map _input_) { + final postId = typeFromDynamic(_input_["postId"], ""); + final userId = typeFromDynamic(_input_["userId"], ""); + return UsersWatchUserResponseBookmarksentry( + postId: postId, + userId: userId, ); } + factory UsersWatchUserResponseBookmarksentry.fromJsonString(String input) { + return UsersWatchUserResponseBookmarksentry.fromJson(json.decode(input)); + } + + @override Map toJson() { - final __result = { + final _output_ = { "postId": postId, "userId": userId, }; - return __result; + return _output_; + } + + @override + String toJsonString() { + return json.encode(toJson()); + } + + @override + String toUrlQueryParams() { + final _queryParts_ = []; + _queryParts_.add("postId=$postId"); + _queryParts_.add("userId=$userId"); + return _queryParts_.join("&"); } - UsersWatchUserResponseBookmarksValue copyWith({ + @override + UsersWatchUserResponseBookmarksentry copyWith({ String? postId, String? userId, }) { - return UsersWatchUserResponseBookmarksValue( + return UsersWatchUserResponseBookmarksentry( postId: postId ?? this.postId, userId: userId ?? this.userId, ); } + + @override + List get props => [ + postId, + userId, + ]; + + @override + bool operator ==(Object other) { + return other is UsersWatchUserResponseBookmarksentry && + listsAreEqual(props, other.props); + } + + @override + int get hashCode => listToHashCode(props); + + @override + String toString() { + return "UsersWatchUserResponseBookmarksentry ${toJsonString()}"; + } } diff --git a/tests/clients/dart/project.json b/tests/clients/dart/project.json index a9aa1e23..a4aa36cf 100644 --- a/tests/clients/dart/project.json +++ b/tests/clients/dart/project.json @@ -19,7 +19,7 @@ "integration-test": { "executor": "nx:run-commands", "options": { - "command": "dart test --reporter=expanded", + "command": "dart test --reporter=expanded --chain-stack-traces", "cwd": "tests/clients/dart" } }, diff --git a/tests/clients/dart/pubspec.lock b/tests/clients/dart/pubspec.lock index 102eac8a..cba76064 100644 --- a/tests/clients/dart/pubspec.lock +++ b/tests/clients/dart/pubspec.lock @@ -31,7 +31,7 @@ packages: path: "../../../languages/dart/dart-client" relative: true source: path - version: "0.49.1" + version: "0.51.0" async: dependency: transitive description: diff --git a/tests/clients/dart/test/test_client_test.dart b/tests/clients/dart/test/test_client_test.dart index a5b8ab2e..6680fdeb 100644 --- a/tests/clients/dart/test/test_client_test.dart +++ b/tests/clients/dart/test/test_client_test.dart @@ -45,11 +45,12 @@ Future main() async { } }); + final targetDate = DateTime.parse("2001-01-01T16:36:00.000Z"); final input = ObjectWithEveryType( any: {"hello": "world", "goodbye": "world"}, boolean: true, string: "", - timestamp: DateTime.now(), + timestamp: targetDate, float32: 1, float64: 1, int8: 1, @@ -63,7 +64,10 @@ Future main() async { enumerator: ObjectWithEveryTypeEnumerator.a, array: [true, false], object: ObjectWithEveryTypeObject( - boolean: true, string: "", timestamp: DateTime.now()), + boolean: true, + string: "", + timestamp: targetDate, + ), record: { "A": true, "B": false, @@ -71,42 +75,30 @@ Future main() async { discriminator: ObjectWithEveryTypeDiscriminatorA(title: "Hello World"), nestedObject: ObjectWithEveryTypeNestedObject( id: "", - timestamp: DateTime.now(), + timestamp: targetDate, data: ObjectWithEveryTypeNestedObjectData( id: "", - timestamp: DateTime.now(), + timestamp: targetDate, data: ObjectWithEveryTypeNestedObjectDataData( id: "", - timestamp: DateTime.now(), + timestamp: targetDate, )), ), nestedArray: [ [ - ObjectWithEveryTypeNestedArrayItemItem( - id: "", timestamp: DateTime.now()) + ObjectWithEveryTypeNestedArrayElementElement( + id: "", + timestamp: targetDate, + ) ] ]); test("can send/receive objects with every field type", () async { final result = await client.tests.sendObject(input); - expect(result.any["hello"], equals(input.any["hello"])); - expect(result.array.length, equals(input.array.length)); - expect(result.array[0], equals(input.array[0])); - expect(result.boolean, equals(input.boolean)); - expect(result.discriminator.type, equals(input.discriminator.type)); - expect(result.enumerator.value, equals(input.enumerator.value)); - expect(result.float32, equals(input.float32)); - expect(result.float64, equals(input.float64)); - expect(result.int16, equals(input.int16)); - expect(result.int64, equals(input.int64)); - expect(result.object.boolean, equals(input.object.boolean)); - expect(result.record["A"], equals(input.record["A"])); - expect( - result.nestedObject.data.data.timestamp.microsecond, - equals(result.nestedObject.data.data.timestamp.microsecond), - ); + expect(result, equals(input)); final input2 = input.copyWith(int16: 999); final result2 = await client.tests.sendObject(input2); - expect(result2.int16, equals(999)); + expect(result2, equals(input2)); + expect(input == input2, equals(false)); }); test("supports injecting custom http clients", () async { final result = await clientWCustomHttpClient.tests.sendObject(input); @@ -145,7 +137,7 @@ Future main() async { int64: BigInt.zero, nestedArray: [ [ - ObjectWithEveryOptionalTypeNestedArrayItemItem( + ObjectWithEveryOptionalTypeNestedArrayElementElement( id: "", timestamp: DateTime.now()) ] ], @@ -221,7 +213,7 @@ Future main() async { ), nestedArray: [ [ - ObjectWithEveryNullableTypeNestedArrayItemItem( + ObjectWithEveryNullableTypeNestedArrayElementElement( id: "", timestamp: DateTime.now(), ) @@ -289,7 +281,7 @@ Future main() async { int messageCount = 0; final eventSource = client.tests.streamMessages( ChatMessageParams(channelId: "12345"), - onData: (data, _) { + onMessage: (data, _) { messageCount++; switch (data) { case ChatMessageText(): @@ -339,29 +331,11 @@ Future main() async { expect(messageCount >= 1, equals(true)); expect(eventSource.isClosed, equals(true)); }); - test("[SSE] parses both 'message' and 'error' events", () async { - int messageCount = 0; - int errorCount = 0; - final eventSource = client.tests.streamTenEventsThenError( - onData: (data, connection) { - messageCount++; - expect(data.messageType.isNotEmpty, equals(true)); - }, - onError: (error, connection) { - errorCount++; - connection.close(); - }, - ); - await Future.delayed(Duration(milliseconds: 500)); - expect(messageCount, equals(10)); - expect(errorCount, equals(1)); - expect(eventSource.isClosed, equals(true)); - }); test("[SSE] closes connection when receiving 'done' event", () async { int messageCount = 0; int errorCount = 0; final eventSource = client.tests.streamTenEventsThenEnd( - onData: (data, connection) { + onMessage: (data, connection) { messageCount++; }, onError: (_, __) { @@ -382,7 +356,7 @@ Future main() async { onOpen: (_, __) { connectionCount++; }, - onData: (data, _) { + onMessage: (data, _) { messageCount++; expect(data.count > 0, equals(true)); }, @@ -404,7 +378,7 @@ Future main() async { onOpen: (_, __) { openCount++; }, - onData: (data, _) { + onMessage: (data, _) { msgCount++; }, onError: (_, __) { @@ -421,7 +395,6 @@ Future main() async { test("[SSE] auto-retry when initial connection fails", () async { var openCount = 0; var errorCount = 0; - var connectionErrorCount = 0; var msgCount = 0; final List errors = []; final statusCode = 555; @@ -434,23 +407,19 @@ Future main() async { onOpen: (_, __) { openCount++; }, - onData: (data, _) { + onMessage: (data, _) { msgCount++; }, onError: (err, _) { errorCount++; - }, - onConnectionError: (err, _) { - connectionErrorCount++; errors.add(err); }, ); await Future.delayed(Duration(milliseconds: 500)); eventSource.close(); expect(openCount > 0, equals(true)); - expect(errorCount, equals(0)); expect(msgCount, equals(0)); - expect(connectionErrorCount > 0, equals(true)); + expect(errorCount > 0, equals(true)); expect( errors.every( (element) => @@ -472,11 +441,11 @@ Future main() async { var msgCount = 0; var openCount = 0; final eventSource = dynamicClient.tests.streamRetryWithNewCredentials( - onData: (data, connection) { + onMessage: (data, connection) { msgCount++; }, onOpen: (response, connection) { openCount++; - }, onConnectionError: (err, connection) { + }, onError: (err, connection) { print(err.toString()); }); await Future.delayed(Duration(milliseconds: 2000)); diff --git a/tests/clients/kotlin/src/main/kotlin/Main.kt b/tests/clients/kotlin/src/main/kotlin/Main.kt index 2821af46..880609dc 100644 --- a/tests/clients/kotlin/src/main/kotlin/Main.kt +++ b/tests/clients/kotlin/src/main/kotlin/Main.kt @@ -251,7 +251,6 @@ fun main() { testSseSupport(sseScope, client) testAutoRetriesOnServerError(sseScope, client) - testSseParsesMessageAndErrorEvents(sseScope, client) testSseClosesOnDone(sseScope, client) testSseAutoReconnectsWhenClosedByServer(sseScope, client) testSseStreamLargeObjects(sseScope, client) @@ -330,44 +329,6 @@ fun testAutoRetriesOnServerError( expect("$tag > errors more than once", errorCount > 0, true) } -fun testSseParsesMessageAndErrorEvents( - scope: CoroutineScope, - client: TestClient, -) { - val tag = "SSE parses both 'message' and 'error' events" - var openCount = 0 - var messageCount = 0 - var errorReceived: TestClientError? = null - var otherErrorCount = 0 - var closeCount = 0 - val job = client.tests.streamTenEventsThenError( - scope = scope, - onOpen = { - openCount++ - }, - onData = { data -> - messageCount++ - }, - onError = { err -> - errorReceived = err - throw CancellationException() - }, - onConnectionError = { - otherErrorCount++ - }, - onClose = { - closeCount++ - } - ) - Thread.sleep(1000) - job.cancel() - expect(tag, openCount, 1) - expect(tag, closeCount, 1) - expect(tag, messageCount, 10) - expect(tag, errorReceived is TestClientError, true) - expect(tag, otherErrorCount, 0) -} - fun testSseClosesOnDone( scope: CoroutineScope, client: TestClient, diff --git a/tests/clients/kotlin/src/main/kotlin/TestClient.rpc.kt b/tests/clients/kotlin/src/main/kotlin/TestClient.rpc.kt index b7986474..3d99b0a0 100644 --- a/tests/clients/kotlin/src/main/kotlin/TestClient.rpc.kt +++ b/tests/clients/kotlin/src/main/kotlin/TestClient.rpc.kt @@ -475,42 +475,6 @@ class TestClientTestsService( } return job } - - fun streamTenEventsThenError( - scope: CoroutineScope, - - lastEventId: String? = null, - bufferCapacity: Int = 1024, - onOpen: ((response: HttpResponse) -> Unit) = {}, - onClose: (() -> Unit) = {}, - onError: ((error: TestClientError) -> Unit) = {}, - onConnectionError: ((error: TestClientError) -> Unit) = {}, - onData: ((data: ChatMessage) -> Unit) = {}, - ): Job { - val job = scope.launch { - __handleSseRequest( - scope = scope, - httpClient = httpClient, - url = "$baseUrl/rpcs/tests/stream-ten-events-then-error", - method = HttpMethod.Post, - params = null, - headers = headers, - backoffTime = 0, - maxBackoffTime = 30000L, - lastEventId = lastEventId, - bufferCapacity = bufferCapacity, - onOpen = onOpen, - onClose = onClose, - onError = onError, - onConnectionError = onConnectionError, - onData = { str -> - val data = ChatMessage.fromJson(str) - onData(data) - } - ) - } - return job - } } diff --git a/tests/clients/ts/project.json b/tests/clients/ts/project.json index d5800528..9378e242 100644 --- a/tests/clients/ts/project.json +++ b/tests/clients/ts/project.json @@ -12,9 +12,9 @@ } }, "lint": { - "executor": "@nx/eslint:lint", + "executor": "nx:run-commands", "options": { - "lintFilePatterns": ["tests/clients/ts/**/*.ts"] + "command": "pnpm eslint tests/clients/ts" } } } diff --git a/tests/clients/ts/testClient.rpc.ts b/tests/clients/ts/testClient.rpc.ts index 28d30b3c..264b6d33 100644 --- a/tests/clients/ts/testClient.rpc.ts +++ b/tests/clients/ts/testClient.rpc.ts @@ -281,22 +281,6 @@ export class TestClientTestsService { options, ); } - streamTenEventsThenError( - options: SseOptions, - ): EventSourceController { - return arriSseRequest( - { - url: `${this.baseUrl}/rpcs/tests/stream-ten-events-then-error`, - method: "post", - headers: this.headers, - params: undefined, - parser: $$ChatMessage.parse, - serializer: (_) => {}, - clientVersion: this.clientVersion, - }, - options, - ); - } websocketRpc(options: WsOptions = {}) { return arriWsRequest({ url: `${this.baseUrl}/rpcs/tests/websocket-rpc`, diff --git a/tests/clients/ts/testClient.test.ts b/tests/clients/ts/testClient.test.ts index 1002d44b..bee9db88 100644 --- a/tests/clients/ts/testClient.test.ts +++ b/tests/clients/ts/testClient.test.ts @@ -302,37 +302,6 @@ test("[SSE] supports server sent events", async () => { expect(wasConnected).toBe(true); }, 2000); -test("[SSE] parses both 'message' and 'error' events", async () => { - let timesConnected = 0; - let messageCount = 0; - let errorReceived: ArriErrorInstance | undefined; - let otherErrorCount = 0; - const controller = client.tests.streamTenEventsThenError({ - onMessage(_) { - messageCount++; - }, - onErrorMessage(error) { - errorReceived = error; - controller.abort(); - }, - onRequestError() { - otherErrorCount++; - }, - onResponseError() { - otherErrorCount++; - }, - onRequest() { - timesConnected++; - }, - }); - await wait(500); - expect(errorReceived?.code).toBe(400); - expect(otherErrorCount).toBe(0); - expect(controller.signal.aborted).toBe(true); - expect(timesConnected).toBe(1); - expect(messageCount).toBe(10); -}, 2000); - test("[SSE] closes connection when receiving 'done' event", async () => { let timesConnected = 0; let messageCount = 0; diff --git a/tests/server/arri.config.ts b/tests/server/arri.config.ts index caec1c64..57734ebe 100644 --- a/tests/server/arri.config.ts +++ b/tests/server/arri.config.ts @@ -1,9 +1,4 @@ -import { - dartClientGenerator, - defineConfig, - kotlinClientGenerator, - typescriptClientGenerator, -} from "arri"; +import { defineConfig, generators } from "arri"; import { readFileSync } from "fs"; import path from "path"; @@ -20,7 +15,7 @@ export default defineConfig({ serverEntry: "server.ts", http2: true, generators: [ - typescriptClientGenerator({ + generators.typescriptClient({ clientName: "TestClient", outputFile: path.resolve( __dirname, @@ -28,14 +23,14 @@ export default defineConfig({ ), prettierOptions: prettierConfig, }), - dartClientGenerator({ + generators.dartClient({ clientName: "TestClient", outputFile: path.resolve( __dirname, "../clients/dart/lib/test_client.rpc.dart", ), }), - kotlinClientGenerator({ + generators.kotlinClient({ clientName: "TestClient", outputFile: path.resolve( __dirname, diff --git a/tests/server/src/procedures/tests/streamTenEventsThenError.rpc.ts b/tests/server/src/procedures/tests/streamTenEventsThenError.rpc.ts deleted file mode 100644 index f207c326..00000000 --- a/tests/server/src/procedures/tests/streamTenEventsThenError.rpc.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { defineEventStreamRpc } from "@arrirpc/server"; -import { randomUUID } from "crypto"; - -import { ChatMessage } from "./streamMessages.rpc"; - -export default defineEventStreamRpc({ - method: "post", - params: undefined, - response: ChatMessage, - handler({ stream }) { - let messageCount = 0; - const interval = setInterval(async () => { - messageCount++; - await stream.push({ - id: randomUUID(), - channelId: "1", - date: new Date(), - messageType: "TEXT", - text: "hello world", - userId: randomUUID(), - }); - if (messageCount > 10) { - throw new Error( - "Message count exceeded 10. This means setInterval was not properly cleaned up.", - ); - } - if (messageCount === 10) { - await stream.pushError({ - code: 400, - message: "Too many requests", - }); - await cleanup(); - } - }); - async function cleanup() { - clearInterval(interval); - } - stream.onClose(() => cleanup()); - }, -}); diff --git a/tests/test-files/AppDefinition.json b/tests/test-files/AppDefinition.json index 2c5e9fa1..986f55ee 100644 --- a/tests/test-files/AppDefinition.json +++ b/tests/test-files/AppDefinition.json @@ -1,5 +1,5 @@ { - "arriSchemaVersion": "0.0.5", + "schemaVersion": "0.0.6", "info": { "version": "20" }, "procedures": { "sendObject": { diff --git a/tooling/cli/README.md b/tooling/cli/README.md index 5aa8d5c6..cb4cdac8 100644 --- a/tooling/cli/README.md +++ b/tooling/cli/README.md @@ -58,22 +58,17 @@ export default createAppDefinition({ ```ts // arri.config.ts -import { - defineConfig, - typescriptClientGenerator, - dartClientGenerator, - kotlinClientGenerator, -} from "arri"; +import { defineConfig, generators } from "arri"; export default defineConfig({ generators: [ - typescriptClientGenerator({ + generators.typescriptClient({ // options }), - dartClientGenerator({ + generators.dartClient({ // options }), - kotlinClientGenerator({ + generators.kotlinClient({ // options }), ], diff --git a/tooling/cli/package.json b/tooling/cli/package.json index bfe80456..6fd7e42d 100644 --- a/tooling/cli/package.json +++ b/tooling/cli/package.json @@ -1,6 +1,6 @@ { "name": "arri", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { @@ -32,19 +32,19 @@ "@arrirpc/codegen-utils": "workspace:*", "@arrirpc/schema": "workspace:*", "@joshmossas/listhen": "^1.10.1", - "c12": "^1.10.0", + "c12": "^1.11.1", "chokidar": "^3.6.0", "citty": "^0.1.6", "consola": "^3.2.3", "degit": "^2.8.4", "enquirer": "^2.4.1", - "esbuild": "^0.21.4", + "esbuild": "^0.21.5", "esbuild-plugin-replace": "^1.4.0", "globby": "^14.0.1", "h3": "^1.11.1", "ofetch": "^1.3.4", "pathe": "^1.1.2", - "prettier": "^3.3.0" + "prettier": "^3.3.2" }, "devDependencies": { "@types/degit": "^2.8.6" diff --git a/tooling/cli/project.json b/tooling/cli/project.json index 9b519f30..d6e1b142 100644 --- a/tooling/cli/project.json +++ b/tooling/cli/project.json @@ -21,10 +21,9 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], + "executor": "nx:run-commands", "options": { - "lintFilePatterns": ["tooling/cli/**/*.ts"] + "command": "pnpm eslint tooling/cli" } }, "test": { diff --git a/tooling/cli/src/_index.ts b/tooling/cli/src/_index.ts index 06785e19..a77ab11f 100644 --- a/tooling/cli/src/_index.ts +++ b/tooling/cli/src/_index.ts @@ -1,10 +1,18 @@ +import { dartClientGenerator } from "@arrirpc/codegen-dart"; +import { kotlinClientGenerator } from "@arrirpc/codegen-kotlin"; +import { rustClientGenerator } from "@arrirpc/codegen-rust"; +import { typescriptClientGenerator } from "@arrirpc/codegen-ts"; + export { DEV_DEFINITION_ENDPOINT } from "./commands/dev"; export * from "./config"; -export { dartClientGenerator } from "@arrirpc/codegen-dart"; -export { kotlinClientGenerator } from "@arrirpc/codegen-kotlin"; -export { rustClientGenerator } from "@arrirpc/codegen-rust"; -export { typescriptClientGenerator } from "@arrirpc/codegen-ts"; export { type AppDefinition, createAppDefinition, } from "@arrirpc/codegen-utils"; + +export const generators = { + dartClient: dartClientGenerator, + kotlinClient: kotlinClientGenerator, + rustClient: rustClientGenerator, + typescriptClient: typescriptClientGenerator, +} as const; diff --git a/tooling/cli/src/commands/codegen.ts b/tooling/cli/src/commands/codegen.ts index 43d081d8..50d3c7d2 100644 --- a/tooling/cli/src/commands/codegen.ts +++ b/tooling/cli/src/commands/codegen.ts @@ -80,7 +80,7 @@ export default defineCommand({ config.generators.map((gen) => gen.generator( def ?? { - arriSchemaVersion: "0.0.4", + schemaVersion: "0.0.6", procedures: {}, definitions: {}, }, diff --git a/tooling/cli/src/config.ts b/tooling/cli/src/config.ts index e971883d..5f8d169d 100644 --- a/tooling/cli/src/config.ts +++ b/tooling/cli/src/config.ts @@ -1,4 +1,4 @@ -import { type ClientGenerator } from "@arrirpc/codegen-utils"; +import { type Generator } from "@arrirpc/codegen-utils"; import { type BuildOptions } from "esbuild"; /* eslint-disable spaced-comment */ @@ -13,7 +13,7 @@ export interface ArriConfig { * this defaults to ["***\/*\*.rpc.ts"] */ procedureGlobPatterns?: string[]; - generators?: Array>; + generators?: Array>; buildDir?: string; esbuild?: Omit< BuildOptions, diff --git a/tooling/codegen-utils/package.json b/tooling/codegen-utils/package.json index ae702e2b..0c4c5793 100644 --- a/tooling/codegen-utils/package.json +++ b/tooling/codegen-utils/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-utils", - "version": "0.49.1", + "version": "0.51.0", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, "bugs": { "url": "https://github.com/modiimedia/arri/issues" }, diff --git a/tooling/codegen-utils/project.json b/tooling/codegen-utils/project.json index fac32676..c71d1341 100644 --- a/tooling/codegen-utils/project.json +++ b/tooling/codegen-utils/project.json @@ -21,8 +21,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint tooling/codegen-utils" + } }, "test": { "executor": "@nx/vite:test", diff --git a/tooling/codegen-utils/src/index.test.ts b/tooling/codegen-utils/src/index.test.ts index 4eca79c5..628e295b 100644 --- a/tooling/codegen-utils/src/index.test.ts +++ b/tooling/codegen-utils/src/index.test.ts @@ -196,7 +196,7 @@ test("create app definition", () => { }, }); const expectedResult: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", procedures: { sayHello: { transport: "http", diff --git a/tooling/codegen-utils/src/index.ts b/tooling/codegen-utils/src/index.ts index a48fe9c6..b80524e0 100644 --- a/tooling/codegen-utils/src/index.ts +++ b/tooling/codegen-utils/src/index.ts @@ -29,10 +29,10 @@ export const isRpcHttpMethod = (input: any): input is RpcHttpMethod => { return isHttpMethod(input) && input !== "head"; }; -export const SCHEMA_VERSION = "0.0.5"; +export const SCHEMA_VERSION = "0.0.6"; export interface AppDefinition { - arriSchemaVersion: typeof SCHEMA_VERSION; + schemaVersion: typeof SCHEMA_VERSION; info?: { title?: string; description?: string; @@ -52,7 +52,7 @@ export function isAppDefinition(input: unknown): input is AppDefinition { return false; } const inputObj = input as Record; - if (typeof inputObj.arriSchemaVersion !== "string") { + if (typeof inputObj.schemaVersion !== "string") { return false; } if (typeof inputObj.procedures !== "object") { @@ -231,20 +231,17 @@ export function normalizeWhitespace(input: string) { return result; } -export interface ClientGenerator< - TOptions extends Record | undefined, -> { +export interface Generator | undefined> { generator: (def: AppDefinition, isDevServer?: boolean) => any; options: TOptions; } -export type ClientGeneratorPlugin< - TOptions extends Record | undefined, -> = (options: TOptions) => ClientGenerator; +export type GeneratorPlugin | undefined> = + (options: TOptions) => Generator; -export function defineClientGeneratorPlugin< +export function defineGeneratorPlugin< TOptions extends Record | undefined, ->(plugin: ClientGeneratorPlugin) { +>(plugin: GeneratorPlugin) { return plugin; } @@ -254,7 +251,7 @@ type RpcDefinitionHelper = RpcDefinition< type AppDefinitionHelper = Omit< AppDefinition, - "procedures" | "definitions" | "arriSchemaVersion" + "procedures" | "definitions" | "schemaVersion" > & { procedures: Record; definitions?: AppDefinition["definitions"]; @@ -288,7 +285,7 @@ export function createAppDefinition(input: AppDefinitionHelper): AppDefinition { }; } const result: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", ...input, procedures, definitions, diff --git a/tooling/codegen-utils/src/testModels.ts b/tooling/codegen-utils/src/testModels.ts index 4ce6bbac..42a7038b 100644 --- a/tooling/codegen-utils/src/testModels.ts +++ b/tooling/codegen-utils/src/testModels.ts @@ -79,7 +79,7 @@ export const TestUpdateUserParams = a.pick( ); export const TestAppDefinition: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", info: { title: "Test App Client", description: "This is a example app definition", @@ -243,7 +243,7 @@ export const ExampleRecursive = a.recursive( ); export const ReferenceAppDefinition: AppDefinition = { - arriSchemaVersion: "0.0.5", + schemaVersion: "0.0.6", procedures: {}, definitions: { ExamplePayload, diff --git a/tooling/eslint-plugin/package.json b/tooling/eslint-plugin/package.json index 7eff5ef9..66363e38 100644 --- a/tooling/eslint-plugin/package.json +++ b/tooling/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/eslint-plugin", - "version": "0.49.1", + "version": "0.51.0", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, "bugs": { "url": "https://github.com/modiimedia/arri/issues" }, diff --git a/tooling/eslint-plugin/project.json b/tooling/eslint-plugin/project.json index 5d73e4fd..a8a3fad1 100644 --- a/tooling/eslint-plugin/project.json +++ b/tooling/eslint-plugin/project.json @@ -29,10 +29,9 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], + "executor": "nx:run-commands", "options": { - "lintFilePatterns": ["tooling/eslint-plugin/**/*.ts"] + "command": "pnpm eslint tooling/eslint-plugin" } }, "test": { diff --git a/tooling/json-schema-to-jtd/package.json b/tooling/json-schema-to-jtd/package.json index b4bbdab9..f39a7b60 100644 --- a/tooling/json-schema-to-jtd/package.json +++ b/tooling/json-schema-to-jtd/package.json @@ -1,6 +1,6 @@ { "name": "json-schema-to-jtd", - "version": "0.49.1", + "version": "0.51.0", "license": "MIT", "author": { "name": "joshmossas", diff --git a/tooling/json-schema-to-jtd/project.json b/tooling/json-schema-to-jtd/project.json index 5fb4dec3..d2f48cc1 100644 --- a/tooling/json-schema-to-jtd/project.json +++ b/tooling/json-schema-to-jtd/project.json @@ -21,8 +21,10 @@ } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint tooling/json-schema-to-jtd" + } }, "test": { "executor": "@nx/vite:test", diff --git a/tooling/jtd-utils/package.json b/tooling/jtd-utils/package.json index ad4eb282..95706c82 100644 --- a/tooling/jtd-utils/package.json +++ b/tooling/jtd-utils/package.json @@ -13,6 +13,6 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": ["dist"], - "version": "0.49.1", + "version": "0.51.0", "dependencies": {} } diff --git a/tooling/jtd-utils/project.json b/tooling/jtd-utils/project.json index 1e5da5a5..854fc9f4 100644 --- a/tooling/jtd-utils/project.json +++ b/tooling/jtd-utils/project.json @@ -21,8 +21,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint tooling/jtd-utils" + } }, "test": { "executor": "@nx/vite:test", diff --git a/tooling/schema-typebox-adapter/package.json b/tooling/schema-typebox-adapter/package.json index b982c10c..d801cb78 100644 --- a/tooling/schema-typebox-adapter/package.json +++ b/tooling/schema-typebox-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/typebox-adapter", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", diff --git a/tooling/schema-typebox-adapter/project.json b/tooling/schema-typebox-adapter/project.json index 6264359f..714b887a 100644 --- a/tooling/schema-typebox-adapter/project.json +++ b/tooling/schema-typebox-adapter/project.json @@ -21,8 +21,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint tooling/schema-typebox-adapter" + } }, "test": { "executor": "@nx/vite:test", diff --git a/tooling/schema/package.json b/tooling/schema/package.json index 759b602a..be08131a 100644 --- a/tooling/schema/package.json +++ b/tooling/schema/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/schema", - "version": "0.49.1", + "version": "0.51.0", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -21,7 +21,7 @@ }, "devDependencies": { "@faker-js/faker": "^8.4.1", - "ajv": "^8.15.0", + "ajv": "^8.16.0", "benny": "^3.7.1" } } diff --git a/tooling/schema/project.json b/tooling/schema/project.json index 4bf66ec2..b84d0dae 100644 --- a/tooling/schema/project.json +++ b/tooling/schema/project.json @@ -30,8 +30,10 @@ "dependsOn": ["build"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "nx:run-commands", + "options": { + "command": "pnpm eslint tooling/schema" + } }, "test": { "executor": "@nx/vite:test", diff --git a/tooling/schema/src/schemas.test.ts b/tooling/schema/src/schemas.test.ts index ed58d429..ece7c410 100644 --- a/tooling/schema/src/schemas.test.ts +++ b/tooling/schema/src/schemas.test.ts @@ -1,4 +1,4 @@ -import { a, type InferSubType,type InferType } from "./_index"; +import { a, type InferSubType, type InferType } from "./_index"; describe("InferSubType", () => { test("Basic Discriminator", () => { diff --git a/tooling/schema/tsconfig.lib.json b/tooling/schema/tsconfig.lib.json index 33eca2c2..6ac83796 100644 --- a/tooling/schema/tsconfig.lib.json +++ b/tooling/schema/tsconfig.lib.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", "declaration": true, "types": ["node"] }, diff --git a/tooling/schema/tsconfig.spec.json b/tooling/schema/tsconfig.spec.json index 1c146677..771ff411 100644 --- a/tooling/schema/tsconfig.spec.json +++ b/tooling/schema/tsconfig.spec.json @@ -1,8 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"] + "types": ["vitest/globals", "vitest/importMeta", "node"] }, "include": [ "vite.config.ts",