@aws-amplify/adapter-nextjs 1.0.1-unstable.cfbde4c.0 → 1.0.1

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.
Files changed (107) hide show
  1. package/api/package.json +4 -4
  2. package/{lib → dist/cjs}/api/createServerRunnerForAPI.js +3 -2
  3. package/dist/cjs/api/createServerRunnerForAPI.js.map +1 -0
  4. package/{lib → dist/cjs}/api/generateServerClient.js +3 -2
  5. package/dist/cjs/api/generateServerClient.js.map +1 -0
  6. package/{lib → dist/cjs}/api/index.js +3 -2
  7. package/dist/cjs/api/index.js.map +1 -0
  8. package/{lib → dist/cjs}/createServerRunner.js +4 -10
  9. package/dist/cjs/createServerRunner.js.map +1 -0
  10. package/{lib → dist/cjs}/index.js +3 -2
  11. package/dist/cjs/index.js.map +1 -0
  12. package/{lib → dist/cjs}/types/NextServer.js +3 -2
  13. package/dist/cjs/types/NextServer.js.map +1 -0
  14. package/{lib → dist/cjs}/types/index.js +3 -2
  15. package/dist/cjs/types/index.js.map +1 -0
  16. package/{lib → dist/cjs}/utils/createCookieStorageAdapterFromNextServerContext.js +5 -4
  17. package/dist/cjs/utils/createCookieStorageAdapterFromNextServerContext.js.map +1 -0
  18. package/{lib → dist/cjs}/utils/createRunWithAmplifyServerContext.js +3 -2
  19. package/dist/cjs/utils/createRunWithAmplifyServerContext.js.map +1 -0
  20. package/{lib → dist/cjs}/utils/getAmplifyConfig.js +3 -2
  21. package/dist/cjs/utils/getAmplifyConfig.js.map +1 -0
  22. package/{lib → dist/cjs}/utils/index.js +3 -2
  23. package/dist/cjs/utils/index.js.map +1 -0
  24. package/{lib-esm/api/createServerRunnerForAPI.js → dist/esm/api/createServerRunnerForAPI.mjs} +7 -3
  25. package/dist/esm/api/createServerRunnerForAPI.mjs.map +1 -0
  26. package/{lib-esm/api/generateServerClient.js → dist/esm/api/generateServerClient.mjs} +14 -8
  27. package/dist/esm/api/generateServerClient.mjs.map +1 -0
  28. package/dist/esm/api/index.mjs +2 -0
  29. package/dist/esm/api/index.mjs.map +1 -0
  30. package/{lib-esm/createServerRunner.js → dist/esm/createServerRunner.mjs} +8 -11
  31. package/dist/esm/createServerRunner.mjs.map +1 -0
  32. package/dist/esm/index.mjs +2 -0
  33. package/dist/esm/index.mjs.map +1 -0
  34. package/{lib-esm → dist/esm}/types/NextServer.d.ts +2 -2
  35. package/dist/esm/types/NextServer.mjs +2 -0
  36. package/dist/esm/types/NextServer.mjs.map +1 -0
  37. package/dist/esm/types/index.mjs +2 -0
  38. package/dist/esm/types/index.mjs.map +1 -0
  39. package/{lib-esm/utils/createCookieStorageAdapterFromNextServerContext.js → dist/esm/utils/createCookieStorageAdapterFromNextServerContext.mjs} +8 -5
  40. package/dist/esm/utils/createCookieStorageAdapterFromNextServerContext.mjs.map +1 -0
  41. package/{lib-esm/utils/createRunWithAmplifyServerContext.js → dist/esm/utils/createRunWithAmplifyServerContext.mjs} +12 -9
  42. package/dist/esm/utils/createRunWithAmplifyServerContext.mjs.map +1 -0
  43. package/{lib-esm/utils/getAmplifyConfig.js → dist/esm/utils/getAmplifyConfig.mjs} +6 -3
  44. package/dist/esm/utils/getAmplifyConfig.mjs.map +1 -0
  45. package/dist/esm/utils/index.mjs +3 -0
  46. package/dist/esm/utils/index.mjs.map +1 -0
  47. package/package.json +117 -119
  48. package/src/api/generateServerClient.ts +7 -1
  49. package/src/createServerRunner.ts +1 -10
  50. package/src/types/NextServer.ts +2 -2
  51. package/src/utils/createCookieStorageAdapterFromNextServerContext.ts +1 -1
  52. package/internals/package.json +0 -7
  53. package/lib/api/createServerRunnerForAPI.d.ts +0 -5
  54. package/lib/api/createServerRunnerForAPI.js.map +0 -1
  55. package/lib/api/generateServerClient.d.ts +0 -29
  56. package/lib/api/generateServerClient.js.map +0 -1
  57. package/lib/api/index.d.ts +0 -1
  58. package/lib/api/index.js.map +0 -1
  59. package/lib/createServerRunner.d.ts +0 -21
  60. package/lib/createServerRunner.js.map +0 -1
  61. package/lib/index.d.ts +0 -1
  62. package/lib/index.js.map +0 -1
  63. package/lib/internals/index.d.ts +0 -2
  64. package/lib/internals/index.js +0 -8
  65. package/lib/internals/index.js.map +0 -1
  66. package/lib/types/NextServer.d.ts +0 -70
  67. package/lib/types/NextServer.js.map +0 -1
  68. package/lib/types/index.d.ts +0 -1
  69. package/lib/types/index.js.map +0 -1
  70. package/lib/utils/createCookieStorageAdapterFromNextServerContext.d.ts +0 -4
  71. package/lib/utils/createCookieStorageAdapterFromNextServerContext.js.map +0 -1
  72. package/lib/utils/createRunWithAmplifyServerContext.d.ts +0 -5
  73. package/lib/utils/createRunWithAmplifyServerContext.js.map +0 -1
  74. package/lib/utils/getAmplifyConfig.d.ts +0 -3
  75. package/lib/utils/getAmplifyConfig.js.map +0 -1
  76. package/lib/utils/index.d.ts +0 -2
  77. package/lib/utils/index.js.map +0 -1
  78. package/lib-esm/api/createServerRunnerForAPI.js.map +0 -1
  79. package/lib-esm/api/generateServerClient.js.map +0 -1
  80. package/lib-esm/api/index.js +0 -4
  81. package/lib-esm/api/index.js.map +0 -1
  82. package/lib-esm/createServerRunner.js.map +0 -1
  83. package/lib-esm/index.js +0 -4
  84. package/lib-esm/index.js.map +0 -1
  85. package/lib-esm/internals/index.d.ts +0 -2
  86. package/lib-esm/internals/index.js +0 -4
  87. package/lib-esm/internals/index.js.map +0 -1
  88. package/lib-esm/types/NextServer.js +0 -4
  89. package/lib-esm/types/NextServer.js.map +0 -1
  90. package/lib-esm/types/index.js +0 -4
  91. package/lib-esm/types/index.js.map +0 -1
  92. package/lib-esm/utils/createCookieStorageAdapterFromNextServerContext.js.map +0 -1
  93. package/lib-esm/utils/createRunWithAmplifyServerContext.js.map +0 -1
  94. package/lib-esm/utils/getAmplifyConfig.js.map +0 -1
  95. package/lib-esm/utils/index.js +0 -5
  96. package/lib-esm/utils/index.js.map +0 -1
  97. package/src/internals/index.ts +0 -5
  98. /package/{lib-esm → dist/esm}/api/createServerRunnerForAPI.d.ts +0 -0
  99. /package/{lib-esm → dist/esm}/api/generateServerClient.d.ts +0 -0
  100. /package/{lib-esm → dist/esm}/api/index.d.ts +0 -0
  101. /package/{lib-esm → dist/esm}/createServerRunner.d.ts +0 -0
  102. /package/{lib-esm → dist/esm}/index.d.ts +0 -0
  103. /package/{lib-esm → dist/esm}/types/index.d.ts +0 -0
  104. /package/{lib-esm → dist/esm}/utils/createCookieStorageAdapterFromNextServerContext.d.ts +0 -0
  105. /package/{lib-esm → dist/esm}/utils/createRunWithAmplifyServerContext.d.ts +0 -0
  106. /package/{lib-esm → dist/esm}/utils/getAmplifyConfig.d.ts +0 -0
  107. /package/{lib-esm → dist/esm}/utils/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,121 +1,119 @@
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.1-unstable.cfbde4c.0+cfbde4c",
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-unstable.cfbde4c.0+cfbde4c",
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
- "./api": {
36
- "types": "./lib-esm/api/index.d.ts",
37
- "import": "./lib-esm/api/index.js",
38
- "require": "./lib/api/index.js"
39
- },
40
- "./internals": {
41
- "types": "./lib-esm/internals/index.d.ts",
42
- "import": "./lib-esm/internals/index.js",
43
- "require": "./lib/internals/index.js"
44
- },
45
- "./package.json": "./package.json"
46
- },
47
- "files": [
48
- "lib",
49
- "lib-esm",
50
- "src",
51
- "with-amplify",
52
- "internals",
53
- "api"
54
- ],
55
- "homepage": "https://aws-amplify.github.io/",
56
- "jest": {
57
- "coveragePathIgnorePatterns": [
58
- "/node_modules/",
59
- "dist",
60
- "lib",
61
- "lib-esm",
62
- "__tests__/mocks"
63
- ],
64
- "coverageThreshold": {
65
- "global": {
66
- "branches": 88,
67
- "functions": 90,
68
- "lines": 92,
69
- "statements": 93
70
- }
71
- },
72
- "globals": {
73
- "ts-jest": {
74
- "diagnostics": {
75
- "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
76
- },
77
- "tsConfig": false
78
- }
79
- },
80
- "moduleFileExtensions": [
81
- "ts",
82
- "tsx",
83
- "js",
84
- "json",
85
- "jsx"
86
- ],
87
- "testEnvironment": "node",
88
- "testPathIgnorePatterns": [
89
- "xmlParser-fixture.ts",
90
- "testUtils",
91
- "cases",
92
- "mocks"
93
- ],
94
- "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
95
- "testURL": "http://localhost/",
96
- "transform": {
97
- "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
98
- }
99
- },
100
- "license": "Apache-2.0",
101
- "main": "./lib/index.js",
102
- "module": "./lib-esm/index.js",
103
- "sideEffects": false,
104
- "scripts": {
105
- "build": "npm run clean && npm run build:esm && npm run build:cjs",
106
- "build-with-test": "npm test && npm run build",
107
- "build:cjs": "rimraf lib && tsc -m commonjs --outDir lib",
108
- "build:cjs:watch": "rimraf lib && tsc -m commonjs --outDir lib --watch",
109
- "build:esm": "rimraf lib-esm && tsc -m esnext --outDir lib-esm",
110
- "build:esm:watch": "rimraf lib-esm && tsc -m esnext --outDir lib-esm --watch",
111
- "clean": "npm run clean:size && rimraf lib-esm lib",
112
- "clean:size": "rimraf dual-publish-tmp tmp*",
113
- "format": "echo \"Not implemented\"",
114
- "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
115
- "test": "npm run lint && jest -w 1 --coverage",
116
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
117
- },
118
- "typings": "./lib-esm/index.d.ts",
119
- "version": "1.0.1-unstable.cfbde4c.0+cfbde4c",
120
- "gitHead": "cfbde4c7962de77bd43ba20811b84c4d7d333b42"
2
+ "author": "Amazon Web Services",
3
+ "name": "@aws-amplify/adapter-nextjs",
4
+ "version": "1.0.1",
5
+ "description": "The adapter for the supporting of using Amplify APIs in Next.js.",
6
+ "peerDependencies": {
7
+ "aws-amplify": "^6.0.0",
8
+ "next": ">=13.5.0 <15.0.0"
9
+ },
10
+ "dependencies": {
11
+ "cookie": "0.5.0"
12
+ },
13
+ "devDependencies": {
14
+ "@rollup/plugin-typescript": "11.1.5",
15
+ "@types/cookie": "0.5.1",
16
+ "@types/node": "^20.3.1",
17
+ "@types/react": "^18.2.13",
18
+ "@types/react-dom": "^18.2.6",
19
+ "aws-amplify": "6.0.1",
20
+ "jest-fetch-mock": "3.0.3",
21
+ "next": ">= 13.5.0 < 15.0.0",
22
+ "rollup": "3.29.4",
23
+ "typescript": "5.1.6"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/aws/aws-amplify/issues"
30
+ },
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/esm/index.d.ts",
34
+ "import": "./dist/esm/index.mjs",
35
+ "require": "./dist/cjs/index.js"
36
+ },
37
+ "./api": {
38
+ "types": "./dist/esm/api/index.d.ts",
39
+ "import": "./dist/esm/api/index.mjs",
40
+ "require": "./dist/cjs/api/index.js"
41
+ },
42
+ "./package.json": "./package.json"
43
+ },
44
+ "files": [
45
+ "dist/cjs",
46
+ "dist/esm",
47
+ "src",
48
+ "api"
49
+ ],
50
+ "homepage": "https://aws-amplify.github.io/",
51
+ "license": "Apache-2.0",
52
+ "main": "./dist/cjs/index.js",
53
+ "module": "./dist/esm/index.mjs",
54
+ "typings": "./dist/esm/index.d.ts",
55
+ "sideEffects": false,
56
+ "scripts": {
57
+ "build": "npm run clean && npm run build:esm-cjs",
58
+ "build-with-test": "npm test && npm run build",
59
+ "build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
60
+ "build:esm-cjs": "rollup -c rollup.config.mjs",
61
+ "build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
62
+ "clean": "npm run clean:size && rimraf dist",
63
+ "clean:size": "rimraf dual-publish-tmp tmp*",
64
+ "format": "echo \"Not implemented\"",
65
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
66
+ "test": "npm run lint && jest -w 1 --coverage",
67
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
68
+ },
69
+ "jest": {
70
+ "coveragePathIgnorePatterns": [
71
+ "/node_modules/",
72
+ "dist",
73
+ "lib",
74
+ "lib-esm",
75
+ "__tests__/mocks"
76
+ ],
77
+ "coverageThreshold": {
78
+ "global": {
79
+ "branches": 88,
80
+ "functions": 90,
81
+ "lines": 92,
82
+ "statements": 93
83
+ }
84
+ },
85
+ "globals": {
86
+ "ts-jest": {
87
+ "diagnostics": {
88
+ "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
89
+ },
90
+ "tsConfig": {
91
+ "allowJs": true,
92
+ "types": [
93
+ "@types/jest"
94
+ ]
95
+ }
96
+ }
97
+ },
98
+ "moduleFileExtensions": [
99
+ "ts",
100
+ "tsx",
101
+ "js",
102
+ "json",
103
+ "jsx"
104
+ ],
105
+ "testEnvironment": "node",
106
+ "testPathIgnorePatterns": [
107
+ "xmlParser-fixture.ts",
108
+ "testUtils",
109
+ "cases",
110
+ "mocks"
111
+ ],
112
+ "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
113
+ "testURL": "http://localhost/",
114
+ "transform": {
115
+ "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
116
+ }
117
+ },
118
+ "gitHead": "f1408db3f570c4a18ada40cecbe7e68a0b31f1fe"
121
119
  }
@@ -5,6 +5,7 @@ import { generateServerClient } from '@aws-amplify/api/internals';
5
5
  import {
6
6
  getAmplifyServerContext,
7
7
  AmplifyServerContextError,
8
+ AmplifyServer,
8
9
  } from '@aws-amplify/core/internals/adapter-core';
9
10
  import {
10
11
  V6Client,
@@ -12,6 +13,7 @@ import {
12
13
  GraphQLMethod,
13
14
  GraphQLMethodSSR,
14
15
  __amplify,
16
+ GraphQLOptionsV6,
15
17
  } from '@aws-amplify/api-graphql';
16
18
  import { NextServer } from '../types';
17
19
  import { createServerRunnerForAPI } from './createServerRunnerForAPI';
@@ -92,7 +94,11 @@ export function generateServerClientUsingReqRes<
92
94
  // TODO: improve this and the next type
93
95
  const prevGraphql = client.graphql as unknown as GraphQLMethod;
94
96
 
95
- const wrappedGraphql = (contextSpec, options, additionalHeaders?) => {
97
+ const wrappedGraphql = (
98
+ contextSpec: AmplifyServer.ContextSpec,
99
+ options: GraphQLOptionsV6,
100
+ additionalHeaders?: { [key: string]: string }
101
+ ) => {
96
102
  const amplifyInstance = getAmplifyServerContext(contextSpec).amplify;
97
103
  return prevGraphql.call(
98
104
  { [__amplify]: amplifyInstance },
@@ -2,12 +2,9 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { ResourcesConfig } from 'aws-amplify';
5
- import { AmplifyServerContextError } from '@aws-amplify/core/internals/adapter-core';
6
5
  import { createRunWithAmplifyServerContext, getAmplifyConfig } from './utils';
7
6
  import { NextServer } from './types';
8
7
 
9
- let amplifyConfig: ResourcesConfig | undefined;
10
-
11
8
  /**
12
9
  * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.
13
10
  *
@@ -30,13 +27,7 @@ let amplifyConfig: ResourcesConfig | undefined;
30
27
  export const createServerRunner: NextServer.CreateServerRunner = ({
31
28
  config,
32
29
  }) => {
33
- if (amplifyConfig) {
34
- throw new AmplifyServerContextError({
35
- message: '`createServerRunner` needs to be called only once.',
36
- });
37
- }
38
-
39
- amplifyConfig = getAmplifyConfig(config);
30
+ const amplifyConfig = getAmplifyConfig(config);
40
31
 
41
32
  return {
42
33
  runWithAmplifyServerContext: createRunWithAmplifyServerContext({
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { GetServerSidePropsContext as NextGetServerSidePropsContext } from 'next';
5
- import { NextRequest, NextResponse } from 'next/server';
6
- import { cookies } from 'next/headers';
5
+ import { NextRequest, NextResponse } from 'next/server.js';
6
+ import { cookies } from 'next/headers.js';
7
7
  import { LegacyConfig } from 'aws-amplify/adapter-core';
8
8
  import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
9
9
  import { ResourcesConfig } from '@aws-amplify/core';
@@ -1,7 +1,7 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { NextRequest, NextResponse } from 'next/server';
4
+ import { NextRequest, NextResponse } from 'next/server.js';
5
5
  import { NextServer } from '../types';
6
6
  import {
7
7
  AmplifyServerContextError,
@@ -1,7 +0,0 @@
1
- {
2
- "name": "@aws-amplify/adapter-nextjs/internals",
3
- "main": "../lib/internals/index.js",
4
- "browser": "../lib-esm/internals/index.js",
5
- "module": "../lib-esm/internals/index.js",
6
- "typings": "../lib-esm/internals/index.d.ts"
7
- }
@@ -1,5 +0,0 @@
1
- import { ResourcesConfig } from '@aws-amplify/core';
2
- import { NextServer } from '../types';
3
- export declare const createServerRunnerForAPI: ({ config, }: NextServer.CreateServerRunnerInput) => NextServer.CreateServerRunnerOutput & {
4
- resourcesConfig: ResourcesConfig;
5
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"createServerRunnerForAPI.js","sourceRoot":"","sources":["../../src/api/createServerRunnerForAPI.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAGtC,oCAA+E;AAGxE,MAAM,wBAAwB,GAAG,CAAC,EACxC,MAAM,GAC8B,EAEnC,EAAE;IACH,MAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IAE/C,OAAO;QACN,2BAA2B,EAAE,IAAA,yCAAiC,EAAC;YAC9D,MAAM,EAAE,aAAa;SACrB,CAAC;QACF,eAAe,EAAE,aAAa;KAC9B,CAAC;AACH,CAAC,CAAC;AAbW,QAAA,wBAAwB,4BAanC"}
@@ -1,29 +0,0 @@
1
- import { V6Client, V6ClientSSR } from '@aws-amplify/api-graphql';
2
- import { NextServer } from '../types';
3
- /**
4
- * Generates an API client that can be used inside a Next.js Server Component with Dynamic Rendering
5
- *
6
- * @example
7
- * import { cookies } from "next/headers"
8
- *
9
- * const client = generateServerClientUsingCookies({ cookies });
10
- * const result = await client.graphql({ query: listPosts });
11
- */
12
- export declare function generateServerClientUsingCookies<T extends Record<any, any> = never>({ config, cookies, }: NextServer.ServerComponentContext & NextServer.CreateServerRunnerInput): V6Client<T>;
13
- /**
14
- * Generates an API client that can be used with both Pages Router and App Router
15
- *
16
- * @example
17
- * import config from './amplifyconfiguration.json';
18
- * import { listPosts } from './graphql/queries';
19
- *
20
- * const client = generateServerClientUsingReqRes();
21
- *
22
- * result = await runWithAmplifyServerContext({
23
- * nextServerContext: { request, response },
24
- * operation: (contextSpec) => client.graphql(contextSpec, {
25
- * query: listPosts,
26
- * }),
27
- * });
28
- */
29
- export declare function generateServerClientUsingReqRes<T extends Record<any, any> = never>({ config }: NextServer.CreateServerRunnerInput): V6ClientSSR<T>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateServerClient.js","sourceRoot":"","sources":["../../src/api/generateServerClient.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,0DAAkE;AAClE,2EAGkD;AAClD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AAG,IAAA,sCAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,CAAC;QACrE,OAAO,WAAW,CAAC,IAAI,CACtB,EAAE,CAAC,uBAAS,CAAC,EAAE,eAAe,EAAE,EAChC,OAAO,EACP,iBAAwB,CACxB,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,CAAC,OAAO,GAAG,cAA6C,CAAC;IAC/D,OAAO,MAAM,CAAC;AACf,CAAC;AAzBD,0EAyBC"}
@@ -1 +0,0 @@
1
- export { generateServerClientUsingReqRes, generateServerClientUsingCookies, } from './generateServerClient';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,+DAGgC;AAF/B,uIAAA,+BAA+B,OAAA;AAC/B,wIAAA,gCAAgC,OAAA"}
@@ -1,21 +0,0 @@
1
- import { NextServer } from './types';
2
- /**
3
- * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.
4
- *
5
- * @remarks
6
- * This function should be called only once; you can use the returned `runWithAmplifyServerContext` across
7
- * your codebase.
8
- *
9
- * @param input The input used to create the `runWithAmplifyServerContext` function.
10
- * @param input.config The {@link ResourcesConfig} imported from the `amplifyconfiguration.json` file or manually
11
- * created.
12
- * @returns An object that contains the `runWithAmplifyServerContext` function.
13
- *
14
- * @example
15
- * import { createServerRunner } from '@aws-amplify/adapter-nextjs';
16
- * import config from './amplifyconfiguration.json';
17
- *
18
- * export const { runWithAmplifyServerContext } = createServerRunner({ config })
19
- *
20
- */
21
- export declare const createServerRunner: NextServer.CreateServerRunner;
@@ -1 +0,0 @@
1
- {"version":3,"file":"createServerRunner.js","sourceRoot":"","sources":["../src/createServerRunner.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAGtC,2EAAqF;AACrF,mCAA8E;AAG9E,IAAI,aAA0C,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,kBAAkB,GAAkC,CAAC,EACjE,MAAM,GACN,EAAE,EAAE;IACJ,IAAI,aAAa,EAAE;QAClB,MAAM,IAAI,wCAAyB,CAAC;YACnC,OAAO,EAAE,oDAAoD;SAC7D,CAAC,CAAC;KACH;IAED,aAAa,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IAEzC,OAAO;QACN,2BAA2B,EAAE,IAAA,yCAAiC,EAAC;YAC9D,MAAM,EAAE,aAAa;SACrB,CAAC;KACF,CAAC;AACH,CAAC,CAAC;AAhBW,QAAA,kBAAkB,sBAgB7B"}
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { createServerRunner } from './createServerRunner';
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
@@ -1,2 +0,0 @@
1
- export { getAmplifyConfig } from '../utils';
2
- export { NextServer } from '../types';
@@ -1,8 +0,0 @@
1
- "use strict";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getAmplifyConfig = void 0;
6
- var utils_1 = require("../utils");
7
- Object.defineProperty(exports, "getAmplifyConfig", { enumerable: true, get: function () { return utils_1.getAmplifyConfig; } });
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,kCAA4C;AAAnC,yGAAA,gBAAgB,OAAA"}
@@ -1,70 +0,0 @@
1
- import { GetServerSidePropsContext as NextGetServerSidePropsContext } from 'next';
2
- import { NextRequest, NextResponse } from 'next/server';
3
- import { cookies } from 'next/headers';
4
- import { LegacyConfig } from 'aws-amplify/adapter-core';
5
- import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
6
- import { ResourcesConfig } from '@aws-amplify/core';
7
- export declare namespace NextServer {
8
- /**
9
- * This context is normally available in the following:
10
- * - Next App Router [middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware)
11
- * - Next App Router [route handler](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)
12
- * when using `NextResponse` to create the response of the route handler
13
- */
14
- type NextRequestAndNextResponseContext = {
15
- request: NextRequest;
16
- response: NextResponse;
17
- };
18
- /**
19
- * This context is normally available in the following:
20
- * - Next App Router [route handler](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)
21
- * when using the Web API [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
22
- * to create the response of the route handler
23
- */
24
- type NextRequestAndResponseContext = {
25
- request: NextRequest;
26
- response: Response;
27
- };
28
- /**
29
- * This context is normally available in the following:
30
- * - Next [Server Component](https://nextjs.org/docs/getting-started/react-essentials#server-components)
31
- * where the [`cookies`](https://nextjs.org/docs/app/api-reference/functions/cookies)
32
- * function can be imported and called
33
- */
34
- type ServerComponentContext = {
35
- cookies: typeof cookies;
36
- };
37
- type ServerActionContext = ServerComponentContext;
38
- /**
39
- * This context is normally available in the
40
- * [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props)
41
- * function of the Next Pages Router.
42
- */
43
- type GetServerSidePropsContext = {
44
- request: NextGetServerSidePropsContext['req'];
45
- response: NextGetServerSidePropsContext['res'];
46
- };
47
- /**
48
- * The union of possible Next.js app server context types.
49
- */
50
- type Context = NextRequestAndNextResponseContext | NextRequestAndResponseContext | ServerComponentContext | GetServerSidePropsContext;
51
- /**
52
- * The interface of the input of {@link RunOperationWithContext}.
53
- */
54
- interface RunWithContextInput<OperationResult> {
55
- nextServerContext: Context | null;
56
- operation: (contextSpec: AmplifyServer.ContextSpec) => OperationResult | Promise<OperationResult>;
57
- }
58
- interface RunOperationWithContext {
59
- <OperationResult>(input: RunWithContextInput<OperationResult>): Promise<OperationResult>;
60
- }
61
- interface CreateServerRunnerInput {
62
- config: ResourcesConfig | LegacyConfig;
63
- }
64
- interface CreateServerRunnerOutput {
65
- runWithAmplifyServerContext: RunOperationWithContext;
66
- }
67
- interface CreateServerRunner {
68
- (input: CreateServerRunnerInput): CreateServerRunnerOutput;
69
- }
70
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextServer.js","sourceRoot":"","sources":["../../src/types/NextServer.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC"}
@@ -1 +0,0 @@
1
- export { NextServer } from './NextServer';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC"}
@@ -1,4 +0,0 @@
1
- import { NextServer } from '../types';
2
- import { CookieStorage } from '@aws-amplify/core/internals/adapter-core';
3
- export declare const DATE_IN_THE_PAST: Date;
4
- export declare const createCookieStorageAdapterFromNextServerContext: (context: NextServer.Context) => CookieStorage.Adapter;
@@ -1 +0,0 @@
1
- {"version":3,"file":"createCookieStorageAdapterFromNextServerContext.js","sourceRoot":"","sources":["../../src/utils/createCookieStorageAdapterFromNextServerContext.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,wCAAwD;AAExD,2EAGkD;AAErC,QAAA,gBAAgB,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;AAErC,MAAM,+CAA+C,GAAG,CAC9D,OAA2B,EACH,EAAE;IAC1B,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,GACpC,OAAwD,CAAC;IAE1D,iFAAiF;IACjF,sEAAsE;IACtE,2EAA2E;IAC3E,6EAA6E;IAC7E,kBAAkB;IAClB,IACC,GAAG;QACH,GAAG;QACH,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC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AAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjC;IACD,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,4EAA4E;AAC5E,uDAAuD;AACvD,kDAAkD;AAClD,kDAAkD;AAClD,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,wBAAwB,GAAG,CAAC,IAAY,EAAU,EAAE,CACzD,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ResourcesConfig } from '@aws-amplify/core';
2
- import { NextServer } from '../types';
3
- export declare const createRunWithAmplifyServerContext: ({ config: resourcesConfig, }: {
4
- config: ResourcesConfig;
5
- }) => NextServer.RunOperationWithContext;
@@ -1 +0,0 @@
1
- {"version":3,"file":"createRunWithAmplifyServerContext.js","sourceRoot":"","sources":["../../src/utils/createRunWithAmplifyServerContext.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,4CAA2E;AAC3E,2DAKkC;AAElC,uHAAoH;AAG7G,MAAM,iCAAiC,GAAG,CAAC,EACjD,MAAM,EAAE,eAAe,GAGvB,EAAE,EAAE;IACJ,MAAM,2BAA2B,GAChC,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,EAAE;QAC1C,wEAAwE;QACxE,+CAA+C;QAC/C,IAAI,eAAe,CAAC,IAAI,EAAE;YACzB,MAAM,eAAe;YACpB,oEAAoE;YACpE,8DAA8D;YAC9D,iEAAiE;YACjE,mEAAmE;YACnE,iBAAiB,KAAK,IAAI;gBACzB,CAAC,CAAC,4BAAqB;gBACvB,CAAC,CAAC,IAAA,4DAA6C,EAC7C,IAAA,iGAA+C,EAC9C,iBAAiB,CACjB,CACA,CAAC;YACN,MAAM,mBAAmB,GAAG,IAAA,wDAAyC,EACpE,eAAe,CAAC,IAAI,EACpB,eAAe,CACf,CAAC;YACF,MAAM,aAAa,GAAG,IAAA,2CAA4B,EACjD,eAAe,CAAC,IAAI,EACpB,eAAe,CACf,CAAC;YAEF,OAAO,IAAA,0CAA+B,EACrC,eAAe,EACf;gBACC,IAAI,EAAE,EAAE,mBAAmB,EAAE,aAAa,EAAE;aAC5C,EACD,SAAS,CACT,CAAC;SACF;QAED,oEAAoE;QACpE,+CAA+C;QAC/C,OAAO,IAAA,0CAA+B,EAAC,eAAe,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC,CAAC;IAEH,OAAO,2BAA2B,CAAC;AACpC,CAAC,CAAC;AA9CW,QAAA,iCAAiC,qCA8C5C"}
@@ -1,3 +0,0 @@
1
- import { ResourcesConfig } from 'aws-amplify';
2
- import { LegacyConfig } from 'aws-amplify/adapter-core';
3
- export declare const getAmplifyConfig: (config: ResourcesConfig | LegacyConfig) => ResourcesConfig;
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAmplifyConfig.js","sourceRoot":"","sources":["../../src/utils/getAmplifyConfig.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAItC,6DAAoE;AAE7D,MAAM,gBAAgB,GAAG,CAC/B,MAAsC,EACpB,EAAE,CACpB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC,IAAA,uBAAe,EAAC,MAAM,CAAC;IACzB,CAAC,CAAE,MAA0B,CAAC;AALnB,QAAA,gBAAgB,oBAKG"}
@@ -1,2 +0,0 @@
1
- export { getAmplifyConfig } from './getAmplifyConfig';
2
- export { createRunWithAmplifyServerContext } from './createRunWithAmplifyServerContext';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,yFAAwF;AAA/E,sJAAA,iCAAiC,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createServerRunnerForAPI.js","sourceRoot":"","sources":["../../src/api/createServerRunnerForAPI.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,iCAAiC,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACxC,MAAM,GAC8B,EAEnC,EAAE;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAE/C,OAAO;QACN,2BAA2B,EAAE,iCAAiC,CAAC;YAC9D,MAAM,EAAE,aAAa;SACrB,CAAC;QACF,eAAe,EAAE,aAAa;KAC9B,CAAC;AACH,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateServerClient.js","sourceRoot":"","sources":["../../src/api/generateServerClient.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACN,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAKN,SAAS,GACT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,gCAAgC,CAE9C,EACD,MAAM,EACN,OAAO,GAE2B;IAClC,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;QAClC,MAAM,IAAI,yBAAyB,CAAC;YACnC,OAAO,EACN,yHAAyH;YAC1H,qBAAqB;YACrB,kBAAkB,EACjB,+FAA+F;SAChG,CAAC,CAAC;KACH;IAED,MAAM,EAAE,2BAA2B,EAAE,eAAe,EAAE,GACrD,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtC,4EAA4E;IAC5E,wDAAwD;IACxD,wEAAwE;IACxE,MAAM,UAAU,GAAG,CAAC,EAAkC,EAAE,EAAE,CACzD,2BAA2B,CAAC;QAC3B,iBAAiB,EAAE,EAAE,OAAO,EAAE;QAC9B,SAAS,EAAE,WAAW,CAAC,EAAE,CACxB,EAAE,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC;KACjD,CAAC,CAAC;IAEJ,OAAO,oBAAoB,CAAiB;QAC3C,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,eAAe;KACvB,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,+BAA+B,CAE7C,EAAE,MAAM,EAAsC;IAC/C,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/C,4FAA4F;IAC5F,sBAAsB;IACtB,MAAM,MAAM,GAAG,oBAAoB,CAAoB;QACtD,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,aAAa;KACrB,CAAC,CAAC;IAEH,uCAAuC;IACvC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAmC,CAAC;IAE/D,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,iBAAkB,EAAE,EAAE;QACnE,MAAM,eAAe,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC;QACrE,OAAO,WAAW,CAAC,IAAI,CACtB,EAAE,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,EAChC,OAAO,EACP,iBAAwB,CACxB,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,CAAC,OAAO,GAAG,cAA6C,CAAC;IAC/D,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -1,4 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- export { generateServerClientUsingReqRes, generateServerClientUsingCookies, } from './generateServerClient';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EACN,+BAA+B,EAC/B,gCAAgC,GAChC,MAAM,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createServerRunner.js","sourceRoot":"","sources":["../src/createServerRunner.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,iCAAiC,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG9E,IAAI,aAA0C,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAkC,CAAC,EACjE,MAAM,GACN,EAAE,EAAE;IACJ,IAAI,aAAa,EAAE;QAClB,MAAM,IAAI,yBAAyB,CAAC;YACnC,OAAO,EAAE,oDAAoD;SAC7D,CAAC,CAAC;KACH;IAED,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEzC,OAAO;QACN,2BAA2B,EAAE,iCAAiC,CAAC;YAC9D,MAAM,EAAE,aAAa;SACrB,CAAC;KACF,CAAC;AACH,CAAC,CAAC"}
package/lib-esm/index.js DELETED
@@ -1,4 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- export { createServerRunner } from './createServerRunner';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getAmplifyConfig } from '../utils';
2
- export { NextServer } from '../types';
@@ -1,4 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- export { getAmplifyConfig } from '../utils';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}