@aws-amplify/adapter-nextjs 0.0.2-console-preview.047a1dd.0 → 0.0.2-next.51e478e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -100,7 +100,7 @@ var runWithAmplifyServerContext = function (_a) {
|
|
|
100
100
|
// safe to use the singleton `MemoryKeyValueStorage` here, as the
|
|
101
101
|
// static rendering uses the same unauthenticated role cross-sever.
|
|
102
102
|
nextServerContext === null
|
|
103
|
-
? core_1.
|
|
103
|
+
? core_1.MemoryKeyValueStorage
|
|
104
104
|
: (0, adapter_core_1.createKeyValueStorageFromCookieStorageAdapter)((0, utils_1.createCookieStorageAdapterFromNextServerContext)(nextServerContext));
|
|
105
105
|
credentialsProvider = (0, adapter_core_1.createAWSCredentialsAndIdentityIdProvider)(amplifyConfig.Auth, keyValueStorage);
|
|
106
106
|
tokenProvider = (0, adapter_core_1.createUserPoolsTokenProvider)(amplifyConfig.Auth, keyValueStorage);
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
import { createCookieStorageAdapterFromNextServerContext, getAmplifyConfig, } from './utils';
|
|
40
|
-
import {
|
|
40
|
+
import { MemoryKeyValueStorage } from '@aws-amplify/core';
|
|
41
41
|
import { createAWSCredentialsAndIdentityIdProvider, createKeyValueStorageFromCookieStorageAdapter, createUserPoolsTokenProvider, runWithAmplifyServerContext as runWithAmplifyServerContextCore, } from 'aws-amplify/internals/adapter-core';
|
|
42
42
|
/**
|
|
43
43
|
* Runs the {@link operation} with the the context created from the {@link nextServerContext}.
|
|
@@ -97,7 +97,7 @@ export var runWithAmplifyServerContext = function (_a) {
|
|
|
97
97
|
// safe to use the singleton `MemoryKeyValueStorage` here, as the
|
|
98
98
|
// static rendering uses the same unauthenticated role cross-sever.
|
|
99
99
|
nextServerContext === null
|
|
100
|
-
?
|
|
100
|
+
? MemoryKeyValueStorage
|
|
101
101
|
: createKeyValueStorageFromCookieStorageAdapter(createCookieStorageAdapterFromNextServerContext(nextServerContext));
|
|
102
102
|
credentialsProvider = createAWSCredentialsAndIdentityIdProvider(amplifyConfig.Auth, keyValueStorage);
|
|
103
103
|
tokenProvider = createUserPoolsTokenProvider(amplifyConfig.Auth, keyValueStorage);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@types/node": "^20.3.1",
|
|
16
16
|
"@types/react": "^18.2.13",
|
|
17
17
|
"@types/react-dom": "^18.2.6",
|
|
18
|
-
"aws-amplify": "6.0.1-
|
|
18
|
+
"aws-amplify": "6.0.1-next.51e478e.0+51e478e",
|
|
19
19
|
"jest-fetch-mock": "3.0.3",
|
|
20
20
|
"next": ">= 13.4.0 < 14.0.0",
|
|
21
21
|
"typescript": "5.1.6"
|
|
@@ -107,6 +107,6 @@
|
|
|
107
107
|
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
|
|
108
108
|
},
|
|
109
109
|
"typings": "./lib-esm/index.d.ts",
|
|
110
|
-
"version": "0.0.2-
|
|
111
|
-
"gitHead": "
|
|
110
|
+
"version": "0.0.2-next.51e478e.0+51e478e",
|
|
111
|
+
"gitHead": "51e478eec6b8edc2c21329a0c5d8a3888b8f02b3"
|
|
112
112
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createCookieStorageAdapterFromNextServerContext,
|
|
7
7
|
getAmplifyConfig,
|
|
8
8
|
} from './utils';
|
|
9
|
-
import {
|
|
9
|
+
import { MemoryKeyValueStorage } from '@aws-amplify/core';
|
|
10
10
|
import {
|
|
11
11
|
createAWSCredentialsAndIdentityIdProvider,
|
|
12
12
|
createKeyValueStorageFromCookieStorageAdapter,
|
|
@@ -75,7 +75,7 @@ export const runWithAmplifyServerContext: NextServer.RunOperationWithContext =
|
|
|
75
75
|
// safe to use the singleton `MemoryKeyValueStorage` here, as the
|
|
76
76
|
// static rendering uses the same unauthenticated role cross-sever.
|
|
77
77
|
nextServerContext === null
|
|
78
|
-
?
|
|
78
|
+
? MemoryKeyValueStorage
|
|
79
79
|
: createKeyValueStorageFromCookieStorageAdapter(
|
|
80
80
|
createCookieStorageAdapterFromNextServerContext(nextServerContext)
|
|
81
81
|
);
|