@aws-amplify/adapter-nextjs 1.0.17 → 1.0.18-unstable.1509592.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.
- package/README.md +2 -0
- package/dist/cjs/createServerRunner.js +0 -1
- package/dist/cjs/createServerRunner.js.map +1 -1
- package/dist/esm/createServerRunner.d.ts +0 -1
- package/dist/esm/createServerRunner.mjs +0 -1
- package/dist/esm/createServerRunner.mjs.map +1 -1
- package/package.json +72 -72
- package/src/createServerRunner.ts +0 -1
package/README.md
ADDED
|
@@ -22,7 +22,6 @@ const utils_1 = require("./utils");
|
|
|
22
22
|
* import config from './amplifyconfiguration.json';
|
|
23
23
|
*
|
|
24
24
|
* export const { runWithAmplifyServerContext } = createServerRunner({ config })
|
|
25
|
-
*
|
|
26
25
|
*/
|
|
27
26
|
const createServerRunner = ({ config, }) => {
|
|
28
27
|
const amplifyConfig = (0, utils_1.getAmplifyConfig)(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createServerRunner.js","sources":["../../src/createServerRunner.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createServerRunner = void 0;\nconst utils_1 = require(\"./utils\");\n/**\n * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.\n *\n * @remarks\n * This function should be called only once; you can use the returned `runWithAmplifyServerContext` across\n * your codebase.\n *\n * @param input The input used to create the `runWithAmplifyServerContext` function.\n * @param input.config The {@link ResourcesConfig} imported from the `amplifyconfiguration.json` file or manually\n * created.\n * @returns An object that contains the `runWithAmplifyServerContext` function.\n *\n * @example\n * import { createServerRunner } from '@aws-amplify/adapter-nextjs';\n * import config from './amplifyconfiguration.json';\n *\n * export const { runWithAmplifyServerContext } = createServerRunner({ config })\n
|
|
1
|
+
{"version":3,"file":"createServerRunner.js","sources":["../../src/createServerRunner.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createServerRunner = void 0;\nconst utils_1 = require(\"./utils\");\n/**\n * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.\n *\n * @remarks\n * This function should be called only once; you can use the returned `runWithAmplifyServerContext` across\n * your codebase.\n *\n * @param input The input used to create the `runWithAmplifyServerContext` function.\n * @param input.config The {@link ResourcesConfig} imported from the `amplifyconfiguration.json` file or manually\n * created.\n * @returns An object that contains the `runWithAmplifyServerContext` function.\n *\n * @example\n * import { createServerRunner } from '@aws-amplify/adapter-nextjs';\n * import config from './amplifyconfiguration.json';\n *\n * export const { runWithAmplifyServerContext } = createServerRunner({ config })\n */\nconst createServerRunner = ({ config, }) => {\n const amplifyConfig = (0, utils_1.getAmplifyConfig)(config);\n return {\n runWithAmplifyServerContext: (0, utils_1.createRunWithAmplifyServerContext)({\n config: amplifyConfig,\n }),\n };\n};\nexports.createServerRunner = createServerRunner;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK;AAC5C,IAAI,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAChE,IAAI,OAAO;AACX,QAAQ,2BAA2B,EAAE,IAAI,OAAO,CAAC,iCAAiC,EAAE;AACpF,YAAY,MAAM,EAAE,aAAa;AACjC,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|
|
@@ -16,6 +16,5 @@ import { NextServer } from './types';
|
|
|
16
16
|
* import config from './amplifyconfiguration.json';
|
|
17
17
|
*
|
|
18
18
|
* export const { runWithAmplifyServerContext } = createServerRunner({ config })
|
|
19
|
-
*
|
|
20
19
|
*/
|
|
21
20
|
export declare const createServerRunner: NextServer.CreateServerRunner;
|
|
@@ -20,7 +20,6 @@ import { createRunWithAmplifyServerContext } from './utils/createRunWithAmplifyS
|
|
|
20
20
|
* import config from './amplifyconfiguration.json';
|
|
21
21
|
*
|
|
22
22
|
* export const { runWithAmplifyServerContext } = createServerRunner({ config })
|
|
23
|
-
*
|
|
24
23
|
*/
|
|
25
24
|
const createServerRunner = ({ config, }) => {
|
|
26
25
|
const amplifyConfig = getAmplifyConfig(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createServerRunner.mjs","sources":["../../src/createServerRunner.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createRunWithAmplifyServerContext, getAmplifyConfig } from './utils';\n/**\n * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.\n *\n * @remarks\n * This function should be called only once; you can use the returned `runWithAmplifyServerContext` across\n * your codebase.\n *\n * @param input The input used to create the `runWithAmplifyServerContext` function.\n * @param input.config The {@link ResourcesConfig} imported from the `amplifyconfiguration.json` file or manually\n * created.\n * @returns An object that contains the `runWithAmplifyServerContext` function.\n *\n * @example\n * import { createServerRunner } from '@aws-amplify/adapter-nextjs';\n * import config from './amplifyconfiguration.json';\n *\n * export const { runWithAmplifyServerContext } = createServerRunner({ config })\n
|
|
1
|
+
{"version":3,"file":"createServerRunner.mjs","sources":["../../src/createServerRunner.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createRunWithAmplifyServerContext, getAmplifyConfig } from './utils';\n/**\n * Creates the `runWithAmplifyServerContext` function to run Amplify server side APIs in an isolated request context.\n *\n * @remarks\n * This function should be called only once; you can use the returned `runWithAmplifyServerContext` across\n * your codebase.\n *\n * @param input The input used to create the `runWithAmplifyServerContext` function.\n * @param input.config The {@link ResourcesConfig} imported from the `amplifyconfiguration.json` file or manually\n * created.\n * @returns An object that contains the `runWithAmplifyServerContext` function.\n *\n * @example\n * import { createServerRunner } from '@aws-amplify/adapter-nextjs';\n * import config from './amplifyconfiguration.json';\n *\n * export const { runWithAmplifyServerContext } = createServerRunner({ config })\n */\nexport const createServerRunner = ({ config, }) => {\n const amplifyConfig = getAmplifyConfig(config);\n return {\n runWithAmplifyServerContext: createRunWithAmplifyServerContext({\n config: amplifyConfig,\n }),\n };\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK;AACnD,IAAI,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACnD,IAAI,OAAO;AACX,QAAQ,2BAA2B,EAAE,iCAAiC,CAAC;AACvE,YAAY,MAAM,EAAE,aAAa;AACjC,SAAS,CAAC;AACV,KAAK,CAAC;AACN;;;;"}
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
2
|
+
"author": "Amazon Web Services",
|
|
3
|
+
"name": "@aws-amplify/adapter-nextjs",
|
|
4
|
+
"version": "1.0.18-unstable.1509592.0+1509592",
|
|
5
|
+
"description": "The adapter for the supporting of using Amplify APIs in Next.js.",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"aws-amplify": "6.0.18-unstable.1509592.0+1509592",
|
|
8
|
+
"next": ">=13.5.0 <15.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"cookie": "0.5.0"
|
|
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.18-unstable.1509592.0+1509592",
|
|
19
|
+
"jest-fetch-mock": "3.0.3",
|
|
20
|
+
"next": ">= 13.5.0 < 15.0.0",
|
|
21
|
+
"typescript": "5.0.2"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/aws/aws-amplify/issues"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/esm/index.d.ts",
|
|
32
|
+
"import": "./dist/esm/index.mjs",
|
|
33
|
+
"require": "./dist/cjs/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./api": {
|
|
36
|
+
"types": "./dist/esm/api/index.d.ts",
|
|
37
|
+
"import": "./dist/esm/api/index.mjs",
|
|
38
|
+
"require": "./dist/cjs/api/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./data": {
|
|
41
|
+
"types": "./dist/esm/api/index.d.ts",
|
|
42
|
+
"import": "./dist/esm/api/index.mjs",
|
|
43
|
+
"require": "./dist/cjs/api/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist/cjs",
|
|
49
|
+
"dist/esm",
|
|
50
|
+
"src",
|
|
51
|
+
"api",
|
|
52
|
+
"data"
|
|
53
|
+
],
|
|
54
|
+
"homepage": "https://aws-amplify.github.io/",
|
|
55
|
+
"license": "Apache-2.0",
|
|
56
|
+
"main": "./dist/cjs/index.js",
|
|
57
|
+
"module": "./dist/esm/index.mjs",
|
|
58
|
+
"typings": "./dist/esm/index.d.ts",
|
|
59
|
+
"sideEffects": false,
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "npm run clean && npm run build:esm-cjs",
|
|
62
|
+
"build-with-test": "npm test && npm run build",
|
|
63
|
+
"build:esm-cjs": "rollup -c rollup.config.mjs",
|
|
64
|
+
"build:watch": "npm run build:esm-cjs -- --watch",
|
|
65
|
+
"clean": "npm run clean:size && rimraf dist",
|
|
66
|
+
"clean:size": "rimraf dual-publish-tmp tmp*",
|
|
67
|
+
"format": "echo \"Not implemented\"",
|
|
68
|
+
"lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
|
|
69
|
+
"lint:fix": "eslint '**/*.{ts,tsx}' --fix",
|
|
70
|
+
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
|
|
71
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
|
|
72
|
+
},
|
|
73
|
+
"gitHead": "1509592c017aa3e63d6c2d3a5c683f9356fb6a75"
|
|
74
74
|
}
|
|
@@ -23,7 +23,6 @@ import { NextServer } from './types';
|
|
|
23
23
|
* import config from './amplifyconfiguration.json';
|
|
24
24
|
*
|
|
25
25
|
* export const { runWithAmplifyServerContext } = createServerRunner({ config })
|
|
26
|
-
*
|
|
27
26
|
*/
|
|
28
27
|
export const createServerRunner: NextServer.CreateServerRunner = ({
|
|
29
28
|
config,
|