Skip to content

Commit

Permalink
fix: Support for UUID changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Oct 30, 2023
1 parent 0596de9 commit 54fcea1
Show file tree
Hide file tree
Showing 19 changed files with 272 additions and 268 deletions.
6 changes: 3 additions & 3 deletions packages/katana_auth/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,21 @@ packages:
path: "../../katana"
relative: true
source: path
version: "2.4.1"
version: "2.4.3"
katana_auth:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.0.16"
version: "2.2.4"
katana_logger:
dependency: "direct overridden"
description:
path: "../../katana_logger"
relative: true
source: path
version: "2.0.13"
version: "2.0.15"
lints:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/katana_auth/lib/src/auth_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class AuthDatabase {
onResetPassword;

String get _uuid {
return debugUserId ?? uuid;
return debugUserId ?? uuid();
}

Future<void> _initialize() async {
Expand Down
4 changes: 2 additions & 2 deletions packages/katana_auth/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ packages:
path: "../katana"
relative: true
source: path
version: "2.4.1"
version: "2.4.3"
katana_logger:
dependency: "direct main"
description:
path: "../katana_logger"
relative: true
source: path
version: "2.0.13"
version: "2.0.15"
lints:
dependency: transitive
description:
Expand Down
28 changes: 14 additions & 14 deletions packages/katana_auth/test/auth_database_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:katana_auth/katana_auth.dart';

void main() {
test("AuthDatabase.create", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand All @@ -30,7 +30,7 @@ void main() {
expect(db.isSignedIn, false);
});
test("AuthDatabase.register", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down Expand Up @@ -70,7 +70,7 @@ void main() {
});
});
test("AuthDatabase.signInWithAnonymously", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand All @@ -97,7 +97,7 @@ void main() {
});
});
test("AuthDatabase.signInWithEmailAndPassword", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down Expand Up @@ -146,7 +146,7 @@ void main() {
});
});
test("AuthDatabase.signInWithEmailLink", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down Expand Up @@ -196,7 +196,7 @@ void main() {
});
test("AuthDatabase.signInWithSms", () async {
const code = "123456";
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
debugSmsCode: code,
Expand Down Expand Up @@ -245,7 +245,7 @@ void main() {
});
});
test("AuthDatabase.reauth", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand All @@ -271,7 +271,7 @@ void main() {
expect(res, true);
});
test("AuthDatabase.reset", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
onResetPassword: (newPassword, locale) async {
Expand Down Expand Up @@ -309,7 +309,7 @@ void main() {
});
});
test("AuthDatabase.verifyEmailAndPassword", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
onVerify: (email, locale) async {
Expand Down Expand Up @@ -344,7 +344,7 @@ void main() {
});
});
test("AuthDatabase.verifyEmailLink", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
onVerify: (email, locale) async {
Expand Down Expand Up @@ -377,7 +377,7 @@ void main() {
});
});
test("AuthDatabase.changeEmail", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down Expand Up @@ -422,7 +422,7 @@ void main() {
expect(db.isSignedIn, true);
});
test("AuthDatabase.changePassword", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down Expand Up @@ -468,7 +468,7 @@ void main() {
});
test("AuthDatabase.changePhoneNumber", () async {
const code = "123456";
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
debugSmsCode: code,
Expand Down Expand Up @@ -532,7 +532,7 @@ void main() {
expect(db.isSignedIn, true);
});
test("AuthDatabase.delete", () async {
final userId = uuid;
final userId = uuid();
final db = AuthDatabase(
debugUserId: userId,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/katana_model/lib/src/model_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class CollectionModelQuery extends ModelQuery {
String? id,
]) {
return DocumentModelQuery(
"${path.trimQuery().trimString("/")}/${id ?? uuid}",
"${path.trimQuery().trimString("/")}/${id ?? uuid()}",
adapter: adapter,
);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/katana_router/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -342,35 +342,35 @@ packages:
path: "../../katana"
relative: true
source: path
version: "2.4.2"
version: "2.4.3"
katana_logger:
dependency: "direct overridden"
description:
path: "../../katana_logger"
relative: true
source: path
version: "2.0.14"
version: "2.0.15"
katana_router:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.0.41"
version: "2.0.43"
katana_router_annotation:
dependency: "direct overridden"
description:
path: "../../katana_router_annotation"
relative: true
source: path
version: "2.0.20"
version: "2.0.22"
katana_router_builder:
dependency: "direct dev"
description:
path: "../../katana_router_builder"
relative: true
source: path
version: "2.0.28"
version: "2.0.30"
lints:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions packages/katana_router/lib/src/app_page_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class AppPageRoute<T> extends Page<T> {
}) {
if (transitionQuery?.transition.isModal ?? false) {
return _ModalPageRoute(
key: key ?? ValueKey(uuid),
key: key ?? ValueKey(uuid()),
builder: builder,
path: path,
transitionQuery: transitionQuery,
Expand All @@ -53,7 +53,7 @@ abstract class AppPageRoute<T> extends Page<T> {
);
} else {
return _DefaultPageRoute(
key: key ?? ValueKey(uuid),
key: key ?? ValueKey(uuid()),
builder: builder,
path: path,
transitionQuery: transitionQuery,
Expand Down
6 changes: 3 additions & 3 deletions packages/katana_router/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,21 @@ packages:
path: "../katana"
relative: true
source: path
version: "2.4.2"
version: "2.4.3"
katana_logger:
dependency: "direct main"
description:
path: "../katana_logger"
relative: true
source: path
version: "2.0.14"
version: "2.0.15"
katana_router_annotation:
dependency: "direct main"
description:
path: "../katana_router_annotation"
relative: true
source: path
version: "2.0.20"
version: "2.0.22"
lints:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions packages/katana_scoped/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,21 @@ packages:
path: "../../katana"
relative: true
source: path
version: "2.4.2"
version: "2.4.3"
katana_logger:
dependency: "direct overridden"
description:
path: "../../katana_logger"
relative: true
source: path
version: "2.0.14"
version: "2.0.15"
katana_scoped:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.0.23"
version: "2.0.29"
lints:
dependency: transitive
description:
Expand Down
Loading

0 comments on commit 54fcea1

Please sign in to comment.