From 8de83e2355d01ebd7828307ee6b54b2abb3393b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Tue, 26 Apr 2022 07:10:17 +0300 Subject: [PATCH 1/7] Add IsNull Function --- example/pubspec.lock | 2 +- lib/query.dart | 1 + lib/src/fql/type_checks.dart | 15 +++++++++++++++ lib/src/fql/type_checks.g.dart | 15 +++++++++++++++ pubspec.yaml | 2 +- 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 lib/src/fql/type_checks.dart create mode 100644 lib/src/fql/type_checks.g.dart diff --git a/example/pubspec.lock b/example/pubspec.lock index a2c8332..5c9cb16 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -28,7 +28,7 @@ packages: path: ".." relative: true source: path - version: "0.13.2" + version: "0.13.4" http: dependency: transitive description: 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/fql/type_checks.dart b/lib/src/fql/type_checks.dart new file mode 100644 index 0000000..136ee0f --- /dev/null +++ b/lib/src/fql/type_checks.dart @@ -0,0 +1,15 @@ +import 'package:faunadb_http/query.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'type_checks.g.dart'; + +@JsonSerializable() +class IsNull extends Expr { + 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..d804750 --- /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['value'] as Object, + ); + +Map _$IsNullToJson(IsNull instance) => { + 'value': instance.value, + }; diff --git a/pubspec.yaml b/pubspec.yaml index f92239d..135aec6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: faunadb_http -version: 0.13.4 +version: 0.14.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 From 322eab801b7ddd09c7def1f87371c63949eec144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Fri, 15 Jul 2022 23:48:44 +0300 Subject: [PATCH 2/7] ContainsStr is added --- .gitignore | 2 ++ .vscode/settings.json | 8 ++++++++ lib/src/fql/logic.dart | 19 +++++++++++++++++-- lib/src/fql/logic.g.dart | 11 +++++++++++ lib/src/fql/type_checks.dart | 1 + lib/src/fql/type_checks.g.dart | 4 ++-- pubspec.yaml | 2 +- 7 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 9e160b6..d152d4b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .dart_tool/ .packages doc/ +lib/.DS_Store +.DS_Store 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/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/type_checks.dart b/lib/src/fql/type_checks.dart index 136ee0f..25195d0 100644 --- a/lib/src/fql/type_checks.dart +++ b/lib/src/fql/type_checks.dart @@ -5,6 +5,7 @@ part 'type_checks.g.dart'; @JsonSerializable() class IsNull extends Expr { + @JsonKey(name: 'is_null') final Object value; IsNull(this.value); diff --git a/lib/src/fql/type_checks.g.dart b/lib/src/fql/type_checks.g.dart index d804750..e1ede39 100644 --- a/lib/src/fql/type_checks.g.dart +++ b/lib/src/fql/type_checks.g.dart @@ -7,9 +7,9 @@ part of 'type_checks.dart'; // ************************************************************************** IsNull _$IsNullFromJson(Map json) => IsNull( - json['value'] as Object, + json['is_null'] as Object, ); Map _$IsNullToJson(IsNull instance) => { - 'value': instance.value, + 'is_null': instance.value, }; diff --git a/pubspec.yaml b/pubspec.yaml index 135aec6..6a27ed9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: faunadb_http -version: 0.14.0 +version: 0.14.2 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 From 0d05748537fbbd66bec3da26b86acc0aa54f79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Mon, 8 Jan 2024 18:35:37 +0300 Subject: [PATCH 3/7] Update version and dependencies in pubspec.yaml --- pubspec.lock | 183 ++++++++++++++++++++++++++++++++++----------------- pubspec.yaml | 6 +- 2 files changed, 127 insertions(+), 62 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index e3edc2d..3edc97c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,400 +5,465 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "4d36419f9d0c54a40acc965293af133602375bfed359ec1e6107c3348a6f870b" + url: "https://pub.dev" source: hosted version: "23.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "612cb5e1a37eaff9c3d9bd303d351e952d16ef8e0222b44197584f01269646f8" + url: "https://pub.dev" source: hosted version: "2.0.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "37a4264b0b7fb930e94c0c47558f3b6c4f4e9cb7e655a3ea373131d79b2dc0cc" + url: "https://pub.dev" source: hosted version: "2.0.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "6eda8392a48ae1de7ea438c91a4ba3e77205f043e7013102a424863aa6db368f" + url: "https://pub.dev" source: hosted version: "2.5.0" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: de3ecca84980ee5e632888a04f4a72d8e3c390104fd5edb3a724785f66e9e97a + url: "https://pub.dev" source: hosted version: "2.0.3" 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: fa3257da1537d0e6cd7bfc966883426f203e4af1b05d349f7f4e3f513fd9ebe1 + url: "https://pub.dev" source: hosted version: "3.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: a171129ff393d360a5ec9ba3a2277e0d7e713027709f08196e8192688b537074 + url: "https://pub.dev" source: hosted version: "2.0.4" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: feb713d54531a867b613b3eda82b24a3d4e7bdd130ab1daa3fc44d4ecf057fc9 + url: "https://pub.dev" source: hosted version: "2.0.6" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "08523c8f5b322fc781f42706cb341cda9d85ea48e214bfc907fa3199eaca6810" + url: "https://pub.dev" source: hosted version: "7.0.1" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: f5a2a975d3da1ca46579d2f173bea1c766f0044cff40889c8df8009bf6ea0d0c + url: "https://pub.dev" source: hosted version: "5.0.0" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "89e9aa093e2c3e246233fcd3c2baba1b4defcdaf7bb640024f85e5dadd9c0597" + url: "https://pub.dev" source: hosted version: "8.0.2" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: "8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362" + url: "https://pub.dev" source: hosted version: "1.2.0" 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: cf1c02840bbbcf8fcd13feb5933c62d643cc58ddf4f6088707cf48d1892cbc5d + url: "https://pub.dev" source: hosted version: "0.3.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: bdb1ab29be158c4784d7f9b7b693745a0719c5899e31c01112782bb1cb871e80 + url: "https://pub.dev" source: hosted version: "4.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "6d4193120997ecfd09acf0e313f13dc122b119e5eca87ef57a7d065ec9183762" + url: "https://pub.dev" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: df567b950053d83b4dba3e8c5799c411895d146f82b2147114b666a4fd9a80dd + url: "https://pub.dev" source: hosted version: "3.0.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: "8be10341257b613566fdc9fd073c46f7c032ed329b1c732bda17aca29f2366c8" + url: "https://pub.dev" source: hosted version: "3.0.0" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "4e65f1921774e1126bd4d7cbc8f866b5fc166346b87d42d0c4ca2b874b153b56" + url: "https://pub.dev" source: hosted version: "2.0.3" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "9fd2163d866769f60f4df8ac1dc59f52498d810c356fe78022e383dd3c57c0e1" + url: "https://pub.dev" source: hosted version: "6.1.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "6a2ef17156f4dc49684f9d99aaf4a93aba8ac49f5eac861755f5730ddf6e2e4e" + url: "https://pub.dev" source: hosted version: "1.0.0" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "780784ec9e9362ed5278272d39b6590474dba495483ec97eba31df4d23622fa0" + url: "https://pub.dev" source: hosted version: "2.1.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "36a6ea2cac1f93742ecee02250fb498122c0993eb948120ff0dbef6cd694beb8" + url: "https://pub.dev" source: hosted version: "2.0.0" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: e07b56af3885387b0cbf6502d4ec17149189559de61256b97e195539afd1da0c + url: "https://pub.dev" source: hosted version: "2.0.0" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "1.1.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: ac10cae1b9a06fb638a92a72b00570bac856f524f7ee0d9a13eaed4960c7fd43 + url: "https://pub.dev" source: hosted version: "3.0.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted version: "4.0.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "15a5436d2a02dc60e6dc2fb5d7dfaac08b7b137cff3d4bf3158d38ecab656b69" + url: "https://pub.dev" source: hosted version: "1.0.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: d9bdfd70d828eeb352390f81b18d6a354ef2044aa28ef25682079797fa7cd174 + url: "https://pub.dev" source: hosted version: "0.6.3" 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: e55b5148eba27e8956f8f4d0e76e5cafeb087a41fd8f7c813d7b4ae11e5ed5cd + url: "https://pub.dev" source: hosted version: "5.0.0" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "3730d4c02b0c2d1db80ef9904e27fa796d75474f572a70011e0e616ee6bfc0ff" + url: "https://pub.dev" source: hosted version: "1.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "38c7be344ac5057e10161a5ecb00c9d9d67ed2f150001278601dd27d9fe64206" + url: "https://pub.dev" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "5202fdd37b4da5fd14a237ed0a01cad6c1efd4c99b5b5a0d3c9237f3728c9485" + url: "https://pub.dev" source: hosted version: "1.7.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: a7a98ea7f366e2cc9d2b20873815aebec5e2bc124fe0da9d3f7f59b0625ea180 + url: "https://pub.dev" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "20e7154d701fedaeb219dad732815ecb66677667871127998a9a6581c2aba4ba" + url: "https://pub.dev" source: hosted version: "2.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb" + url: "https://pub.dev" source: hosted version: "1.8.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: "05955e3de2683e1746222efd14b775df7131139e07695dc8e24650f6b4204504" + url: "https://pub.dev" source: hosted version: "1.5.0" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "59ed538734419e81f7fc18c98249ae72c3c7188bdd9dceff2840585227f79843" + url: "https://pub.dev" source: hosted version: "2.0.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "358c5ce09744e0e08b3f5f38c53d7d26a8219dd641718f8500f49cfa56240358" + url: "https://pub.dev" source: hosted version: "1.0.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c0710a5ca61f1a96e9aae37081040f537c1b96265040edeb70c8817a10d361c6 + url: "https://pub.dev" source: hosted version: "1.0.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "520368a1a49798425310ca0ee28eb92b3c737e4e9d173c31b6c66fe090ebc6fc" + url: "https://pub.dev" source: hosted version: "1.0.0" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "3e743f02b0916cf719347492bc475f1fc270302c4f650544f16a55e9a463a143" + url: "https://pub.dev" source: hosted version: "1.0.5" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" + sha256: "75d50f95956bc6ebdf662d408036c8c9160ccf6e2cd1303006dbc1a188ea53f9" + url: "https://pub.dev" source: hosted version: "1.2.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a + url: "https://pub.dev" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: f8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774 + url: "https://pub.dev" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: db47e4797198ee601990820437179bb90219f918962318d494ada2b4b11e6f6d + url: "https://pub.dev" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: ed464977cb26a1f41537e177e190c67223dbd9f4f683489b6ab2e5d211ec564e + url: "https://pub.dev" source: hosted version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4 + url: "https://pub.dev" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830 + url: "https://pub.dev" source: hosted version: "1.2.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: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + url: "https://pub.dev" source: hosted version: "1.3.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "68173f2fa67d241323a4123be7ed4e43424c54befa5505d71c8ad4b7baf8f71d" + url: "https://pub.dev" source: hosted version: "1.0.0" + web: + dependency: transitive + description: + name: web + sha256: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa + url: "https://pub.dev" + source: hosted + version: "0.4.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "500e6014efebd305a30ebf1c6006d13faa82dcd85c7a2a7793679a64ed69ec48" + url: "https://pub.dev" source: hosted version: "2.0.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "3cee79b1715110341012d27756d9bae38e650588acd38d3f3c610822e1337ace" + url: "https://pub.dev" source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.2.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6a27ed9..b3bdae3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,13 +1,13 @@ name: faunadb_http -version: 0.14.2 +version: 0.14.3 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.1.2 json_annotation: ^4.1.0 dev_dependencies: From 95d411f08324a4261f68ef7123324a9ef3977139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Wed, 10 Jan 2024 12:19:33 +0300 Subject: [PATCH 4/7] Update dependencies in pubspec.yaml --- example/pubspec.lock | 81 +++++++-------- pubspec.lock | 228 ++++++++++++++++++++++--------------------- pubspec.yaml | 2 +- 3 files changed, 162 insertions(+), 149 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 5c9cb16..4d14a3a 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.4" + version: "0.14.3" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + url: "https://pub.dev" source: hosted - version: "0.13.3" + version: "1.1.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: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "0.4.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.2.0 <4.0.0" diff --git a/pubspec.lock b/pubspec.lock index 3edc97c..136dc63 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,42 +5,50 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "4d36419f9d0c54a40acc965293af133602375bfed359ec1e6107c3348a6f870b" + sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43" url: "https://pub.dev" source: hosted - version: "23.0.0" + version: "31.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "612cb5e1a37eaff9c3d9bd303d351e952d16ef8e0222b44197584f01269646f8" + sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.8.0" args: dependency: transitive description: name: args - sha256: "37a4264b0b7fb930e94c0c47558f3b6c4f4e9cb7e655a3ea373131d79b2dc0cc" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.2" async: dependency: transitive description: name: async - sha256: "6eda8392a48ae1de7ea438c91a4ba3e77205f043e7013102a424863aa6db368f" + 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 - sha256: de3ecca84980ee5e632888a04f4a72d8e3c390104fd5edb3a724785f66e9e97a + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.3.1" build_config: dependency: transitive description: @@ -53,58 +61,50 @@ packages: dependency: transitive description: name: build_daemon - sha256: fa3257da1537d0e6cd7bfc966883426f203e4af1b05d349f7f4e3f513fd9ebe1 + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: a171129ff393d360a5ec9ba3a2277e0d7e713027709f08196e8192688b537074 + 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 - sha256: feb713d54531a867b613b3eda82b24a3d4e7bdd130ab1daa3fc44d4ecf057fc9 + 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 - sha256: "08523c8f5b322fc781f42706cb341cda9d85ea48e214bfc907fa3199eaca6810" + sha256: "0db1b64c84fa803603fa406f8721959036e898cc9575d6ce4a3067581b9276c0" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.2.2" built_collection: dependency: transitive description: name: built_collection - sha256: f5a2a975d3da1ca46579d2f173bea1c766f0044cff40889c8df8009bf6ea0d0c + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" built_value: dependency: transitive description: name: built_value - sha256: "89e9aa093e2c3e246233fcd3c2baba1b4defcdaf7bb640024f85e5dadd9c0597" - url: "https://pub.dev" - source: hosted - version: "8.0.2" - charcode: - dependency: transitive - description: - name: charcode - sha256: "8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362" + sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "8.8.1" checked_yaml: dependency: transitive description: @@ -117,130 +117,130 @@ packages: dependency: transitive description: name: cli_util - sha256: cf1c02840bbbcf8fcd13feb5933c62d643cc58ddf4f6088707cf48d1892cbc5d + sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.3.5" code_builder: dependency: transitive description: name: code_builder - sha256: bdb1ab29be158c4784d7f9b7b693745a0719c5899e31c01112782bb1cb871e80 + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: "6d4193120997ecfd09acf0e313f13dc122b119e5eca87ef57a7d065ec9183762" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.18.0" convert: dependency: transitive description: name: convert - sha256: df567b950053d83b4dba3e8c5799c411895d146f82b2147114b666a4fd9a80dd + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" crypto: dependency: transitive description: name: crypto - sha256: "8be10341257b613566fdc9fd073c46f7c032ed329b1c732bda17aca29f2366c8" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - sha256: "4e65f1921774e1126bd4d7cbc8f866b5fc166346b87d42d0c4ca2b874b153b56" + sha256: "6e8086e1d3c2f6bc15056ee248c4ddc48c2bc71287c0961bf801a08633ed4333" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.2.1" file: dependency: transitive description: name: file - sha256: "9fd2163d866769f60f4df8ac1dc59f52498d810c356fe78022e383dd3c57c0e1" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - sha256: "6a2ef17156f4dc49684f9d99aaf4a93aba8ac49f5eac861755f5730ddf6e2e4e" + 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 - sha256: "780784ec9e9362ed5278272d39b6590474dba495483ec97eba31df4d23622fa0" + sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" glob: dependency: transitive description: name: glob - sha256: "36a6ea2cac1f93742ecee02250fb498122c0993eb948120ff0dbef6cd694beb8" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - sha256: e07b56af3885387b0cbf6502d4ec17149189559de61256b97e195539afd1da0c + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.3.1" http: dependency: "direct main" description: name: http - sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "0.13.6" http_multi_server: dependency: transitive description: name: http_multi_server - sha256: ac10cae1b9a06fb638a92a72b00570bac856f524f7ee0d9a13eaed4960c7fd43 + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" io: dependency: transitive description: name: io - sha256: "15a5436d2a02dc60e6dc2fb5d7dfaac08b7b137cff3d4bf3158d38ecab656b69" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" js: dependency: transitive description: name: js - sha256: d9bdfd70d828eeb352390f81b18d6a354ef2044aa28ef25682079797fa7cd174 + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.6.7" json_annotation: dependency: "direct main" description: @@ -253,58 +253,58 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: e55b5148eba27e8956f8f4d0e76e5cafeb087a41fd8f7c813d7b4ae11e5ed5cd + sha256: "4af8658055786907c7cecb7fc207b00995fb81201c59542ef6378fc92304cc1c" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "3730d4c02b0c2d1db80ef9904e27fa796d75474f572a70011e0e616ee6bfc0ff" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - sha256: "38c7be344ac5057e10161a5ecb00c9d9d67ed2f150001278601dd27d9fe64206" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.16+1" meta: dependency: transitive description: name: meta - sha256: "5202fdd37b4da5fd14a237ed0a01cad6c1efd4c99b5b5a0d3c9237f3728c9485" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.11.0" mime: dependency: transitive description: name: mime - sha256: a7a98ea7f366e2cc9d2b20873815aebec5e2bc124fe0da9d3f7f59b0625ea180 + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" package_config: dependency: transitive description: name: package_config - sha256: "20e7154d701fedaeb219dad732815ecb66677667871127998a9a6581c2aba4ba" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" path: dependency: transitive description: name: path - sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" pedantic: dependency: "direct dev" description: @@ -317,106 +317,114 @@ packages: dependency: transitive description: name: pool - sha256: "05955e3de2683e1746222efd14b775df7131139e07695dc8e24650f6b4204504" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.5.1" pub_semver: dependency: transitive description: name: pub_semver - sha256: "59ed538734419e81f7fc18c98249ae72c3c7188bdd9dceff2840585227f79843" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: "358c5ce09744e0e08b3f5f38c53d7d26a8219dd641718f8500f49cfa56240358" + sha256: "0e01f805457ef610ccaf8d18067596afc34107a27149778b06b2083edbc140c1" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" shelf: dependency: transitive description: name: shelf - sha256: c0710a5ca61f1a96e9aae37081040f537c1b96265040edeb70c8817a10d361c6 + 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 - sha256: "520368a1a49798425310ca0ee28eb92b3c737e4e9d173c31b6c66fe090ebc6fc" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" source_gen: dependency: transitive description: name: source_gen - sha256: "3e743f02b0916cf719347492bc475f1fc270302c4f650544f16a55e9a463a143" + sha256: "00f8b6b586f724a8c769c96f1d517511a41661c0aede644544d8d86a1ab11142" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.2.2" source_helper: dependency: transitive description: name: source_helper - sha256: "75d50f95956bc6ebdf662d408036c8c9160ccf6e2cd1303006dbc1a188ea53f9" + sha256: "522d9b05c40ec14f479ce4428337d106c0465fedab42f514582c198460a784fe" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: f8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: db47e4797198ee601990820437179bb90219f918962318d494ada2b4b11e6f6d + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - sha256: ed464977cb26a1f41537e177e190c67223dbd9f4f683489b6ab2e5d211ec564e + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4 + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830 + 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: @@ -429,18 +437,18 @@ packages: dependency: transitive description: name: typed_data - sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" watcher: dependency: transitive description: name: watcher - sha256: "68173f2fa67d241323a4123be7ed4e43424c54befa5505d71c8ad4b7baf8f71d" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" web: dependency: transitive description: @@ -453,17 +461,17 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "500e6014efebd305a30ebf1c6006d13faa82dcd85c7a2a7793679a64ed69ec48" + sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.3" yaml: dependency: transitive description: name: yaml - sha256: "3cee79b1715110341012d27756d9bae38e650588acd38d3f3c610822e1337ace" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" sdks: dart: ">=3.2.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index b3bdae3..db20f60 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=3.0.0 <4.0.0' dependencies: - http: ^1.1.2 + http: ^0.13.3 json_annotation: ^4.1.0 dev_dependencies: From d31dca01506378a2961d2506e6d84d586991b23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Wed, 4 Sep 2024 11:59:11 +0300 Subject: [PATCH 5/7] chore: Update dependencies and versions in pubspec.yaml --- example/pubspec.lock | 10 +++++----- pubspec.lock | 14 +++++++------- pubspec.yaml | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 4d14a3a..30a20ff 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -28,10 +28,10 @@ packages: dependency: transitive description: name: http - sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.2.2" http_parser: dependency: transitive description: @@ -100,9 +100,9 @@ packages: dependency: transitive description: name: web - sha256: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "1.0.0" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/pubspec.lock b/pubspec.lock index 136dc63..f1d1212 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -205,10 +205,10 @@ packages: dependency: "direct main" description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -453,18 +453,18 @@ packages: dependency: transitive description: name: web - sha256: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.4.0" yaml: dependency: transitive description: @@ -474,4 +474,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index db20f60..cebcb61 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: faunadb_http -version: 0.14.3 +version: 0.14.4 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 @@ -7,7 +7,7 @@ environment: sdk: '>=3.0.0 <4.0.0' dependencies: - http: ^0.13.3 + http: ^1.2.2 json_annotation: ^4.1.0 dev_dependencies: From bf20162515261ed18120e3434f5e77c5a1fe0c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Sun, 3 Nov 2024 18:04:31 +0300 Subject: [PATCH 6/7] feat: Add Dio client --- .gitignore | 1 + lib/faunadb_http.dart | 5 +- lib/src/FaunaDioClient.dart | 97 +++++++++++++++++++++++++++++++++++++ pubspec.yaml | 3 +- 4 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 lib/src/FaunaDioClient.dart diff --git a/.gitignore b/.gitignore index d152d4b..3cd9f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ doc/ lib/.DS_Store .DS_Store +pubspec.lock 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/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/pubspec.yaml b/pubspec.yaml index cebcb61..62c13f3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: faunadb_http -version: 0.14.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 @@ -9,6 +9,7 @@ environment: dependencies: http: ^1.2.2 json_annotation: ^4.1.0 + dio: ^5.7.0 dev_dependencies: json_serializable: ^5.0.0 From bff7bfa8c0ba938a23b4cbf4cc99713dac09d62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C5=9Fim=20Yerlikaya?= Date: Sun, 3 Nov 2024 18:04:45 +0300 Subject: [PATCH 7/7] refactor: Simplify JSON factory methods and adjust timestamp handling --- lib/src/fql/result.dart | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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); }