diff --git a/.gitignore b/.gitignore index 9e160b6..3cd9f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ .dart_tool/ .packages doc/ +lib/.DS_Store +.DS_Store +pubspec.lock diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..52135c4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "workbench.colorCustomizations": { + "[Ayu Mirage Bordered]": {}, + "activityBar.background": "#432708", + "titleBar.activeBackground": "#5E360C", + "titleBar.activeForeground": "#FEFBF8" + } +} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index a2c8332..30a20ff 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,99 +5,104 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "2.11.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.18.0" faunadb_http: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.13.2" + version: "0.14.3" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "1.2.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.8.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.11.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.9.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + web: + dependency: transitive + description: + name: web + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.0.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/lib/faunadb_http.dart b/lib/faunadb_http.dart index ee7a4fc..802b5a3 100644 --- a/lib/faunadb_http.dart +++ b/lib/faunadb_http.dart @@ -1,4 +1,5 @@ -export 'src/FaunaConfig.dart'; export 'src/FaunaClient.dart'; -export 'src/fql/result.dart'; +export 'src/FaunaConfig.dart'; +export 'src/FaunaDioClient.dart'; export 'src/fql/page.dart'; +export 'src/fql/result.dart'; diff --git a/lib/query.dart b/lib/query.dart index 9f25fff..aedd6e0 100644 --- a/lib/query.dart +++ b/lib/query.dart @@ -9,3 +9,4 @@ export 'src/fql/miscellaneous.dart'; export 'src/fql/read_and_write.dart'; export 'src/fql/string.dart'; export 'src/fql/time_and_date.dart'; +export 'src/fql/type_checks.dart'; diff --git a/lib/src/FaunaDioClient.dart b/lib/src/FaunaDioClient.dart new file mode 100644 index 0000000..e6117af --- /dev/null +++ b/lib/src/FaunaDioClient.dart @@ -0,0 +1,97 @@ +import 'dart:convert'; + +import 'package:dio/dio.dart'; + +import './FaunaConfig.dart'; +import 'fql/result.dart'; + +/// The Dart native client for FaunaDB. +/// +/// Query methods are asynchronous and return a [Future]. +/// +/// The [close()] method must be called in order to release +/// the FaunaClient I/O resources. +class FaunaDioClient { + final _dioClient = Dio(); + + /// Client configuration + final FaunaConfig config; + + /// Creates a FaunaClient. A valid [config] is required. + FaunaDioClient(this.config); + + /// Executes a query via the FaunaDB Query API. + /// + /// [expression] must be either: + /// - composed using functions from the query classes + /// - serializable JSON representation of an FQL query. + /// + /// Queries built using the query classes look very similar to + /// real FQL. It was an aim to mimic FQL function names and arguments + /// as closely as possible. + /// Docs on all FQL functions can be found [here][fql-cheat]. + /// + /// [fql-cheat]: https://docs.fauna.com/fauna/current/api/fql/cheat_sheet + /// + /// Example query [expression]: + /// + /// ``` + /// Paginate(Match(Index('all_customers'))) + /// ``` + /// + /// However some notable differences are: + /// - Optional FQL arguments are named arguments in Dart. + /// e.g. `Repeat('x', number: 10)` + /// - FQL functions with a variable number of arguments + /// (such as Sum, GT etc.) + /// accept a Dart List instead. + /// - Some FQL functions and arguments are reserved keywords in Dart; + /// simply add a trailing underscore to them + /// (`Map` -> `Map_`, + /// `Function` -> `Function_`, + /// `default` -> `default_`) + /// + /// + /// + /// Any value serializable to valid JSON can also be passed + /// as an [expression]. + /// + /// Docs on JSON query syntax can be found [here][query-docs]. + /// + /// [query-docs]: https://app.fauna.com/documentation/intro/querying#query-syntax + /// + /// Example JSON [expression]: + /// ``` + /// { + /// 'paginate': { + /// 'match': {'index': 'all_products'}, + /// } + /// } + /// ``` + /// + /// Throws [TimeoutException] if query response is not received within + /// [config.timeout]. + Future query(Object expression, {FaunaConfig? options}) async { + final config = (options ?? this.config); + + var baseOptions = BaseOptions( + headers: config.requestHeaders, + ); + + _dioClient.options = baseOptions; + + var response = await _dioClient.post>( + config.baseUrl.toString(), + data: jsonEncode(expression), + ); + + var result = FaunaResponse.fromJson(response.data!); + + return result; + } + + /// Closes and releases all client resources. + void close() { + _dioClient.close(); + } +} diff --git a/lib/src/fql/logic.dart b/lib/src/fql/logic.dart index 3b919d5..b8f550f 100644 --- a/lib/src/fql/logic.dart +++ b/lib/src/fql/logic.dart @@ -53,13 +53,28 @@ class Contains extends Expr { Contains(this.path, this.in_); - factory Contains.fromJson(Map json) => - _$ContainsFromJson(json); + factory Contains.fromJson(Map json) => _$ContainsFromJson(json); @override Map toJson() => _$ContainsToJson(this); } +@JsonSerializable() +class ContainsStr extends Expr { + @JsonKey(name: 'containsstr') + final Object value; + + @JsonKey(name: 'search') + final Object search; + + ContainsStr(this.value, this.search); + + factory ContainsStr.fromJson(Map json) => _$ContainsStrFromJson(json); + + @override + Map toJson() => _$ContainsStrToJson(this); +} + @JsonSerializable() class Equals extends Expr { @JsonKey(name: 'equals') diff --git a/lib/src/fql/logic.g.dart b/lib/src/fql/logic.g.dart index 366bb76..a78c39b 100644 --- a/lib/src/fql/logic.g.dart +++ b/lib/src/fql/logic.g.dart @@ -40,6 +40,17 @@ Map _$ContainsToJson(Contains instance) => { 'in': instance.in_, }; +ContainsStr _$ContainsStrFromJson(Map json) => ContainsStr( + json['containsstr'] as Object, + json['search'] as Object, + ); + +Map _$ContainsStrToJson(ContainsStr instance) => + { + 'containsstr': instance.value, + 'search': instance.search, + }; + Equals _$EqualsFromJson(Map json) => Equals( json['equals'] as Object, ); diff --git a/lib/src/fql/result.dart b/lib/src/fql/result.dart index ebb5a98..34d8b3c 100644 --- a/lib/src/fql/result.dart +++ b/lib/src/fql/result.dart @@ -28,7 +28,7 @@ class Result { } else if (value is Obj) { return value.object; } else if (key == 'ts') { - return DateTime.fromMicrosecondsSinceEpoch(value); + return value; } else { return value; } @@ -97,8 +97,7 @@ class RefResult { return Ref(Collection(collection!.id), id); } - factory RefResult.fromJson(Map json) => - _$RefResultFromJson(json); + factory RefResult.fromJson(Map json) => _$RefResultFromJson(json); Map toJson() => _$RefResultToJson(this); @@ -121,8 +120,7 @@ class QueryResult { QueryResult(this.params, this.expression); - factory QueryResult.fromJson(Map json) => - _$QueryResultFromJson(json); + factory QueryResult.fromJson(Map json) => _$QueryResultFromJson(json); Map toJson() => _$QueryResultToJson(this); @@ -179,8 +177,7 @@ class FaunaResponse { return qr; } - factory FaunaResponse.fromJson(Map json) => - _$FaunaResponseFromJson(json); + factory FaunaResponse.fromJson(Map json) => _$FaunaResponseFromJson(json); Map toJson() => _$FaunaResponseToJson(this); } diff --git a/lib/src/fql/type_checks.dart b/lib/src/fql/type_checks.dart new file mode 100644 index 0000000..25195d0 --- /dev/null +++ b/lib/src/fql/type_checks.dart @@ -0,0 +1,16 @@ +import 'package:faunadb_http/query.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'type_checks.g.dart'; + +@JsonSerializable() +class IsNull extends Expr { + @JsonKey(name: 'is_null') + final Object value; + + IsNull(this.value); + + factory IsNull.fromJson(Map json) => _$IsNullFromJson(json); + @override + Map toJson() => _$IsNullToJson(this); +} diff --git a/lib/src/fql/type_checks.g.dart b/lib/src/fql/type_checks.g.dart new file mode 100644 index 0000000..e1ede39 --- /dev/null +++ b/lib/src/fql/type_checks.g.dart @@ -0,0 +1,15 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'type_checks.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IsNull _$IsNullFromJson(Map json) => IsNull( + json['is_null'] as Object, + ); + +Map _$IsNullToJson(IsNull instance) => { + 'is_null': instance.value, + }; diff --git a/pubspec.lock b/pubspec.lock index e3edc2d..f1d1212 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,400 +5,473 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43" + url: "https://pub.dev" source: hosted - version: "23.0.0" + version: "31.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.8.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.3.1" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: ad77deb6e9c143a3f550fbb4c5c1e0c6aadabe24274898d06b9526c61b9cf4fb + url: "https://pub.dev" source: hosted version: "1.0.0" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: "4666aef1d045c5ca15ebba63e400bd4e4fbd9f0dd06e791b51ab210da78a27f7" + url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.0.6" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "361d73f37cd48c47a81a61421eb1cc4cfd2324516fbb52f1bc4c9a01834ef2de" + url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.11" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "0db1b64c84fa803603fa406f8721959036e898cc9575d6ce4a3067581b9276c0" + url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.2.2" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 + url: "https://pub.dev" source: hosted - version: "8.0.2" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "8.8.1" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659 + url: "https://pub.dev" source: hosted version: "2.0.1" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.dartlang.org" + sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.3.5" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.18.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "6e8086e1d3c2f6bc15056ee248c4ddc48c2bc71287c0961bf801a08633ed4333" + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.2.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.3.1" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "1.2.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.6.7" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: "0aa7409f6c82acfab96853b8b0c7503de49918cbe705a57cfdeb477756b4521b" + url: "https://pub.dev" source: hosted version: "4.1.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.dartlang.org" + sha256: "4af8658055786907c7cecb7fc207b00995fb81201c59542ef6378fc92304cc1c" + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.16+1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.11.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" pedantic: dependency: "direct dev" description: name: pedantic - url: "https://pub.dartlang.org" + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" source: hosted version: "1.11.1" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.5.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "0e01f805457ef610ccaf8d18067596afc34107a27149778b06b2083edbc140c1" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "00f8b6b586f724a8c769c96f1d517511a41661c0aede644544d8d86a1ab11142" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.2.2" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" + sha256: "522d9b05c40ec14f479ce4428337d106c0465fedab42f514582c198460a784fe" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: c386d07d7f5efc613479a7c4d9d64b03710b03cfaa7e8ad5f2bfb295a1f0dfad + url: "https://pub.dev" source: hosted version: "1.0.0" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" source: hosted version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index f92239d..62c13f3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,14 +1,15 @@ name: faunadb_http -version: 0.13.4 +version: 0.15.0 description: A pure Dart implementation of a FaunaDB client and provides query classes that closely mimic FQL functions. homepage: https://github.com/gavanitrate/faunadb-http-dart environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: - http: ^0.13.3 + http: ^1.2.2 json_annotation: ^4.1.0 + dio: ^5.7.0 dev_dependencies: json_serializable: ^5.0.0