@aws-amplify/adapter-nextjs 0.0.2-console-preview.047a1dd.0 → 0.0.2-next.3e9fc9c.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.sharedInMemoryStorage
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 { sharedInMemoryStorage } from '@aws-amplify/core';
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
- ? sharedInMemoryStorage
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
@@ -1,112 +1,112 @@
1
1
  {
2
- "author": "Amazon Web Services",
3
- "name": "@aws-amplify/adapter-nextjs",
4
- "description": "The adapter for the supporting of using Amplify APIs in Next.js.",
5
- "peerDependencies": {
6
- "aws-amplify": "^6.0.0",
7
- "next": ">=13.4.0 <14.0.0"
8
- },
9
- "dependencies": {
10
- "cookie": "0.5.0",
11
- "server-only": "^0.0.1"
12
- },
13
- "devDependencies": {
14
- "@types/cookie": "0.5.1",
15
- "@types/node": "^20.3.1",
16
- "@types/react": "^18.2.13",
17
- "@types/react-dom": "^18.2.6",
18
- "aws-amplify": "6.0.1-console-preview.047a1dd.0+047a1dd",
19
- "jest-fetch-mock": "3.0.3",
20
- "next": ">= 13.4.0 < 14.0.0",
21
- "typescript": "5.1.6"
22
- },
23
- "publishConfig": {
24
- "access": "public"
25
- },
26
- "bugs": {
27
- "url": "https://github.com/aws/aws-amplify/issues"
28
- },
29
- "exports": {
30
- ".": {
31
- "types": "./lib-esm/index.d.ts",
32
- "import": "./lib-esm/index.js",
33
- "require": "./lib/index.js"
34
- },
35
- "./with-amplify": {
36
- "types": "./lib-esm/withAmplify.d.ts",
37
- "import": "./lib-esm/withAmplify.js",
38
- "require": "./lib/withAmplify.js"
39
- },
40
- "./package.json": "./package.json"
41
- },
42
- "files": [
43
- "lib",
44
- "lib-esm",
45
- "src",
46
- "withAmplify"
47
- ],
48
- "homepage": "https://aws-amplify.github.io/",
49
- "jest": {
50
- "coveragePathIgnorePatterns": [
51
- "/node_modules/",
52
- "dist",
53
- "lib",
54
- "lib-esm"
55
- ],
56
- "coverageThreshold": {
57
- "global": {
58
- "branches": 100,
59
- "functions": 100,
60
- "lines": 100,
61
- "statements": 100
62
- }
63
- },
64
- "globals": {
65
- "ts-jest": {
66
- "diagnostics": {
67
- "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
68
- },
69
- "tsConfig": false
70
- }
71
- },
72
- "moduleFileExtensions": [
73
- "ts",
74
- "tsx",
75
- "js",
76
- "json",
77
- "jsx"
78
- ],
79
- "testEnvironment": "node",
80
- "testPathIgnorePatterns": [
81
- "xmlParser-fixture.ts",
82
- "testUtils",
83
- "cases"
84
- ],
85
- "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
86
- "testURL": "http://localhost/",
87
- "transform": {
88
- "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
89
- }
90
- },
91
- "license": "Apache-2.0",
92
- "main": "./lib/index.js",
93
- "module": "./lib-esm/index.js",
94
- "sideEffects": false,
95
- "scripts": {
96
- "build": "npm run clean && npm run build:esm && npm run build:cjs",
97
- "build-with-test": "npm test && npm run build",
98
- "build:cjs": "rimraf lib && tsc -m commonjs --outDir lib",
99
- "build:cjs:watch": "rimraf lib && tsc -m commonjs --outDir lib --watch",
100
- "build:esm": "rimraf lib-esm && tsc -m esnext --outDir lib-esm",
101
- "build:esm:watch": "rimraf lib-esm && tsc -m esnext --outDir lib-esm --watch",
102
- "clean": "npm run clean:size && rimraf lib-esm lib",
103
- "clean:size": "rimraf dual-publish-tmp tmp*",
104
- "format": "echo \"Not implemented\"",
105
- "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
106
- "test": "npm run lint && jest -w 1 --coverage",
107
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
108
- },
109
- "typings": "./lib-esm/index.d.ts",
110
- "version": "0.0.2-console-preview.047a1dd.0+047a1dd",
111
- "gitHead": "047a1dd83d54c8f3ee74e0766d96c6a3b9f97f90"
2
+ "author": "Amazon Web Services",
3
+ "name": "@aws-amplify/adapter-nextjs",
4
+ "description": "The adapter for the supporting of using Amplify APIs in Next.js.",
5
+ "peerDependencies": {
6
+ "aws-amplify": "6.0.1-next.3e9fc9c.0+3e9fc9c",
7
+ "next": ">=13.4.0 <14.0.0"
8
+ },
9
+ "dependencies": {
10
+ "cookie": "0.5.0",
11
+ "server-only": "^0.0.1"
12
+ },
13
+ "devDependencies": {
14
+ "@types/cookie": "0.5.1",
15
+ "@types/node": "^20.3.1",
16
+ "@types/react": "^18.2.13",
17
+ "@types/react-dom": "^18.2.6",
18
+ "aws-amplify": "6.0.1-next.3e9fc9c.0+3e9fc9c",
19
+ "jest-fetch-mock": "3.0.3",
20
+ "next": ">= 13.4.0 < 14.0.0",
21
+ "typescript": "5.1.6"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/aws/aws-amplify/issues"
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "types": "./lib-esm/index.d.ts",
32
+ "import": "./lib-esm/index.js",
33
+ "require": "./lib/index.js"
34
+ },
35
+ "./with-amplify": {
36
+ "types": "./lib-esm/withAmplify.d.ts",
37
+ "import": "./lib-esm/withAmplify.js",
38
+ "require": "./lib/withAmplify.js"
39
+ },
40
+ "./package.json": "./package.json"
41
+ },
42
+ "files": [
43
+ "lib",
44
+ "lib-esm",
45
+ "src",
46
+ "withAmplify"
47
+ ],
48
+ "homepage": "https://aws-amplify.github.io/",
49
+ "jest": {
50
+ "coveragePathIgnorePatterns": [
51
+ "/node_modules/",
52
+ "dist",
53
+ "lib",
54
+ "lib-esm"
55
+ ],
56
+ "coverageThreshold": {
57
+ "global": {
58
+ "branches": 100,
59
+ "functions": 100,
60
+ "lines": 100,
61
+ "statements": 100
62
+ }
63
+ },
64
+ "globals": {
65
+ "ts-jest": {
66
+ "diagnostics": {
67
+ "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
68
+ },
69
+ "tsConfig": false
70
+ }
71
+ },
72
+ "moduleFileExtensions": [
73
+ "ts",
74
+ "tsx",
75
+ "js",
76
+ "json",
77
+ "jsx"
78
+ ],
79
+ "testEnvironment": "node",
80
+ "testPathIgnorePatterns": [
81
+ "xmlParser-fixture.ts",
82
+ "testUtils",
83
+ "cases"
84
+ ],
85
+ "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
86
+ "testURL": "http://localhost/",
87
+ "transform": {
88
+ "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
89
+ }
90
+ },
91
+ "license": "Apache-2.0",
92
+ "main": "./lib/index.js",
93
+ "module": "./lib-esm/index.js",
94
+ "sideEffects": false,
95
+ "scripts": {
96
+ "build": "npm run clean && npm run build:esm && npm run build:cjs",
97
+ "build-with-test": "npm test && npm run build",
98
+ "build:cjs": "rimraf lib && tsc -m commonjs --outDir lib",
99
+ "build:cjs:watch": "rimraf lib && tsc -m commonjs --outDir lib --watch",
100
+ "build:esm": "rimraf lib-esm && tsc -m esnext --outDir lib-esm",
101
+ "build:esm:watch": "rimraf lib-esm && tsc -m esnext --outDir lib-esm --watch",
102
+ "clean": "npm run clean:size && rimraf lib-esm lib",
103
+ "clean:size": "rimraf dual-publish-tmp tmp*",
104
+ "format": "echo \"Not implemented\"",
105
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
106
+ "test": "npm run lint && jest -w 1 --coverage",
107
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
108
+ },
109
+ "typings": "./lib-esm/index.d.ts",
110
+ "version": "0.0.2-next.3e9fc9c.0+3e9fc9c",
111
+ "gitHead": "3e9fc9c97b663c0eed710b005c80ebaf899c6f8f"
112
112
  }
@@ -6,7 +6,7 @@ import {
6
6
  createCookieStorageAdapterFromNextServerContext,
7
7
  getAmplifyConfig,
8
8
  } from './utils';
9
- import { sharedInMemoryStorage } from '@aws-amplify/core';
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
- ? sharedInMemoryStorage
78
+ ? MemoryKeyValueStorage
79
79
  : createKeyValueStorageFromCookieStorageAdapter(
80
80
  createCookieStorageAdapterFromNextServerContext(nextServerContext)
81
81
  );