diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fce287d27..e772019d3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,7 +52,7 @@ jobs: branch: master - name: Compute the release tag run: | - echo "release_tag=v`cat packages/cli/pubspec.yaml | sed -nre 's/^version: [^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p'`" >> $GITHUB_ENV + echo "release_tag=v`cat pubspec.yaml | sed -nre 's/^version: [^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p'`" >> $GITHUB_ENV - name: Release uses: softprops/action-gh-release@v1 with: diff --git a/ci/docker-compose.yaml b/ci/docker-compose.yaml index eec190e91..501bae224 100644 --- a/ci/docker-compose.yaml +++ b/ci/docker-compose.yaml @@ -1,8 +1,8 @@ version: "3.3" - + services: postgres: - image: postgres:14.5 + image: postgres:16.2 # command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key container_name: conduit_postgres restart: always @@ -14,5 +14,5 @@ services: ports: - 0.0.0.0:15432:5432 volumes: - - ./ssl/server.crt:/var/lib/postgresql/server.crt:ro - - ./ssl/server.key:/var/lib/postgresql/server.key:ro + - ./ssl/server.crt:/var/lib/postgresql/server.crt:ro + - ./ssl/server.key:/var/lib/postgresql/server.key:ro diff --git a/packages/cli/templates/db/pubspec.yaml b/packages/cli/templates/db/pubspec.yaml index deef6ab03..583a41934 100644 --- a/packages/cli/templates/db/pubspec.yaml +++ b/packages/cli/templates/db/pubspec.yaml @@ -8,10 +8,10 @@ environment: sdk: ">=3.4.0 <4.0.0" dependencies: - conduit: ^5.0.1 - conduit_core: ^5.0.1 - conduit_postgresql: ^5.0.1 + conduit: ^5.1.0 + conduit_core: ^5.1.0 + conduit_postgresql: ^5.1.0 dev_dependencies: test: ^1.25.2 - conduit_test: ^5.0.1 + conduit_test: ^5.1.0 diff --git a/packages/cli/templates/db_and_auth/lib/channel.dart b/packages/cli/templates/db_and_auth/lib/channel.dart index 67962046a..af5a06e8b 100644 --- a/packages/cli/templates/db_and_auth/lib/channel.dart +++ b/packages/cli/templates/db_and_auth/lib/channel.dart @@ -3,6 +3,7 @@ import 'package:wildfire/controller/register_controller.dart'; import 'package:wildfire/controller/user_controller.dart'; import 'package:wildfire/model/user.dart'; import 'package:wildfire/utility/html_template.dart'; + import 'package:wildfire/wildfire.dart'; /// This type initializes an application. @@ -12,7 +13,7 @@ import 'package:wildfire/wildfire.dart'; class WildfireChannel extends ApplicationChannel implements AuthRedirectControllerDelegate { final HTMLRenderer htmlRenderer = HTMLRenderer(); - late final authServer; + late final AuthServer authServer; late ManagedContext context; /// Initialize services in this method. @@ -55,19 +56,19 @@ class WildfireChannel extends ApplicationChannel router .route("/register") .link(() => Authorizer.basic(authServer))! - .link(() => RegisterController(context!, authServer)); + .link(() => RegisterController(context, authServer)); /* Gets profile for user with bearer token */ router .route("/me") .link(() => Authorizer.bearer(authServer))! - .link(() => IdentityController(context!)); + .link(() => IdentityController(context)); /* Gets all users or one specific user by id */ router .route("/users/[:id]") .link(() => Authorizer.bearer(authServer))! - .link(() => UserController(context!, authServer)); + .link(() => UserController(context, authServer)); return router; } diff --git a/packages/cli/templates/db_and_auth/pubspec.yaml b/packages/cli/templates/db_and_auth/pubspec.yaml index d1c031f1d..1b21f3abe 100644 --- a/packages/cli/templates/db_and_auth/pubspec.yaml +++ b/packages/cli/templates/db_and_auth/pubspec.yaml @@ -7,10 +7,10 @@ environment: sdk: ">=3.4.0 <4.0.0" dependencies: - conduit: ^5.0.1 - conduit_core: ^5.0.1 - conduit_postgresql: ^5.0.1 + conduit: ^5.1.0 + conduit_core: ^5.1.0 + conduit_postgresql: ^5.1.0 dev_dependencies: test: ^1.25.2 - conduit_test: ^5.0.1 + conduit_test: ^5.1.0 diff --git a/packages/cli/templates/default/pubspec.yaml b/packages/cli/templates/default/pubspec.yaml index e9c880a2b..33022919a 100644 --- a/packages/cli/templates/default/pubspec.yaml +++ b/packages/cli/templates/default/pubspec.yaml @@ -7,9 +7,9 @@ environment: sdk: ">=3.4.0 <4.0.0" dependencies: - conduit: ^5.0.1 - conduit_core: ^5.0.1 + conduit: ^5.1.0 + conduit_core: ^5.1.0 dev_dependencies: test: ^1.25.2 - conduit_test: ^5.0.1 + conduit_test: ^5.1.0 diff --git a/packages/codable/lib/cast.dart b/packages/codable/lib/cast.dart index 1e782131e..11d286b49 100644 --- a/packages/codable/lib/cast.dart +++ b/packages/codable/lib/cast.dart @@ -154,24 +154,24 @@ class List extends Cast> { } } -class Keyed extends Cast> { +class Keyed extends Cast> { Iterable get keys => _map.keys; final core.Map> _map; const Keyed(core.Map> map) : _map = map; @override - core.Map _cast(dynamic from, core.String context, dynamic key) { - final core.Map result = {}; + core.Map _cast(dynamic from, core.String context, dynamic key) { + final core.Map result = {}; if (from is core.Map) { for (final K key in from.keys as core.Iterable) { if (_map.containsKey(key)) { result[key] = _map[key]!._cast(from[key], "map entry", key); } else { - result[key] = from[key] as V?; + result[key] = from[key] as V; } } return result; } - return throw FailedCast(context, key, "not a map"); + throw FailedCast(context, key, "not a map"); } } diff --git a/packages/codable/lib/src/keyed_archive.dart b/packages/codable/lib/src/keyed_archive.dart index 516747ccb..de3953955 100644 --- a/packages/codable/lib/src/keyed_archive.dart +++ b/packages/codable/lib/src/keyed_archive.dart @@ -26,7 +26,7 @@ import 'package:conduit_codable/src/resolver.dart'; /// final json = json.encode(archive); /// class KeyedArchive extends Object - with MapMixin + with MapBase implements Referencable { /// Use [unarchive] instead. KeyedArchive(this._map) { @@ -391,11 +391,8 @@ class KeyedArchive extends Object /// /// This invokes [Coding.encode] on each value in [value] and adds the map of objects /// to this archive for the key [key]. - void encodeObjectMap(String key, Map? value) { - if (value == null) { - return; - } - + void encodeObjectMap(String key, Map? value) { + if (value == null) return; final object = KeyedArchive({}); value.forEach((k, v) { object[k] = _encodedObject(v); diff --git a/packages/codable/lib/src/list.dart b/packages/codable/lib/src/list.dart index 471063284..04ecb8b87 100644 --- a/packages/codable/lib/src/list.dart +++ b/packages/codable/lib/src/list.dart @@ -9,7 +9,7 @@ import 'package:conduit_codable/src/resolver.dart'; /// /// This object is a [List] that has additional behavior for encoding and decoding [Coding] objects. class ListArchive extends Object - with ListMixin + with ListBase implements Referencable { final List _inner; diff --git a/pubspec.yaml b/pubspec.yaml index 58c971f96..e5241e9e6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: conduit_workspace -version: 5.1.0 +version: 5.1.1 home: https://www.theconduit.dev repository: https://github.com/conduit-dart/conduit issue_tracker: https://github.com/conduit-dart/conduit/issues