Skip to content

Commit

Permalink
chore: Update RC branch (aws-amplify#872)
Browse files Browse the repository at this point in the history
* chore(datastore): Remove redundant files for the datastore example (aws-amplify#762)

* feat(datastore): Populate belongs-to nested models (aws-amplify#658)

* feat(datastore): Populate has-one and belongs-to nested models

* Nest data under serializedData key and persist modelName

* Resolve comment

* Update packages/amplify_datastore/example/ios/unit_tests/resources/SchemaData.swift

Co-authored-by: Chris F <[email protected]>

* chore(amplify_api): add support for apiName to GraphQL requests (aws-amplify#553)

* fix(amplify_api): prevent some fatal REST errors in Android

Throw ApiException in android when PUT, POST, and PATCH REST requests have no body to prevent fatal error (aws-amplify#661).

* chore(release): 0.2.2 (aws-amplify#781)

* chore(release): missing dependency (aws-amplify#783)

* Bump analytics version

* Fix PR #

* Bump all versions

* Missing bump

* Pin collections

* chore: skip FlutterURLSessionTests (aws-amplify#795)

* chore(lints): Add amplify_lints package (aws-amplify#808)

* Add lints package

* Add missing readme item

* feat(auth): add options to resendSignUpCode (aws-amplify#738)

* feat(auth): add options to resendSignUpCode

* fix: add type export for sing up code options

* chore: fix formatting issues

* chore: update comments for consistency

* chore: rename private method names for consistency

* chore: update comments for consistency

* chore: make ResendSignUpCodeOptions abstract

* chore: update ResendSignUpCodeRequest serializeAsMap

* chore: update ios test

* chore update doc comments

* chore: bump amplify-android to 1.24.0

* chore: remove star import

* feat(auth): add support for options to resetPassword, confirmResetPassword (aws-amplify#743)

* chore: rename confirmPassword to confirmResetPassword

* chore: fix grammatical errors in docs

* feat(auth): add options support for resetPassword, confirmResetPassword

* chore: rename private methods for consistency

* chore: update comments for consistency

* chore: update ios tests

* chore: fix comments

* chore: handle deprecated methods

* separate out deprecated class

* chore: update serializeAsMap for consistency

* chore: properly deprecate confirmPassword

* chore: add deprecation annotation to interface

* chore: bump amplify-android to 1.24.0

* chore: apply suggestions from code review

* feat(auth): add options to updateAttribute, updateAttributes, resendUserAttributeConfirmationCode (aws-amplify#775)

* chore: move attribute types to new dir

* chore: rename fetch attribute classes

* feat: add client metadata to user attribute methods

* deprecate renamed types

* chore: update comments for consistency

* chore: rename methods, tests

* chore: break out depracted classes, make new classes abstract

* chore: revert star import

* chore: bump amplify-android to 1.24.0

* chore: apply suggestions from code review

* chore: remove empty line

* fix(amplify_datastore): ios send modelProviderVersion (aws-amplify#439)

Co-authored-by: Hui Zhao <[email protected]>

* feat(datastore): Add start and stop APIs (aws-amplify#811)

* Convert file to LF mode

* feat(datastore): Add start and stop APIs

* Add docs

* Resolve comments

* chore(analytics): Apply lints (aws-amplify#810)

* Clean up pinpoint

* Clean up pinpoint dart

* Enable CI for analytics

* Add iOS linting

* Clean up

* Update iOS script

* Fix Android melos script

* Update CI order

* Small changes

* Update type

* Add iOS whitespace rules

* Update type

* Apply updated rules

* feat(auth): OIDC/Lambda Support (aws-amplify#777)

* OIDC/Lambda support

* Clean up

* Fix iOS test

* Add unit tests

* Fix Android test

* Fix Android tests

* Refactor and remove AuthToken from the public API

* Remove concurrent guards

* Clean up

* chore: upgrade amplify-android 1.24.1 (aws-amplify#829)

* fix(datastore): return null for list field in nested model (aws-amplify#843)

* fix(datastore): Better loggin on unhandled DataStoreHubEvent (aws-amplify#647)

* fix(datastore): Better loggin on unhandled DataStoreHubEvent

* Print unrecognized event details in iOS

* Resolve comments

* chore(api): Apply lints (aws-amplify#812)

* Clean up pinpoint

* Clean up pinpoint dart

* Update iOS script

* Update CI order

* Add Dart lints to API

* Apply Android/iOS lints to API

* Rename uuid

* Small changes

* Fix scripts

* Clean up

* Fix unit tests

* Continue impl

* Fix android unit tests

* Remove duplicate lint check

* Fix analytics app

* Adjust java options

* Bump java RAM

* Remove concurrency

* Disable gradle daemon

* Update gradle properties

* Update gradle config

* Revert "Update gradle config"

This reverts commit a43ad29.

* Revert gradle changes

* Disable gradle daemon

* Add kotlin style flags

* Disable gradle daemon

* Bump JVM memory

* Change daemon setting

* Adjust JVM memory

* Lint debug only

* Fix API tests

* Bump deps and fix coverage script

* Fix Gradle version

* Revert unnecessary changes

* Update melos postclean files

* Enable fatal infos

* Fix analyze scope

* Fix postbootstrap

* Fix missing sample app

* Fix order in CI

* Revert add sample app

* Revert order change

* Revert license date

* Revert "Revert license date"

This reverts commit 1b93b3f.

* test(DataStore): add local integration tests for datastore (aws-amplify#831)

* chore: add new model types for tests

* test: add tests for model types

* chore: update models for relationship tests

* test: add tests for hasOne, belongsTo

* chore: update models for hasMany tests

* test: add tests for hasMany relationship

* test: add query predicate test for string type

* test: add test for updating an existing model

* chore: skip flaky test on Android

* chore: clean up string predicate tests

* test: add integ tests for int/double query predicates

* chore: remove unused model

* chore: update tests after fix of aws-amplify#511

* chore: refactor model type tests

* chore: add provisioning script

* chore: update relationship tests

* chore: remove skipped test in save

* chore: add delay before clearing datastore

* test: add bool query predicate tests

* chore: update issue link for skipped test

* chore: update test w/ fix of aws-amplify#834

* Apply suggestions from code review

Co-authored-by: Chris F <[email protected]>

* Update packages/amplify_datastore/example/integration_test/model_type_test.dart

Co-authored-by: Chris F <[email protected]>

* Update packages/amplify_datastore/example/integration_test/model_type_test.dart

* chore: update testQueryPredicate for all models

* chore: update comment in bool query tests

* test: add test cases for unicode

* chore: update bool model generation

* chore: update testModelOperations to use getModelType

* test: add edge cases for model type tests

* chore: remove unneeded Map.from

* test: add edge cases to query predicate tests

* chore: update int/double predicate tests to use <>=

* chore: remove unneeded configure calls

* chore: update string between() test

* chore: update relationship tests to check for single model

* test: update observe tests to test all events

* chore: add notes to equality checks

* chore: remove const from test

* chore: remove hard coded length

Co-authored-by: Chris F <[email protected]>

* fix(api): OIDC/Lambda Fixes (aws-amplify#862)

* Clean up pinpoint

* Clean up pinpoint dart

* Update iOS script

* Update CI order

* Add Dart lints to API

* Apply Android/iOS lints to API

* Rename uuid

* Small changes

* Fix scripts

* Clean up

* Fix unit tests

* Continue impl

* Fix android unit tests

* Remove duplicate lint check

* Fix analytics app

* Adjust java options

* Bump java RAM

* Remove concurrency

* Disable gradle daemon

* Update gradle properties

* Update gradle config

* Revert "Update gradle config"

This reverts commit a43ad29.

* Revert gradle changes

* Disable gradle daemon

* Add kotlin style flags

* Disable gradle daemon

* Bump JVM memory

* Change daemon setting

* Adjust JVM memory

* Lint debug only

* Fix API tests

* Bump deps and fix coverage script

* Fix Gradle version

* Revert unnecessary changes

* Update melos postclean files

* Enable fatal infos

* Fix analyze scope

* Fix postbootstrap

* Fix missing sample app

* Fix order in CI

* Revert add sample app

* Revert order change

* Merge branch 'datastore/multiauth' into chore/api-lints

* Revert multiauth

* Fix updateTokens

* Fix GraphQL error decoding

* Fix formatting

* Clean up

* Clean up

* Clean up

* Fix analysis for Flutter 2.5.0

* fix(amplify_datastore): iOS json deserialization (aws-amplify#806)

iOS ONLY fix.  Android was unaffected.

Ensure nested model int types are returned as int instead of double

Consolidate duplicated code for extracting values from Json during serialization step

* chore(release): 0.2.3 (aws-amplify#866)

* fix(example) updates amplify dependencies (aws-amplify#867)

* test(DataStore): add additional local integration tests for datastore (aws-amplify#844)

Co-authored-by: Hui Zhao <[email protected]>
Co-authored-by: Chris F <[email protected]>
Co-authored-by: José Sánchez <[email protected]>
Co-authored-by: Travis Sheppard <[email protected]>
Co-authored-by: Jordan Nelson <[email protected]>
Co-authored-by: Kyle <[email protected]>
Co-authored-by: Dustin Noyes <[email protected]>
  • Loading branch information
8 people authored and Noyes committed Sep 14, 2021
1 parent f065c41 commit d8f8485
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 15 deletions.
8 changes: 8 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ environment:
dependencies:
flutter:
sdk: flutter
<<<<<<< HEAD
file_picker: ^4.0.0
amplify_flutter: 0.2.4
amplify_analytics_pinpoint: 0.2.4
amplify_auth_cognito: 0.2.4
amplify_storage_s3: 0.2.4
=======
file_picker: ^3.0.0-nullsafety.2
amplify_flutter: 0.2.3
amplify_analytics_pinpoint: 0.2.3
amplify_auth_cognito: 0.2.3
amplify_storage_s3: 0.2.3
>>>>>>> chore: Update RC branch (#872)
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify_analytics_pinpoint/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ dependencies {
api amplifyCore

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.amplifyframework:aws-analytics-pinpoint:1.24.1'
implementation 'com.amplifyframework:aws-auth-cognito:1.24.1'
implementation 'com.amplifyframework:aws-analytics-pinpoint:1.25.1'
implementation 'com.amplifyframework:aws-auth-cognito:1.25.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.10.0'
testImplementation 'org.mockito:mockito-inline:3.10.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load '../../../build-support/dependencies.rb'

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint amplify_analytics_pinpoint.podspec' to validate before publishing.
Expand All @@ -18,9 +20,12 @@ This code is the iOS part of the Amplify Flutter Pinpoint Analytics Plugin. The
s.dependency 'Amplify', '~> 1.13.0'
s.dependency 'AmplifyPlugins/AWSPinpointAnalyticsPlugin', '~> 1.13.0'
s.dependency 'amplify_core'
s.dependency 'SwiftLint'
s.dependency 'SwiftFormat/CLI'
s.platform = :ios, '11.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
s.swift_version = $swift_version
s.script_phases = $default_script_phases
end
4 changes: 2 additions & 2 deletions packages/amplify_api/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ dependencies {
api amplifyCore

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.amplifyframework:aws-api:1.24.1"
implementation "com.amplifyframework:aws-api-appsync:1.24.1"
implementation "com.amplifyframework:aws-api:1.25.1"
implementation "com.amplifyframework:aws-api-appsync:1.25.1"
implementation 'androidx.test.ext:junit-ktx:1.1.3'

testImplementation 'junit:junit:4.13.2'
Expand Down
7 changes: 6 additions & 1 deletion packages/amplify_api/ios/amplify_api.podspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load '../../../build-support/dependencies.rb'

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint amplify_api.podspec' to validate before publishing.
Expand All @@ -18,9 +20,12 @@ The API module for Amplify Flutter.
s.dependency 'Amplify', '~> 1.13.0'
s.dependency 'AmplifyPlugins/AWSAPIPlugin', '~> 1.13.0'
s.dependency 'amplify_core'
s.dependency 'SwiftLint'
s.dependency 'SwiftFormat/CLI'
s.platform = :ios, '11.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
s.swift_version = $swift_version
s.script_phases = $default_script_phases
end
2 changes: 1 addition & 1 deletion packages/amplify_auth_cognito/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ android {
dependencies {
api amplifyCore
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.amplifyframework:aws-auth-cognito:1.24.1'
implementation 'com.amplifyframework:aws-auth-cognito:1.25.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.10.0'
testImplementation 'org.mockito:mockito-inline:3.10.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ data class FlutterConfirmResetPasswordRequest(val map: HashMap<String, *>) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ data class FlutterUpdatePasswordRequest(val map: HashMap<String, *>) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,56 @@ class AmplifyAuthCognitoPluginTest {
)
}

@Test
fun confirmResetPasswordWithOptions_returnsSuccess() {
// Arrange
doAnswer { invocation: InvocationOnMock ->
plugin.prepareUpdatePasswordResult(mockResult)
null as Void?
}.`when`(mockAuth).confirmResetPassword(
anyString(),
anyString(),
ArgumentMatchers.any<AWSCognitoAuthConfirmResetPasswordOptions>(),
ArgumentMatchers.any<Action>(),
ArgumentMatchers.any<Consumer<AuthException>>()
)

val clientMetadata = hashMapOf("attribute" to "value")
val options = hashMapOf(
"clientMetadata" to clientMetadata
)
val username = "testUser"
val newPassword = "newPassword"
val confirmationCode = "confirmationCode"
val data: HashMap<*, *> = hashMapOf(
"username" to username,
"newPassword" to newPassword,
"confirmationCode" to "confirmationCode",
"options" to options
)
val arguments: HashMap<String, Any> = hashMapOf("data" to data)
val call = MethodCall("confirmResetPassword", arguments)

// Act
plugin.onMethodCall(call, mockResult)

// Assert
verify(mockResult, times(1)).success(ArgumentMatchers.any<LinkedTreeMap<String, Any>>());

val expectedOptions = AWSCognitoAuthConfirmResetPasswordOptions
.builder()
.metadata(clientMetadata)
.build()

verify(mockAuth).confirmResetPassword(
ArgumentMatchers.eq(newPassword),
ArgumentMatchers.eq(confirmationCode),
ArgumentMatchers.eq(expectedOptions),
ArgumentMatchers.any<Action>(),
ArgumentMatchers.any<Consumer<AuthException>>()
)
}

@Test
fun getCurrentUser_returnsSuccess() {
// Arrange
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify_core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.amplifyframework:core:1.24.1'
implementation 'com.amplifyframework:core:1.25.1'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.10.0'
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify_datastore/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.amplifyframework:aws-datastore:1.24.1"
implementation "com.amplifyframework:aws-api-appsync:1.24.1"
implementation "com.amplifyframework:aws-datastore:1.25.1"
implementation "com.amplifyframework:aws-api-appsync:1.25.1"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.10.0'
testImplementation 'org.mockito:mockito-inline:3.10.0'
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ android {

dependencies {
api amplifyCore
implementation 'com.amplifyframework:core:1.24.1'
implementation 'com.amplifyframework:core:1.25.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.10.0'
testImplementation 'org.mockito:mockito-inline:3.10.0'
testImplementation 'androidx.test:core:1.3.0'
testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'com.amplifyframework:aws-auth-cognito:1.24.1'
testImplementation 'com.amplifyframework:aws-auth-cognito:1.25.1'
}
2 changes: 1 addition & 1 deletion packages/amplify_storage_s3/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ android {
dependencies {
api amplifyCore
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.amplifyframework:aws-storage-s3:1.24.1'
implementation 'com.amplifyframework:aws-storage-s3:1.25.1'
}

0 comments on commit d8f8485

Please sign in to comment.