Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(datastore,analytics,auth,notifications,storage): updated/regene… #5741

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
4 changes: 2 additions & 2 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
with:
sdk: 3.3.0
sdk: 3.5.0

- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # 4.0.0
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
with:
sdk: 3.3.0
sdk: 3.5.0

- name: Setup aft
shell: bash # Run in bash regardless of platform
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/amplify_canaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.19.0"
flutter-version: "3.24.0"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
with:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.19.0"
flutter-version: "3.24.0"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
with:
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.19.0"
flutter-version: "3.24.0"
ios-version:
- "15.0"
- "17.5"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_dart2js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.3.0"
- "3.5.0"
- stable
- beta
browser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_ddc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.3.0"
- "3.5.0"
- stable
- beta
browser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.3.0"
- "3.5.0"
- stable
- beta
# Skips 'beta' tests on PRs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.19.0"
flutter-version: "3.24.0"
# Skips 'beta' tests on PRs
exclude:
- channel: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
Expand Down
2 changes: 1 addition & 1 deletion actions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.5.0

dependencies:
aws_common: ^0.6.1
Expand Down
4 changes: 2 additions & 2 deletions canaries/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: amplified_todo
publish_to: none

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.5.0
flutter: ">=3.24.0"

dependencies:
amplify_analytics_pinpoint: ^2.0.0
Expand Down
2 changes: 1 addition & 1 deletion infra-gen2/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: infra_gen2
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.5.0

dependencies:
amplify_core: any
Expand Down
2 changes: 1 addition & 1 deletion infra/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: infra
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.5.0

dependencies:
amplify_core: any
Expand Down
2 changes: 1 addition & 1 deletion packages/aft/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.1.1
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.5.0

dependencies:
args: ^2.3.0
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify/amplify_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ As always, you can find us on [GitHub](https://github.com/aws-amplify/amplify-fl
## 1.8.0

NOTE: This version has been updated to:
- Flutter: ">=3.19.0"
- flutter: ">=3.24.0"
- Dart ^3.3.0
- Java 17, Kotlin 1.9.10 and Gradle 8.1 for Android projects

Expand Down
4 changes: 2 additions & 2 deletions packages/amplify/amplify_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the Amplify Flutter client libraries.
publish_to: none

environment:
flutter: ">=3.19.0"
sdk: ^3.3.0
flutter: ">=3.24.0"
sdk: ^3.5.0

dependencies:
amplify_analytics_pinpoint: ">=1.0.0-next.8 <1.0.0-next.9"
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify/amplify_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repository: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/am
issue_tracker: https://github.com/aws-amplify/amplify-flutter/issues

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.5.0
flutter: ">=3.24.0"

# Helps `pana` since we do not use Flutter plugins for most platforms
platforms:
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify_core/doc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ issue_tracker: https://github.com/aws-amplify/amplify-flutter/issues
publish_to: none

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.5.0
flutter: ">=3.24.0"

dependencies:
amplify_analytics_pinpoint: any
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/aws-amplify/amplify-flutter/tree/main/packages/am
issue_tracker: https://github.com/aws-amplify/amplify-flutter/issues

environment:
sdk: ^3.3.0
sdk: ^3.5.0

dependencies:
async: ^2.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,45 +85,48 @@ class NativeAuthPluginWrapper(
return
}
MainScope().launch {
nativePlugin.fetchAuthSession() { session ->
val couldNotFetchException = UnknownException("Could not fetch")
val userPoolTokens = if (session.userPoolTokens != null) {
val tokens = FlutterFactory.createAWSCognitoUserPoolTokens(
session.userPoolTokens!!.accessToken,
session.userPoolTokens!!.idToken,
session.userPoolTokens!!.refreshToken
)
AuthSessionResult.success(tokens)
} else {
AuthSessionResult.failure(couldNotFetchException)
}
val awsCredentials: AuthSessionResult<AWSCredentials> =
if (session.awsCredentials != null) {
val sessionCredentials = session.awsCredentials!!
val credentials = AWSCredentials.createAWSCredentials(
sessionCredentials.accessKeyId,
sessionCredentials.secretAccessKey,
sessionCredentials.sessionToken,
if (sessionCredentials.expirationIso8601Utc != null) {
Instant.fromIso8601(
sessionCredentials.expirationIso8601Utc!!
).epochSeconds
} else {
null
}
nativePlugin.fetchAuthSession() { result ->
val session = result.getOrNull()
if(session != null) {
val couldNotFetchException = UnknownException("Could not fetch")
val userPoolTokens = if (session.userPoolTokens != null) {
val tokens = FlutterFactory.createAWSCognitoUserPoolTokens(
session.userPoolTokens!!.accessToken,
session.userPoolTokens!!.idToken,
session.userPoolTokens!!.refreshToken
)
AuthSessionResult.success(credentials)
AuthSessionResult.success(tokens)
} else {
AuthSessionResult.failure(couldNotFetchException)
}
val authSession = FlutterFactory.createAWSCognitoAuthSession(
session.isSignedIn,
AuthSessionResult.success(session.identityId),
awsCredentials,
AuthSessionResult.success(session.userSub),
userPoolTokens
)
onSuccess.accept(authSession)
val awsCredentials: AuthSessionResult<AWSCredentials> =
if (session.awsCredentials != null) {
val sessionCredentials = session.awsCredentials!!
val credentials = AWSCredentials.createAWSCredentials(
sessionCredentials.accessKeyId,
sessionCredentials.secretAccessKey,
sessionCredentials.sessionToken,
if (sessionCredentials.expirationIso8601Utc != null) {
Instant.fromIso8601(
sessionCredentials.expirationIso8601Utc!!
).epochSeconds
} else {
null
}
)
AuthSessionResult.success(credentials)
} else {
AuthSessionResult.failure(couldNotFetchException)
}
val authSession = FlutterFactory.createAWSCognitoAuthSession(
session.isSignedIn,
AuthSessionResult.success(session.identityId),
awsCredentials,
AuthSessionResult.success(session.userSub),
userPoolTokens
)
onSuccess.accept(authSession)
}
}
}
}
Expand Down
Loading