@aws-amplify/adapter-nextjs 1.0.3-unstable.c69c562.0 → 1.0.3

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.
@@ -1,2 +1,5 @@
1
1
  export { generateServerClientUsingReqRes, generateServerClientUsingCookies, } from './generateServerClient';
2
- export { V6ClientSSRCookies as ClientUsingSSRCookies, V6ClientSSRRequest as ClientUsingSSRReq, } from '@aws-amplify/api-graphql';
2
+ import { V6ClientSSRCookies, V6ClientSSRRequest } from '@aws-amplify/api-graphql';
3
+ type ClientUsingSSRCookies<T extends Record<any, any> = never> = V6ClientSSRCookies<T>;
4
+ type ClientUsingSSRReq<T extends Record<any, any> = never> = V6ClientSSRRequest<T>;
5
+ export { ClientUsingSSRCookies, ClientUsingSSRReq };
package/package.json CHANGED
@@ -1,124 +1,124 @@
1
1
  {
2
- "author": "Amazon Web Services",
3
- "name": "@aws-amplify/adapter-nextjs",
4
- "version": "1.0.3-unstable.c69c562.0+c69c562",
5
- "description": "The adapter for the supporting of using Amplify APIs in Next.js.",
6
- "peerDependencies": {
7
- "aws-amplify": "6.0.3-unstable.c69c562.0+c69c562",
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.3-unstable.c69c562.0+c69c562",
20
- "jest-fetch-mock": "3.0.3",
21
- "next": ">= 13.5.0 < 15.0.0",
22
- "rollup": "3.29.4",
23
- "typescript": "5.0.2"
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
- "./data": {
43
- "types": "./dist/esm/api/index.d.ts",
44
- "import": "./dist/esm/api/index.mjs",
45
- "require": "./dist/cjs/api/index.js"
46
- },
47
- "./package.json": "./package.json"
48
- },
49
- "files": [
50
- "dist/cjs",
51
- "dist/esm",
52
- "src",
53
- "api"
54
- ],
55
- "homepage": "https://aws-amplify.github.io/",
56
- "license": "Apache-2.0",
57
- "main": "./dist/cjs/index.js",
58
- "module": "./dist/esm/index.mjs",
59
- "typings": "./dist/esm/index.d.ts",
60
- "sideEffects": false,
61
- "scripts": {
62
- "build": "npm run clean && npm run build:esm-cjs",
63
- "build-with-test": "npm test && npm run build",
64
- "build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
65
- "build:esm-cjs": "rollup -c rollup.config.mjs",
66
- "build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
67
- "clean": "npm run clean:size && rimraf dist",
68
- "clean:size": "rimraf dual-publish-tmp tmp*",
69
- "format": "echo \"Not implemented\"",
70
- "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
71
- "test": "npm run lint && jest -w 1 --coverage",
72
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
73
- },
74
- "jest": {
75
- "coveragePathIgnorePatterns": [
76
- "/node_modules/",
77
- "dist",
78
- "lib",
79
- "lib-esm",
80
- "__tests__/mocks"
81
- ],
82
- "coverageThreshold": {
83
- "global": {
84
- "branches": 88,
85
- "functions": 90,
86
- "lines": 92,
87
- "statements": 93
88
- }
89
- },
90
- "globals": {
91
- "ts-jest": {
92
- "diagnostics": {
93
- "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
94
- },
95
- "tsConfig": {
96
- "allowJs": true,
97
- "types": [
98
- "@types/jest"
99
- ]
100
- }
101
- }
102
- },
103
- "moduleFileExtensions": [
104
- "ts",
105
- "tsx",
106
- "js",
107
- "json",
108
- "jsx"
109
- ],
110
- "testEnvironment": "node",
111
- "testPathIgnorePatterns": [
112
- "xmlParser-fixture.ts",
113
- "testUtils",
114
- "cases",
115
- "mocks"
116
- ],
117
- "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
118
- "testURL": "http://localhost/",
119
- "transform": {
120
- "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
121
- }
122
- },
123
- "gitHead": "c69c5628458e49d705f2c58dc942bbbc7b9e60f4"
2
+ "author": "Amazon Web Services",
3
+ "name": "@aws-amplify/adapter-nextjs",
4
+ "version": "1.0.3",
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.3",
20
+ "jest-fetch-mock": "3.0.3",
21
+ "next": ">= 13.5.0 < 15.0.0",
22
+ "rollup": "3.29.4",
23
+ "typescript": "5.0.2"
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
+ "./data": {
43
+ "types": "./dist/esm/api/index.d.ts",
44
+ "import": "./dist/esm/api/index.mjs",
45
+ "require": "./dist/cjs/api/index.js"
46
+ },
47
+ "./package.json": "./package.json"
48
+ },
49
+ "files": [
50
+ "dist/cjs",
51
+ "dist/esm",
52
+ "src",
53
+ "api"
54
+ ],
55
+ "homepage": "https://aws-amplify.github.io/",
56
+ "license": "Apache-2.0",
57
+ "main": "./dist/cjs/index.js",
58
+ "module": "./dist/esm/index.mjs",
59
+ "typings": "./dist/esm/index.d.ts",
60
+ "sideEffects": false,
61
+ "scripts": {
62
+ "build": "npm run clean && npm run build:esm-cjs",
63
+ "build-with-test": "npm test && npm run build",
64
+ "build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
65
+ "build:esm-cjs": "rollup -c rollup.config.mjs",
66
+ "build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
67
+ "clean": "npm run clean:size && rimraf dist",
68
+ "clean:size": "rimraf dual-publish-tmp tmp*",
69
+ "format": "echo \"Not implemented\"",
70
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
71
+ "test": "npm run lint && jest -w 1 --coverage",
72
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
73
+ },
74
+ "jest": {
75
+ "coveragePathIgnorePatterns": [
76
+ "/node_modules/",
77
+ "dist",
78
+ "lib",
79
+ "lib-esm",
80
+ "__tests__/mocks"
81
+ ],
82
+ "coverageThreshold": {
83
+ "global": {
84
+ "branches": 88,
85
+ "functions": 90,
86
+ "lines": 92,
87
+ "statements": 93
88
+ }
89
+ },
90
+ "globals": {
91
+ "ts-jest": {
92
+ "diagnostics": {
93
+ "pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
94
+ },
95
+ "tsConfig": {
96
+ "allowJs": true,
97
+ "types": [
98
+ "@types/jest"
99
+ ]
100
+ }
101
+ }
102
+ },
103
+ "moduleFileExtensions": [
104
+ "ts",
105
+ "tsx",
106
+ "js",
107
+ "json",
108
+ "jsx"
109
+ ],
110
+ "testEnvironment": "node",
111
+ "testPathIgnorePatterns": [
112
+ "xmlParser-fixture.ts",
113
+ "testUtils",
114
+ "cases",
115
+ "mocks"
116
+ ],
117
+ "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
118
+ "testURL": "http://localhost/",
119
+ "transform": {
120
+ "^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
121
+ }
122
+ },
123
+ "gitHead": "eee3310b3cba27ca5f10e2f8c4317603dde174f3"
124
124
  }
package/src/api/index.ts CHANGED
@@ -6,7 +6,18 @@ export {
6
6
  generateServerClientUsingCookies,
7
7
  } from './generateServerClient';
8
8
 
9
- export {
10
- V6ClientSSRCookies as ClientUsingSSRCookies,
11
- V6ClientSSRRequest as ClientUsingSSRReq,
9
+ import {
10
+ V6ClientSSRCookies,
11
+ V6ClientSSRRequest,
12
12
  } from '@aws-amplify/api-graphql';
13
+
14
+ // explicitly defaulting to `never` here resolves
15
+ // TS2589: Type instantiation is excessively deep and possibly infinite.
16
+ // When this type is used without a generic type arg, i.e. `let client: Client`
17
+ type ClientUsingSSRCookies<T extends Record<any, any> = never> =
18
+ V6ClientSSRCookies<T>;
19
+
20
+ type ClientUsingSSRReq<T extends Record<any, any> = never> =
21
+ V6ClientSSRRequest<T>;
22
+
23
+ export { ClientUsingSSRCookies, ClientUsingSSRReq };