Skip to content

Commit 098f5b2

Browse files
authored
Merge branch 'main' into feat/context-cogs
2 parents 9f33c3f + aac3c03 commit 098f5b2

File tree

7 files changed

+335
-126
lines changed

7 files changed

+335
-126
lines changed

.github/dependency-review/dependency-review-config.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,24 @@ allow-licenses:
2424
- 'Unlicense'
2525
- 'WTFPL'
2626
- 'Zlib'
27+
allow-dependencies-licenses:
28+
# These packages are needed for nextjs (more detailed sharp)
29+
# they are dynamic libraries and thus do not ship the underlying library
30+
# which means they are not under LGPL strictly speaking.
31+
# so an exception is valid here
32+
# ALSO: none of these are shipped to the customer. they're only used as dev dependencies.
33+
- 'pkg:npm/%2540img/sharp-libvips-darwin-arm64@1.2.4'
34+
- 'pkg:npm/%2540img/sharp-libvips-darwin-x64@1.2.4'
35+
- 'pkg:npm/%2540img/sharp-libvips-linux-arm@1.2.4'
36+
- 'pkg:npm/%2540img/sharp-libvips-linux-arm64@1.2.4'
37+
- 'pkg:npm/%2540img/sharp-libvips-linux-ppc64@1.2.4'
38+
- 'pkg:npm/%2540img/sharp-libvips-linux-riscv64@1.2.4'
39+
- 'pkg:npm/%2540img/sharp-libvips-linux-s390x@1.2.4'
40+
- 'pkg:npm/%2540img/sharp-libvips-linux-x64@1.2.4'
41+
- 'pkg:npm/%2540img/sharp-libvips-linuxmusl-arm64@1.2.4'
42+
- 'pkg:npm/%2540img/sharp-libvips-linuxmusl-x64@1.2.4'
43+
- 'pkg:npm/%2540img/sharp-wasm32'
44+
- 'pkg:npm/%2540img/sharp-win32-arm64'
45+
- 'pkg:npm/%2540img/sharp-win32-ia32'
46+
- 'pkg:npm/%2540img/sharp-win32-x64'
47+
- 'pkg:npm/unicode-match-property-value-ecmascript@2.2.1'

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"**/on-headers": "1.1.0",
151151
"**/form-data": "4.0.4",
152152
"tmp": "^0.2.4",
153+
"qs": "^6.14.1",
153154
"js-yaml": "4.1.1"
154155
},
155156
"overrides": {

packages/adapter-nextjs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
This package contains the AWS Amplify Next.js Adapter. For more information on using Next.js in your application please reference the [Amplify Dev Center](https://docs.amplify.aws/javascript/build-a-backend/server-side-rendering/nextjs/).
22

3+
### Licensing Note
4+
Although this repository is released and licensed under the Apache License (see [LICENSE](./LICENSE)), its devDependencies transitively use the third party [sharp](https://sharp.pixelplumbing.com/) project.
5+
6+
The sharp projects prebuilt binaries' licensing includes [LGPL-2.1](https://opensource.org/license/LGPL-2.1) and [LGPL-3.0-or-later](https://opensource.org/license/LGPL-3.0) licenses

packages/adapter-nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "The adapter for the supporting of using Amplify APIs in Next.js.",
66
"peerDependencies": {
77
"aws-amplify": "^6.13.1",
8-
"next": ">=13.5.0 <16.0.0"
8+
"next": ">=13.5.0 <17.0.0"
99
},
1010
"dependencies": {
1111
"aws-jwt-verify": "^4.0.1"
@@ -16,7 +16,7 @@
1616
"@types/react-dom": "^18.2.6",
1717
"aws-amplify": "6.15.9",
1818
"jest-fetch-mock": "3.0.3",
19-
"next": ">= 13.5.0 < 15.0.0"
19+
"next": ">= 13.5.0 <17.0.0"
2020
},
2121
"publishConfig": {
2222
"access": "public"

packages/auth/src/providers/cognito/apis/signInWithRedirect.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,10 @@ const oauthSignIn = async ({
119119
oAuthStore.storeOAuthState(state);
120120
oAuthStore.storePKCE(value);
121121

122-
const params = new URLSearchParams([
123-
['redirect_uri', redirectUri],
124-
['response_type', responseType],
125-
['client_id', clientId],
126-
]);
122+
const params = new URLSearchParams();
123+
params.append('redirect_uri', redirectUri);
124+
params.append('response_type', responseType);
125+
params.append('client_id', clientId);
127126

128127
// Add either identity_provider or idp_identifier, but not both
129128
if (idpIdentifier) {

packages/rtn-push-notification/android/src/main/kotlin/com/amazonaws/amplify/rtnpushnotification/PushNotificationModule.kt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class PushNotificationModule(
116116
"NativeHeadlessTaskKey" to PushNotificationHeadlessTaskService.HEADLESS_TASK_KEY
117117
)
118118

119-
override fun onActivityResult(p0: Activity?, p1: Int, p2: Int, p3: Intent?) {
119+
override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
120120
// noop - only overridden as this class implements ActivityEventListener
121121
}
122122

@@ -157,15 +157,19 @@ class PushNotificationModule(
157157
params
158158
)
159159
})
160-
currentActivity?.intent?.let {
161-
val payload = NotificationPayload.fromIntent(it)
162-
if (payload != null) {
163-
launchNotification = payload.toWritableMap()
164-
// Launch notification opened event is emitted for internal use only
165-
PushNotificationEventManager.sendEvent(
166-
PushNotificationEventType.LAUNCH_NOTIFICATION_OPENED,
167-
payload.toWritableMap()
168-
)
160+
val activity = reactApplicationContext.getCurrentActivity()
161+
if (activity != null) {
162+
val activityIntent = activity.intent
163+
if (activityIntent != null) {
164+
val payload = NotificationPayload.fromIntent(activityIntent)
165+
if (payload != null) {
166+
launchNotification = payload.toWritableMap()
167+
// Launch notification opened event is emitted for internal use only
168+
PushNotificationEventManager.sendEvent(
169+
PushNotificationEventType.LAUNCH_NOTIFICATION_OPENED,
170+
payload.toWritableMap()
171+
)
172+
}
169173
}
170174
}
171175
} else {
@@ -183,6 +187,7 @@ class PushNotificationModule(
183187
}
184188

185189
private fun shouldShowRequestPermissionRationale(): Boolean {
186-
return ActivityCompat.shouldShowRequestPermissionRationale(currentActivity!!, PERMISSION)
190+
val activity = reactApplicationContext.getCurrentActivity() ?: return false
191+
return ActivityCompat.shouldShowRequestPermissionRationale(activity, PERMISSION)
187192
}
188-
}
193+
}

0 commit comments

Comments
 (0)