From 32908a74332029b22a5f64f9dce6ba1312308927 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 11:19:48 +0530 Subject: [PATCH 01/12] fix: added unit test --- .../service/notification_service_impl.dart | 2 + .../notify_request_transformer.dart | 8 +- .../test/notification_service_test.dart | 98 ++++++++++++++++++- 3 files changed, 102 insertions(+), 6 deletions(-) diff --git a/packages/at_client/lib/src/service/notification_service_impl.dart b/packages/at_client/lib/src/service/notification_service_impl.dart index ca8178970..c7399fc8e 100644 --- a/packages/at_client/lib/src/service/notification_service_impl.dart +++ b/packages/at_client/lib/src/service/notification_service_impl.dart @@ -319,6 +319,7 @@ class NotificationServiceImpl true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter + bool encryptValue = true, Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}) async { @@ -331,6 +332,7 @@ class NotificationServiceImpl } try { + notificationParams.atKey.metadata.isEncrypted = encryptValue; // If sharedBy atSign is null, default to current atSign. if (notificationParams.atKey.sharedBy.isNull) { notificationParams.atKey.sharedBy = _atClient.getCurrentAtSign(); diff --git a/packages/at_client/lib/src/transformer/request_transformer/notify_request_transformer.dart b/packages/at_client/lib/src/transformer/request_transformer/notify_request_transformer.dart index 4880a7281..5fd9df181 100644 --- a/packages/at_client/lib/src/transformer/request_transformer/notify_request_transformer.dart +++ b/packages/at_client/lib/src/transformer/request_transformer/notify_request_transformer.dart @@ -26,10 +26,14 @@ class NotificationRequestTransformer // prepares notification builder NotifyVerbBuilder builder = await _prepareNotificationBuilder( notificationParams, atClientPreference); - // If notification value is not null, encrypt the value - if (notificationParams.value.isNotNull) { + // If notification value is set and metadata.isEncrypted is true, encrypt + // the value. + if (notificationParams.value.isNotNull && + notificationParams.atKey.metadata.isEncrypted) { builder.value = await _encryptNotificationValue( notificationParams.atKey, notificationParams.value!); + } else { + builder.value = notificationParams.value; } // add metadata to notify verb builder. // Encrypt the data and then call addMetadataToBuilder method inorder to diff --git a/packages/at_client/test/notification_service_test.dart b/packages/at_client/test/notification_service_test.dart index 9e3e9093e..679f92436 100644 --- a/packages/at_client/test/notification_service_test.dart +++ b/packages/at_client/test/notification_service_test.dart @@ -25,6 +25,8 @@ class MockLocalSecondary extends Mock implements LocalSecondary { SecondaryKeyStore? keyStore = MockSecondaryKeyStore(); } +class MockRemoteSecondary extends Mock implements RemoteSecondary {} + class MockAtClientImpl extends Mock implements AtClientImpl { @override String? getCurrentAtSign() { @@ -101,8 +103,7 @@ void main() { AtKeyEncryptionManager mockAtKeyEncryptionManager = MockAtKeyEncryptionManager(); AtLookupImpl mockAtLookupImpl = MockAtLookupImpl(); - - group('A group of test to validate notification request processor', () { + group('A group of test to validate notification request transformer', () { var value = '+91908909933'; late SharedKeyEncryption mockSharedKeyEncryptionImpl; setUp(() { @@ -129,7 +130,7 @@ void main() { }); test( - 'A test to validate notification request with value return verb builder', + 'A test to validate notification request with unencrypted value return verb builder', () async { var notificationParams = NotificationParams.forUpdate( (AtKey.shared('phone', namespace: 'wavi')..sharedWith('@bob')) @@ -150,9 +151,37 @@ void main() { expect(notifyVerbBuilder.messageType, MessageTypeEnum.key); expect(notifyVerbBuilder.priority, PriorityEnum.high); expect(notifyVerbBuilder.strategy, StrategyEnum.latest); + expect(notifyVerbBuilder.value, value); + expect(notifyVerbBuilder.notifier, 'test-notifier'); + expect(notifyVerbBuilder.latestN, 2); + expect(notifyVerbBuilder.ttln, Duration(minutes: 1).inMilliseconds); + }); + + test( + 'A test to validate notification request with encrypted value return verb builder', + () async { + var notificationParams = NotificationParams.forUpdate( + (AtKey.shared('phone', namespace: 'wavi')..sharedWith('@bob')) + .build(), + value: value, + priority: PriorityEnum.high, + strategy: StrategyEnum.latest, + notifier: 'test-notifier', + latestN: 2, + notificationExpiry: Duration(minutes: 1)); + notificationParams.atKey.metadata.isEncrypted = true; + var notifyVerbBuilder = await NotificationRequestTransformer( + '@alice', + AtClientPreference()..namespace = 'wavi', + mockSharedKeyEncryptionImpl) + .transform(notificationParams); + expect(notifyVerbBuilder.atKey.key, 'phone.wavi'); + expect(notifyVerbBuilder.atKey.sharedWith, '@bob'); + expect(notifyVerbBuilder.messageType, MessageTypeEnum.key); + expect(notifyVerbBuilder.priority, PriorityEnum.high); + expect(notifyVerbBuilder.strategy, StrategyEnum.latest); expect(notifyVerbBuilder.value, 'encryptedValue'); expect(notifyVerbBuilder.atKey.metadata.sharedKeyEnc, 'sharedKeyEnc'); - expect(notifyVerbBuilder.atKey.metadata.pubKeyCS, 'publicKeyCS'); expect(notifyVerbBuilder.notifier, 'test-notifier'); expect(notifyVerbBuilder.latestN, 2); expect(notifyVerbBuilder.ttln, Duration(minutes: 1).inMilliseconds); @@ -217,6 +246,67 @@ void main() { e is SecondaryConnectException && e.message == 'Unable to connect to secondary server'))); }); + + test( + 'A test to validate encrypted value and shared encryption key is set in verb builder when isEncrypted is set to true in metadata', + () async { + var notificationParams = NotificationParams.forUpdate( + (AtKey.shared('phone', namespace: 'wavi')..sharedWith('@bob')) + .build(), + value: value, + priority: PriorityEnum.high, + strategy: StrategyEnum.latest, + notifier: 'test-notifier', + latestN: 2, + notificationExpiry: Duration(minutes: 1)); + notificationParams.atKey.metadata.isEncrypted = true; + var notifyVerbBuilder = await NotificationRequestTransformer( + '@alice', + AtClientPreference()..namespace = 'wavi', + mockSharedKeyEncryptionImpl) + .transform(notificationParams); + expect(notifyVerbBuilder.value, 'encryptedValue'); + expect(notifyVerbBuilder.atKey.metadata.sharedKeyEnc, 'sharedKeyEnc'); + }); + test( + 'A test to validate unencrypted value is set in verb builder when isEncrypted is set to false in metadata', + () async { + var notificationParams = NotificationParams.forUpdate( + (AtKey.shared('phone', namespace: 'wavi')..sharedWith('@bob')) + .build(), + value: value, + priority: PriorityEnum.high, + strategy: StrategyEnum.latest, + notifier: 'test-notifier', + latestN: 2, + notificationExpiry: Duration(minutes: 1)); + notificationParams.atKey.metadata.isEncrypted = false; + var notifyVerbBuilder = await NotificationRequestTransformer( + '@alice', + AtClientPreference()..namespace = 'wavi', + mockSharedKeyEncryptionImpl) + .transform(notificationParams); + expect(notifyVerbBuilder.value, value); + }); + test( + 'A test to validate unencrypted value is set in verb builder when isEncrypted is NOT set in metadata', + () async { + var notificationParams = NotificationParams.forUpdate( + (AtKey.shared('phone', namespace: 'wavi')..sharedWith('@bob')) + .build(), + value: value, + priority: PriorityEnum.high, + strategy: StrategyEnum.latest, + notifier: 'test-notifier', + latestN: 2, + notificationExpiry: Duration(minutes: 1)); + var notifyVerbBuilder = await NotificationRequestTransformer( + '@alice', + AtClientPreference()..namespace = 'wavi', + mockSharedKeyEncryptionImpl) + .transform(notificationParams); + expect(notifyVerbBuilder.value, value); + }); }); group('A group of test to validate notification response transformer', () { From a7381c6d9de99ecdc50dbb3adce5c7e0d56095cf Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 12:44:39 +0530 Subject: [PATCH 02/12] fix: added functional test --- .../lib/src/service/notification_service.dart | 1 + .../test/test_utils/no_op_services.dart | 1 + .../test/atclient_notify_test.dart | 29 ++++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/packages/at_client/lib/src/service/notification_service.dart b/packages/at_client/lib/src/service/notification_service.dart index 450aaccde..0955b901c 100644 --- a/packages/at_client/lib/src/service/notification_service.dart +++ b/packages/at_client/lib/src/service/notification_service.dart @@ -93,6 +93,7 @@ abstract class NotificationService { true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter + bool encryptValue = true, Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}); diff --git a/packages/at_client/test/test_utils/no_op_services.dart b/packages/at_client/test/test_utils/no_op_services.dart index e686f8a1e..9be915b00 100644 --- a/packages/at_client/test/test_utils/no_op_services.dart +++ b/packages/at_client/test/test_utils/no_op_services.dart @@ -33,6 +33,7 @@ class NoOpNotificationService implements NotificationService { Future notify(NotificationParams notificationParams, {bool waitForFinalDeliveryStatus = true, bool checkForFinalDeliveryStatus = true, + bool encryptValue = true, Function(NotificationResult p1)? onSuccess, Function(NotificationResult p1)? onError, Function(NotificationResult p1)? onSentToSecondary}) { diff --git a/tests/at_functional_test/test/atclient_notify_test.dart b/tests/at_functional_test/test/atclient_notify_test.dart index 63cc69be9..b1c8502af 100644 --- a/tests/at_functional_test/test/atclient_notify_test.dart +++ b/tests/at_functional_test/test/atclient_notify_test.dart @@ -83,6 +83,25 @@ void main() { .notify(NotificationParams.forUpdate(phoneKey, value: value)); }); + test('verify unencrypted value is returned when encryptValue is set to false', + () async { + var phoneKey = AtKey() + ..key = 'phone' + ..sharedWith = sharedWithAtSign + ..namespace = namespace; + var value = '+1 100 200 300'; + var notificationResult = await atClientManager.atClient.notificationService + .notify(NotificationParams.forUpdate(phoneKey, value: value), + encryptValue: false); + var notificationId = notificationResult.notificationID; + var notification = await atClientManager.atClient.notificationService + .fetch(notificationId); + print('Notification ID: ${notification.id}'); + print('Notification value: ${notification.value}'); + print('Notification key: ${notification.key}'); + expect(notification.value, value); + }); + test('notify deletion of a key to sharedWith atSign', () async { var phoneKey = AtKey() ..key = 'phone' @@ -217,12 +236,10 @@ void main() { } }); - group('A group of tests for notification fetch', () { + group('A group of tests for notification fetch', () { test('A test to verify non existent notification', () async { await AtClientManager.getInstance().setCurrentAtSign( - currentAtSign, - namespace, - TestUtils.getPreference(currentAtSign)); + currentAtSign, namespace, TestUtils.getPreference(currentAtSign)); var notificationResult = await AtClientManager.getInstance() .atClient .notificationService @@ -235,9 +252,7 @@ void main() { for (int i = 0; i < 10; i++) { print('Testing notification expiry - test run #$i'); await AtClientManager.getInstance().setCurrentAtSign( - currentAtSign, - namespace, - TestUtils.getPreference(currentAtSign)); + currentAtSign, namespace, TestUtils.getPreference(currentAtSign)); var atKey = (AtKey.shared('test-notification-expiry', namespace: 'wavi', sharedBy: currentAtSign) ..sharedWith(sharedWithAtSign)) From 5c1b45c32cf26376586db5ba667e558e7d026bf5 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 13:19:04 +0530 Subject: [PATCH 03/12] fix: unit test to check notification encryption --- .../at_functional_test/test/atclient_notify_test.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/at_functional_test/test/atclient_notify_test.dart b/tests/at_functional_test/test/atclient_notify_test.dart index b1c8502af..ba8efbf65 100644 --- a/tests/at_functional_test/test/atclient_notify_test.dart +++ b/tests/at_functional_test/test/atclient_notify_test.dart @@ -79,8 +79,13 @@ void main() { ..sharedWith = sharedWithAtSign ..namespace = namespace; var value = '+1 100 200 300'; - await atClientManager.atClient.notificationService + var notificationResult = await atClientManager.atClient.notificationService .notify(NotificationParams.forUpdate(phoneKey, value: value)); + var notification = await atClientManager.atClient.notificationService + .fetch(notificationResult.notificationID); + print(notification.value); + // encrypted value should not be equal to actual value + expect(notification.value == value, false); }); test('verify unencrypted value is returned when encryptValue is set to false', @@ -96,9 +101,6 @@ void main() { var notificationId = notificationResult.notificationID; var notification = await atClientManager.atClient.notificationService .fetch(notificationId); - print('Notification ID: ${notification.id}'); - print('Notification value: ${notification.value}'); - print('Notification key: ${notification.key}'); expect(notification.value, value); }); From b52f2c94112498f5714a88317e007705849c0ca5 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 15:20:24 +0530 Subject: [PATCH 04/12] fix: added changes to publish --- packages/at_client/CHANGELOG.md | 2 ++ packages/at_client/lib/src/preference/at_client_config.dart | 2 +- packages/at_client/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/at_client/CHANGELOG.md b/packages/at_client/CHANGELOG.md index 002a402cc..2ea62a765 100644 --- a/packages/at_client/CHANGELOG.md +++ b/packages/at_client/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.2.1 +- feat: add optional param `encryptValue` to notify method ## 3.2.0 - feat: add `allowAll` flag (defaults to false) to AtRpc ## 3.1.0 diff --git a/packages/at_client/lib/src/preference/at_client_config.dart b/packages/at_client/lib/src/preference/at_client_config.dart index ee55fc1e2..78c05dd9b 100644 --- a/packages/at_client/lib/src/preference/at_client_config.dart +++ b/packages/at_client/lib/src/preference/at_client_config.dart @@ -10,7 +10,7 @@ class AtClientConfig { /// Represents the at_client version. /// Must always be the same as the actual version in pubspec.yaml - final String atClientVersion = '3.2.0'; + final String atClientVersion = '3.2.1'; /// Represents the client commit log compaction time interval /// diff --git a/packages/at_client/pubspec.yaml b/packages/at_client/pubspec.yaml index 853afc466..0ed58bbde 100644 --- a/packages/at_client/pubspec.yaml +++ b/packages/at_client/pubspec.yaml @@ -4,7 +4,7 @@ description: The at_client library is the non-platform specific Client SDK which ## ## ## NB: When incrementing the version, please also increment the version in AtClientConfig file -version: 3.2.0 +version: 3.2.1 ## NB: When incrementing the version, please also increment the version in AtClientConfig file ## From 679bf08c742567fbf7931795992076b220d7efd2 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 22:26:53 +0530 Subject: [PATCH 05/12] fix: review comments --- packages/at_client/lib/src/service/notification_service.dart | 2 +- .../at_client/lib/src/service/notification_service_impl.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/at_client/lib/src/service/notification_service.dart b/packages/at_client/lib/src/service/notification_service.dart index 0955b901c..48e6fffcb 100644 --- a/packages/at_client/lib/src/service/notification_service.dart +++ b/packages/at_client/lib/src/service/notification_service.dart @@ -93,7 +93,7 @@ abstract class NotificationService { true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter - bool encryptValue = true, + bool encryptValue = true, // this was the behaviour before introducing this parameter Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}); diff --git a/packages/at_client/lib/src/service/notification_service_impl.dart b/packages/at_client/lib/src/service/notification_service_impl.dart index c7399fc8e..8b7d5f5f0 100644 --- a/packages/at_client/lib/src/service/notification_service_impl.dart +++ b/packages/at_client/lib/src/service/notification_service_impl.dart @@ -319,7 +319,7 @@ class NotificationServiceImpl true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter - bool encryptValue = true, + bool encryptValue = true, // this was the behaviour before introducing this parameter Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}) async { From c78b8d7b36aade21832c7bfa160c48c0357255c4 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 9 Sep 2024 22:38:36 +0530 Subject: [PATCH 06/12] fix: analyzer issue --- packages/at_client/lib/src/service/notification_service.dart | 3 ++- .../at_client/lib/src/service/notification_service_impl.dart | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/at_client/lib/src/service/notification_service.dart b/packages/at_client/lib/src/service/notification_service.dart index 48e6fffcb..2bfe2afdd 100644 --- a/packages/at_client/lib/src/service/notification_service.dart +++ b/packages/at_client/lib/src/service/notification_service.dart @@ -93,7 +93,8 @@ abstract class NotificationService { true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter - bool encryptValue = true, // this was the behaviour before introducing this parameter + bool encryptValue = + true, // this was the behaviour before introducing this parameter Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}); diff --git a/packages/at_client/lib/src/service/notification_service_impl.dart b/packages/at_client/lib/src/service/notification_service_impl.dart index 8b7d5f5f0..12ffba684 100644 --- a/packages/at_client/lib/src/service/notification_service_impl.dart +++ b/packages/at_client/lib/src/service/notification_service_impl.dart @@ -319,7 +319,8 @@ class NotificationServiceImpl true, // this was the behaviour before introducing this parameter bool checkForFinalDeliveryStatus = true, // this was the behaviour before introducing this parameter - bool encryptValue = true, // this was the behaviour before introducing this parameter + bool encryptValue = + true, // this was the behaviour before introducing this parameter Function(NotificationResult)? onSuccess, Function(NotificationResult)? onError, Function(NotificationResult)? onSentToSecondary}) async { From c084e22f7325b384c34f399bb77bfd05a4c102d9 Mon Sep 17 00:00:00 2001 From: Murali Date: Tue, 10 Sep 2024 22:28:33 +0530 Subject: [PATCH 07/12] fix: add end2end test for notify encrypt value set to false --- tests/at_end2end_test/test/notify_test.dart | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/at_end2end_test/test/notify_test.dart b/tests/at_end2end_test/test/notify_test.dart index 494fc714c..9322f9f2e 100644 --- a/tests/at_end2end_test/test/notify_test.dart +++ b/tests/at_end2end_test/test/notify_test.dart @@ -66,5 +66,48 @@ void main() async { expect(notificationListJson[0]['from'], currentAtSign); expect(notificationListJson[0]['to'], sharedWithAtSign); expect(notificationListJson[0]['value'], isNotEmpty); + expect(notificationListJson[0]['value'] != value, + true); //encrypted value should be different from actual value + }); + test('Notify a key with value by setting encryptValue to false', () async { + var uuid = Uuid(); + // Generate uuid + var randomValue = uuid.v4(); + var phoneKey = AtKey() + ..key = 'phone$randomValue' + ..sharedWith = sharedWithAtSign + ..metadata = (Metadata()..ttr = 60000) + ..namespace = namespace; + + // Appending a random number as a last number to generate a new phone number + // for each run. + var value = '+1 100 200 30'; + // Setting currentAtSign atClient instance to context. + currentAtClientManager = await AtClientManager.getInstance() + .setCurrentAtSign(currentAtSign, namespace, + TestPreferences.getInstance().getPreference(currentAtSign)); + final notificationResult = await currentAtClientManager + .atClient.notificationService + .notify(NotificationParams.forUpdate(phoneKey, value: value), + encryptValue: false); + expect(notificationResult, isNotNull); + expect(notificationResult.notificationStatusEnum, + NotificationStatusEnum.delivered); + + // Setting sharedWithAtSign atClient instance to context. + await AtClientManager.getInstance().setCurrentAtSign( + sharedWithAtSign, + namespace, + TestPreferences.getInstance().getPreference(sharedWithAtSign)); + var notificationListResult = await AtClientManager.getInstance() + .atClient + .notifyList(regex: 'phone$randomValue'); + expect(notificationListResult, isNotEmpty); + notificationListResult = notificationListResult.replaceFirst('data:', ''); + final notificationListJson = jsonDecode(notificationListResult); + print(notificationListJson); + expect(notificationListJson[0]['from'], currentAtSign); + expect(notificationListJson[0]['to'], sharedWithAtSign); + expect(notificationListJson[0]['value'], value); }); } From 70a09b1226232f4f7b26b7b562c91a947f0f7cad Mon Sep 17 00:00:00 2001 From: Murali Date: Thu, 12 Sep 2024 16:21:06 +0530 Subject: [PATCH 08/12] fix: add dependency overrides for at_commons --- tests/at_end2end_test/pubspec.yaml | 7 +++++++ tests/at_end2end_test/test/notify_test.dart | 1 + 2 files changed, 8 insertions(+) diff --git a/tests/at_end2end_test/pubspec.yaml b/tests/at_end2end_test/pubspec.yaml index 8c2f159b3..0fc102d9f 100644 --- a/tests/at_end2end_test/pubspec.yaml +++ b/tests/at_end2end_test/pubspec.yaml @@ -14,6 +14,13 @@ dependencies: at_client: path: ../../packages/at_client +dependency_overrides: + at_commons: + git: + url: https://github.com/atsign-foundation/at_commons + ref: notify_isencrypted + path: packages/at_commons + dev_dependencies: test: ^1.24.3 lints: ^2.0.0 diff --git a/tests/at_end2end_test/test/notify_test.dart b/tests/at_end2end_test/test/notify_test.dart index 9322f9f2e..92b0148aa 100644 --- a/tests/at_end2end_test/test/notify_test.dart +++ b/tests/at_end2end_test/test/notify_test.dart @@ -108,6 +108,7 @@ void main() async { print(notificationListJson); expect(notificationListJson[0]['from'], currentAtSign); expect(notificationListJson[0]['to'], sharedWithAtSign); + expect(notificationListJson[0]['isEncrypted'], 'false'); expect(notificationListJson[0]['value'], value); }); } From b817b987d06476ff1336b8c831ac18fd3e18774c Mon Sep 17 00:00:00 2001 From: Murali Date: Thu, 12 Sep 2024 16:31:09 +0530 Subject: [PATCH 09/12] fix: git url issue --- tests/at_end2end_test/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/at_end2end_test/pubspec.yaml b/tests/at_end2end_test/pubspec.yaml index 0fc102d9f..27b6d86cd 100644 --- a/tests/at_end2end_test/pubspec.yaml +++ b/tests/at_end2end_test/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: dependency_overrides: at_commons: git: - url: https://github.com/atsign-foundation/at_commons + url: https://github.com/atsign-foundation/at_libraries.git ref: notify_isencrypted path: packages/at_commons From b8cac2f7b11196f71bf2266842d9be2b6aac35e6 Mon Sep 17 00:00:00 2001 From: Murali Date: Thu, 12 Sep 2024 16:40:37 +0530 Subject: [PATCH 10/12] fix: change string to bool type in end2endtest check --- tests/at_end2end_test/test/notify_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/at_end2end_test/test/notify_test.dart b/tests/at_end2end_test/test/notify_test.dart index 92b0148aa..61937ac04 100644 --- a/tests/at_end2end_test/test/notify_test.dart +++ b/tests/at_end2end_test/test/notify_test.dart @@ -108,7 +108,7 @@ void main() async { print(notificationListJson); expect(notificationListJson[0]['from'], currentAtSign); expect(notificationListJson[0]['to'], sharedWithAtSign); - expect(notificationListJson[0]['isEncrypted'], 'false'); + expect(notificationListJson[0]['isEncrypted'], false); expect(notificationListJson[0]['value'], value); }); } From e77700f389c810ff612410494a1af2ba5e54a89a Mon Sep 17 00:00:00 2001 From: Murali Date: Thu, 12 Sep 2024 23:11:43 +0530 Subject: [PATCH 11/12] fix: upgrade packages and remove dependency overrides --- packages/at_client/pubspec.yaml | 10 +++++----- tests/at_end2end_test/pubspec.yaml | 7 ------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/at_client/pubspec.yaml b/packages/at_client/pubspec.yaml index 0ed58bbde..df8a0c824 100644 --- a/packages/at_client/pubspec.yaml +++ b/packages/at_client/pubspec.yaml @@ -31,13 +31,13 @@ dependencies: async: ^2.9.0 at_utf7: ^1.0.0 at_base2e15: ^1.0.0 - at_commons: ^4.0.6 - at_utils: ^3.0.16 + at_commons: ^4.1.1 + at_utils: ^3.0.18 at_chops: ^2.0.0 - at_lookup: ^3.0.46 - at_auth: ^2.0.4 + at_lookup: ^3.0.48 + at_auth: ^2.0.5 at_persistence_spec: ^2.0.14 - at_persistence_secondary_server: ^3.0.62 + at_persistence_secondary_server: ^3.0.63 meta: ^1.8.0 version: ^3.0.2 diff --git a/tests/at_end2end_test/pubspec.yaml b/tests/at_end2end_test/pubspec.yaml index 27b6d86cd..8c2f159b3 100644 --- a/tests/at_end2end_test/pubspec.yaml +++ b/tests/at_end2end_test/pubspec.yaml @@ -14,13 +14,6 @@ dependencies: at_client: path: ../../packages/at_client -dependency_overrides: - at_commons: - git: - url: https://github.com/atsign-foundation/at_libraries.git - ref: notify_isencrypted - path: packages/at_commons - dev_dependencies: test: ^1.24.3 lints: ^2.0.0 From 1721106add8e7b5b0bb97bfe3d7db49a848f0ebe Mon Sep 17 00:00:00 2001 From: Murali Date: Fri, 13 Sep 2024 11:09:22 +0530 Subject: [PATCH 12/12] fix: changelog for dependency version upgrade --- packages/at_client/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/at_client/CHANGELOG.md b/packages/at_client/CHANGELOG.md index 2ea62a765..9cb8eb555 100644 --- a/packages/at_client/CHANGELOG.md +++ b/packages/at_client/CHANGELOG.md @@ -1,5 +1,11 @@ ## 3.2.1 - feat: add optional param `encryptValue` to notify method +- build[deps]: Upgraded dependencies for the following packages: + - at_commons to v4.1.1 + - at_utils to v3.0.18 + - at_lookup to v3.0.48 + - at_auth to v2.0.5 + - at_persistence_secondary_server to v3.0.63 ## 3.2.0 - feat: add `allowAll` flag (defaults to false) to AtRpc ## 3.1.0