@aws-amplify/adapter-nextjs 1.6.2 → 1.6.3-local-stack.00864ae.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/dist/cjs/api/generateServerClient.js +2 -3
- package/dist/cjs/api/generateServerClient.js.map +1 -1
- package/dist/cjs/auth/utils/isSupportedAuthApiRoutePath.js +1 -2
- package/dist/cjs/auth/utils/isSupportedAuthApiRoutePath.js.map +1 -1
- package/dist/cjs/auth/utils/predicates.js +4 -5
- package/dist/cjs/auth/utils/predicates.js.map +1 -1
- package/dist/esm/api/createServerRunnerForAPI.d.ts +1 -1
- package/dist/esm/auth/handlers/types.d.ts +0 -1
- package/dist/esm/auth/types.d.ts +0 -1
- package/dist/esm/auth/utils/createAuthFlowProofs.d.ts +1 -1
- package/dist/esm/types/NextServer.d.ts +0 -1
- package/dist/esm/utils/createRunWithAmplifyServerContext.d.ts +1 -1
- package/package.json +70 -71
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.generateServerClientUsingCookies = generateServerClientUsingCookies;
|
|
7
|
+
exports.generateServerClientUsingReqRes = generateServerClientUsingReqRes;
|
|
7
8
|
const internals_1 = require("aws-amplify/api/internals");
|
|
8
9
|
const server_1 = require("aws-amplify/api/server");
|
|
9
10
|
const internals_2 = require("aws-amplify/adapter-core/internals");
|
|
@@ -41,7 +42,6 @@ function generateServerClientUsingCookies(options) {
|
|
|
41
42
|
...params,
|
|
42
43
|
}); // TS can't narrow the type here.
|
|
43
44
|
}
|
|
44
|
-
exports.generateServerClientUsingCookies = generateServerClientUsingCookies;
|
|
45
45
|
/**
|
|
46
46
|
* Generates an API client that can be used with both Pages Router and App Router
|
|
47
47
|
*
|
|
@@ -66,5 +66,4 @@ function generateServerClientUsingReqRes(options) {
|
|
|
66
66
|
...params,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
exports.generateServerClientUsingReqRes = generateServerClientUsingReqRes;
|
|
70
69
|
//# sourceMappingURL=generateServerClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateServerClient.js","sources":["../../../src/api/generateServerClient.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.
|
|
1
|
+
{"version":3,"file":"generateServerClient.js","sources":["../../../src/api/generateServerClient.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.generateServerClientUsingCookies = generateServerClientUsingCookies;\nexports.generateServerClientUsingReqRes = generateServerClientUsingReqRes;\nconst internals_1 = require(\"aws-amplify/api/internals\");\nconst server_1 = require(\"aws-amplify/api/server\");\nconst internals_2 = require(\"aws-amplify/adapter-core/internals\");\nconst utils_1 = require(\"aws-amplify/utils\");\nconst createServerRunnerForAPI_1 = require(\"./createServerRunnerForAPI\");\n/**\n * Generates an API client that can be used inside a Next.js Server Component with Dynamic Rendering\n *\n * @example\n * import { cookies } from \"next/headers\"\n *\n * const client = generateServerClientUsingCookies({ cookies });\n * const result = await client.graphql({ query: listPosts });\n */\nfunction generateServerClientUsingCookies(options) {\n if (typeof options.cookies !== 'function') {\n throw new internals_2.AmplifyServerContextError({\n message: 'generateServerClientUsingCookies is only compatible with the `cookies` Dynamic Function available in Server Components.',\n // TODO: link to docs\n recoverySuggestion: 'use `generateServerClient` inside of `runWithAmplifyServerContext` with the `request` object.',\n });\n }\n const { runWithAmplifyServerContext, resourcesConfig } = (0, createServerRunnerForAPI_1.createServerRunnerForAPI)({ config: options.config });\n // This function reference gets passed down to InternalGraphQLAPI.ts.graphql\n // where this._graphql is passed in as the `fn` argument\n // causing it to always get invoked inside `runWithAmplifyServerContext`\n const getAmplify = (fn) => runWithAmplifyServerContext({\n nextServerContext: { cookies: options.cookies },\n operation: contextSpec => fn((0, internals_2.getAmplifyServerContext)(contextSpec).amplify),\n });\n const { cookies: _cookies, config: _config, ...params } = options;\n return (0, internals_1.generateClientWithAmplifyInstance)({\n amplify: getAmplify,\n config: resourcesConfig,\n ...params,\n }); // TS can't narrow the type here.\n}\n/**\n * Generates an API client that can be used with both Pages Router and App Router\n *\n * @example\n * import config from './amplifyconfiguration.json';\n * import { listPosts } from './graphql/queries';\n *\n * const client = generateServerClientUsingReqRes({ config });\n *\n * const result = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: (contextSpec) => client.graphql(contextSpec, {\n * query: listPosts,\n * }),\n * });\n */\nfunction generateServerClientUsingReqRes(options) {\n const amplifyConfig = (0, utils_1.parseAmplifyConfig)(options.config);\n const { config: _config, ...params } = options;\n return (0, server_1.generateClient)({\n config: amplifyConfig,\n ...params,\n });\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gCAAgC,GAAG,gCAAgC;AAC3E,OAAO,CAAC,+BAA+B,GAAG,+BAA+B;AACzE,MAAM,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,wBAAwB,CAAC;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC,oCAAoC,CAAC;AACjE,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC5C,MAAM,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gCAAgC,CAAC,OAAO,EAAE;AACnD,IAAI,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,UAAU,EAAE;AAC/C,QAAQ,MAAM,IAAI,WAAW,CAAC,yBAAyB,CAAC;AACxD,YAAY,OAAO,EAAE,yHAAyH;AAC9I;AACA,YAAY,kBAAkB,EAAE,+FAA+F;AAC/H,SAAS,CAAC;AACV;AACA,IAAI,MAAM,EAAE,2BAA2B,EAAE,eAAe,EAAE,GAAG,IAAI,0BAA0B,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AACjJ;AACA;AACA;AACA,IAAI,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,2BAA2B,CAAC;AAC3D,QAAQ,iBAAiB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;AACvD,QAAQ,SAAS,EAAE,WAAW,IAAI,EAAE,CAAC,IAAI,WAAW,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC;AACnG,KAAK,CAAC;AACN,IAAI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO;AACrE,IAAI,OAAO,IAAI,WAAW,CAAC,iCAAiC,EAAE;AAC9D,QAAQ,OAAO,EAAE,UAAU;AAC3B,QAAQ,MAAM,EAAE,eAAe;AAC/B,QAAQ,GAAG,MAAM;AACjB,KAAK,CAAC,CAAC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,+BAA+B,CAAC,OAAO,EAAE;AAClD,IAAI,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC;AACzE,IAAI,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO;AAClD,IAAI,OAAO,IAAI,QAAQ,CAAC,cAAc,EAAE;AACxC,QAAQ,MAAM,EAAE,aAAa;AAC7B,QAAQ,GAAG,MAAM;AACjB,KAAK,CAAC;AACN;;"}
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isSupportedAuthApiRoutePath =
|
|
6
|
+
exports.isSupportedAuthApiRoutePath = isSupportedAuthApiRoutePath;
|
|
7
7
|
const constant_1 = require("../constant");
|
|
8
8
|
function isSupportedAuthApiRoutePath(path) {
|
|
9
9
|
return constant_1.SUPPORTED_ROUTES.includes(path);
|
|
10
10
|
}
|
|
11
|
-
exports.isSupportedAuthApiRoutePath = isSupportedAuthApiRoutePath;
|
|
12
11
|
//# sourceMappingURL=isSupportedAuthApiRoutePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSupportedAuthApiRoutePath.js","sources":["../../../../src/auth/utils/isSupportedAuthApiRoutePath.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.isSupportedAuthApiRoutePath =
|
|
1
|
+
{"version":3,"file":"isSupportedAuthApiRoutePath.js","sources":["../../../../src/auth/utils/isSupportedAuthApiRoutePath.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.isSupportedAuthApiRoutePath = isSupportedAuthApiRoutePath;\nconst constant_1 = require(\"../constant\");\nfunction isSupportedAuthApiRoutePath(path) {\n return constant_1.SUPPORTED_ROUTES.includes(path);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,2BAA2B,GAAG,2BAA2B;AACjE,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;AACzC,SAAS,2BAA2B,CAAC,IAAI,EAAE;AAC3C,IAAI,OAAO,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrD;;"}
|
|
@@ -3,21 +3,22 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.isNextRequest = isNextRequest;
|
|
7
|
+
exports.isAuthRoutesHandlersContext = isAuthRoutesHandlersContext;
|
|
8
|
+
exports.isNextApiRequest = isNextApiRequest;
|
|
9
|
+
exports.isNextApiResponse = isNextApiResponse;
|
|
7
10
|
// NextRequest is the 1st parameter type for the API route handlers in the App Router
|
|
8
11
|
function isNextRequest(request) {
|
|
9
12
|
// NextRequest extends the Web Request API with additional convenience methods.
|
|
10
13
|
// Details: https://nextjs.org/docs/app/api-reference/functions/next-request#nexturl
|
|
11
14
|
return request instanceof Request && 'nextUrl' in request;
|
|
12
15
|
}
|
|
13
|
-
exports.isNextRequest = isNextRequest;
|
|
14
16
|
// AuthRoutesHandlersContext is the 2nd parameter type for the API route handlers in the App Router
|
|
15
17
|
function isAuthRoutesHandlersContext(context) {
|
|
16
18
|
return ('params' in context &&
|
|
17
19
|
context.params !== undefined &&
|
|
18
20
|
context.params !== null);
|
|
19
21
|
}
|
|
20
|
-
exports.isAuthRoutesHandlersContext = isAuthRoutesHandlersContext;
|
|
21
22
|
// NextApiRequest is the 1st parameter type for the API route handlers in the Pages Router
|
|
22
23
|
function isNextApiRequest(request) {
|
|
23
24
|
// Can't use `IncomingMessage` to validate the request is an instance of `NextApiRequest`
|
|
@@ -26,7 +27,6 @@ function isNextApiRequest(request) {
|
|
|
26
27
|
return ('query' in request &&
|
|
27
28
|
Object.prototype.toString.call(request.query) === '[object Object]');
|
|
28
29
|
}
|
|
29
|
-
exports.isNextApiRequest = isNextApiRequest;
|
|
30
30
|
// NextApiResponse is the 2nd parameter type for the API route handlers in the Pages Router
|
|
31
31
|
function isNextApiResponse(response) {
|
|
32
32
|
// Can't use `ServerResponse` to validate the request is an instance of `NextApiResponse`
|
|
@@ -34,5 +34,4 @@ function isNextApiResponse(response) {
|
|
|
34
34
|
// The `redirect` method is a convenience method added to the underlying `ServerResponse`.
|
|
35
35
|
return 'redirect' in response && typeof response.redirect === 'function';
|
|
36
36
|
}
|
|
37
|
-
exports.isNextApiResponse = isNextApiResponse;
|
|
38
37
|
//# sourceMappingURL=predicates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.js","sources":["../../../../src/auth/utils/predicates.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.
|
|
1
|
+
{"version":3,"file":"predicates.js","sources":["../../../../src/auth/utils/predicates.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.isNextRequest = isNextRequest;\nexports.isAuthRoutesHandlersContext = isAuthRoutesHandlersContext;\nexports.isNextApiRequest = isNextApiRequest;\nexports.isNextApiResponse = isNextApiResponse;\n// NextRequest is the 1st parameter type for the API route handlers in the App Router\nfunction isNextRequest(request) {\n // NextRequest extends the Web Request API with additional convenience methods.\n // Details: https://nextjs.org/docs/app/api-reference/functions/next-request#nexturl\n return request instanceof Request && 'nextUrl' in request;\n}\n// AuthRoutesHandlersContext is the 2nd parameter type for the API route handlers in the App Router\nfunction isAuthRoutesHandlersContext(context) {\n return ('params' in context &&\n context.params !== undefined &&\n context.params !== null);\n}\n// NextApiRequest is the 1st parameter type for the API route handlers in the Pages Router\nfunction isNextApiRequest(request) {\n // Can't use `IncomingMessage` to validate the request is an instance of `NextApiRequest`\n // as `import from 'http'` breaks the Next.js build.\n // The `query` property is a convenience method added to the underlying `IncomingMessage`.\n return ('query' in request &&\n Object.prototype.toString.call(request.query) === '[object Object]');\n}\n// NextApiResponse is the 2nd parameter type for the API route handlers in the Pages Router\nfunction isNextApiResponse(response) {\n // Can't use `ServerResponse` to validate the request is an instance of `NextApiResponse`\n // as `import from 'http'` breaks the Next.js build.\n // The `redirect` method is a convenience method added to the underlying `ServerResponse`.\n return 'redirect' in response && typeof response.redirect === 'function';\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,OAAO,CAAC,2BAA2B,GAAG,2BAA2B;AACjE,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C;AACA,SAAS,aAAa,CAAC,OAAO,EAAE;AAChC;AACA;AACA,IAAI,OAAO,OAAO,YAAY,OAAO,IAAI,SAAS,IAAI,OAAO;AAC7D;AACA;AACA,SAAS,2BAA2B,CAAC,OAAO,EAAE;AAC9C,IAAI,QAAQ,QAAQ,IAAI,OAAO;AAC/B,QAAQ,OAAO,CAAC,MAAM,KAAK,SAAS;AACpC,QAAQ,OAAO,CAAC,MAAM,KAAK,IAAI;AAC/B;AACA;AACA,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC;AACA;AACA;AACA,IAAI,QAAQ,OAAO,IAAI,OAAO;AAC9B,QAAQ,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,iBAAiB;AAC3E;AACA;AACA,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACrC;AACA;AACA;AACA,IAAI,OAAO,UAAU,IAAI,QAAQ,IAAI,OAAO,QAAQ,CAAC,QAAQ,KAAK,UAAU;AAC5E;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourcesConfig } from 'aws-amplify';
|
|
2
2
|
import { NextServer } from '../types';
|
|
3
|
-
export declare const createServerRunnerForAPI: ({ config, }: NextServer.CreateServerRunnerInput) => Omit<NextServer.CreateServerRunnerOutput,
|
|
3
|
+
export declare const createServerRunnerForAPI: ({ config, }: NextServer.CreateServerRunnerInput) => Omit<NextServer.CreateServerRunnerOutput, "createAuthRouteHandlers"> & {
|
|
4
4
|
resourcesConfig: ResourcesConfig;
|
|
5
5
|
};
|
package/dist/esm/auth/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { generateCodeVerifier } from 'aws-amplify/adapter-core';
|
|
2
2
|
export declare const createAuthFlowProofs: ({ customState, }: {
|
|
3
|
-
customState?: string
|
|
3
|
+
customState?: string;
|
|
4
4
|
}) => {
|
|
5
5
|
codeVerifier: ReturnType<typeof generateCodeVerifier>;
|
|
6
6
|
state: string;
|
|
@@ -3,6 +3,6 @@ import { KeyValueStorageMethodValidator } from 'aws-amplify/adapter-core/interna
|
|
|
3
3
|
import { NextServer } from '../types';
|
|
4
4
|
export declare const createRunWithAmplifyServerContext: ({ config: resourcesConfig, tokenValidator, globalSettings, }: {
|
|
5
5
|
config: ResourcesConfig;
|
|
6
|
-
tokenValidator?:
|
|
6
|
+
tokenValidator?: KeyValueStorageMethodValidator;
|
|
7
7
|
globalSettings: NextServer.GlobalSettings;
|
|
8
8
|
}) => NextServer.RunOperationWithContext;
|
package/package.json
CHANGED
|
@@ -1,73 +1,72 @@
|
|
|
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
|
-
"gitHead": "f2ac9929610f7f878f124083ceaf03465113cd44"
|
|
2
|
+
"author": "Amazon Web Services",
|
|
3
|
+
"name": "@aws-amplify/adapter-nextjs",
|
|
4
|
+
"version": "1.6.3-local-stack.00864ae.0+00864ae",
|
|
5
|
+
"description": "The adapter for the supporting of using Amplify APIs in Next.js.",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"aws-amplify": "6.14.5-local-stack.00864ae.0+00864ae",
|
|
8
|
+
"next": ">=13.5.0 <16.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"aws-jwt-verify": "^4.0.1"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/node": "^20.3.1",
|
|
15
|
+
"@types/react": "^18.2.13",
|
|
16
|
+
"@types/react-dom": "^18.2.6",
|
|
17
|
+
"aws-amplify": "6.14.5-local-stack.00864ae.0+00864ae",
|
|
18
|
+
"jest-fetch-mock": "3.0.3",
|
|
19
|
+
"next": ">= 13.5.0 < 15.0.0"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/aws/aws-amplify/issues"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/esm/index.d.ts",
|
|
30
|
+
"import": "./dist/esm/index.mjs",
|
|
31
|
+
"require": "./dist/cjs/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./api": {
|
|
34
|
+
"types": "./dist/esm/api/index.d.ts",
|
|
35
|
+
"import": "./dist/esm/api/index.mjs",
|
|
36
|
+
"require": "./dist/cjs/api/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./data": {
|
|
39
|
+
"types": "./dist/esm/api/index.d.ts",
|
|
40
|
+
"import": "./dist/esm/api/index.mjs",
|
|
41
|
+
"require": "./dist/cjs/api/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./package.json": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/cjs",
|
|
47
|
+
"dist/esm",
|
|
48
|
+
"src",
|
|
49
|
+
"api",
|
|
50
|
+
"data"
|
|
51
|
+
],
|
|
52
|
+
"homepage": "https://aws-amplify.github.io/",
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"main": "./dist/cjs/index.js",
|
|
55
|
+
"module": "./dist/esm/index.mjs",
|
|
56
|
+
"typings": "./dist/esm/index.d.ts",
|
|
57
|
+
"sideEffects": false,
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "npm run clean && npm run build:esm-cjs",
|
|
60
|
+
"build-with-test": "npm test && npm run build",
|
|
61
|
+
"build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
|
|
62
|
+
"build:watch": "npm run build:esm-cjs -- --watch",
|
|
63
|
+
"clean": "npm run clean:size && rimraf dist",
|
|
64
|
+
"clean:size": "rimraf dual-publish-tmp tmp*",
|
|
65
|
+
"format": "echo \"Not implemented\"",
|
|
66
|
+
"lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
|
|
67
|
+
"lint:fix": "eslint '**/*.{ts,tsx}' --fix",
|
|
68
|
+
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
|
|
69
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
|
|
70
|
+
},
|
|
71
|
+
"gitHead": "00864aec571d0509655eea0673e896d69d434972"
|
|
73
72
|
}
|