@aws-amplify/api-rest 4.0.6-unstable.ef20ad8.0 → 4.0.6

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.
@@ -9,13 +9,13 @@ const handler_1 = require("./handler");
9
9
  const publicHandler = (amplify, options, method) => (0, utils_1.createCancellableOperation)(async (abortSignal) => {
10
10
  const { apiName, options: apiOptions = {}, path: apiPath } = options;
11
11
  const url = (0, utils_1.resolveApiUrl)(amplify, apiName, apiPath, apiOptions?.queryParams);
12
- const libraryOptionsHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({
12
+ const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({
13
13
  apiName,
14
14
  });
15
15
  const { headers: invocationHeaders = {} } = apiOptions;
16
16
  const headers = {
17
17
  // custom headers from invocation options should precede library options
18
- ...libraryOptionsHeaders,
18
+ ...libraryConfigHeaders,
19
19
  ...invocationHeaders,
20
20
  };
21
21
  const signingServiceInfo = (0, utils_1.parseSigningInfo)(url, {
@@ -1 +1 @@
1
- {"version":3,"file":"publicApis.js","sources":["../../../../src/apis/common/publicApis.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.patch = exports.head = exports.del = exports.put = exports.post = exports.get = void 0;\nconst utils_1 = require(\"../../utils\");\nconst handler_1 = require(\"./handler\");\nconst publicHandler = (amplify, options, method) => (0, utils_1.createCancellableOperation)(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = (0, utils_1.resolveApiUrl)(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryOptionsHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryOptionsHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = (0, utils_1.parseSigningInfo)(url, {\n amplify,\n apiName,\n });\n utils_1.logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return (0, handler_1.transferHandler)(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nconst get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexports.get = get;\nconst post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexports.post = post;\nconst put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexports.put = put;\nconst del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexports.del = del;\nconst head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexports.head = head;\nconst patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\nexports.patch = patch;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC/F,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,0BAA0B,EAAE,OAAO,WAAW,KAAK;AACnH,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACzE,IAAI,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,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AK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACrE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACxE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACvE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzE,OAAO,CAAC,KAAK,GAAG,KAAK;;"}
1
+ {"version":3,"file":"publicApis.js","sources":["../../../../src/apis/common/publicApis.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.patch = exports.head = exports.del = exports.put = exports.post = exports.get = void 0;\nconst utils_1 = require(\"../../utils\");\nconst handler_1 = require(\"./handler\");\nconst publicHandler = (amplify, options, method) => (0, utils_1.createCancellableOperation)(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = (0, utils_1.resolveApiUrl)(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryConfigHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = (0, utils_1.parseSigningInfo)(url, {\n amplify,\n apiName,\n });\n utils_1.logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return (0, handler_1.transferHandler)(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nconst get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexports.get = get;\nconst post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexports.post = post;\nconst put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexports.put = put;\nconst del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexports.del = del;\nconst head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexports.head = head;\nconst patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\nexports.patch = patch;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC/F,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,0BAA0B,EAAE,OAAO,WAAW,KAAK;AACnH,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACzE,IAAI,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAC/F,IAAI,MAAM,oBAAoB,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,IAAI,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,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACxE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACvE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzE,OAAO,CAAC,KAAK,GAAG,KAAK;;"}
@@ -12,13 +12,13 @@ import { transferHandler } from './handler.mjs';
12
12
  const publicHandler = (amplify, options, method) => createCancellableOperation(async (abortSignal) => {
13
13
  const { apiName, options: apiOptions = {}, path: apiPath } = options;
14
14
  const url = resolveApiUrl(amplify, apiName, apiPath, apiOptions?.queryParams);
15
- const libraryOptionsHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({
15
+ const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({
16
16
  apiName,
17
17
  });
18
18
  const { headers: invocationHeaders = {} } = apiOptions;
19
19
  const headers = {
20
20
  // custom headers from invocation options should precede library options
21
- ...libraryOptionsHeaders,
21
+ ...libraryConfigHeaders,
22
22
  ...invocationHeaders,
23
23
  };
24
24
  const signingServiceInfo = parseSigningInfo(url, {
@@ -1 +1 @@
1
- {"version":3,"file":"publicApis.mjs","sources":["../../../../src/apis/common/publicApis.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { resolveApiUrl, createCancellableOperation, logger, parseSigningInfo, } from '../../utils';\nimport { transferHandler } from './handler';\nconst publicHandler = (amplify, options, method) => createCancellableOperation(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = resolveApiUrl(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryOptionsHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryOptionsHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = parseSigningInfo(url, {\n amplify,\n apiName,\n });\n logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return transferHandler(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nexport const get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexport const post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexport const put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexport const del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexport const head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexport const patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAGA,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,0BAA0B,CAAC,OAAO,WAAW,KAAK;AACtG,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACzE,IAAI,MAAM,GAAG,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAClF,IAAI,MAAM,qBAAqB,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,GAAG;AACrF,QAAQ,OAAO;AACf,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,UAAU,CAAC;AAC3D,IAAI,MAAM,OAAO,GAAG;AACpB;AAC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copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { resolveApiUrl, createCancellableOperation, logger, parseSigningInfo, } from '../../utils';\nimport { transferHandler } from './handler';\nconst publicHandler = (amplify, options, method) => createCancellableOperation(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = resolveApiUrl(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryConfigHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = parseSigningInfo(url, {\n amplify,\n apiName,\n });\n logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return transferHandler(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nexport const get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexport const post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexport const put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexport const del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexport const head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexport const patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAGA,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,0BAA0B,CAAC,OAAO,WAAW,KAAK;AACtG,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACzE,IAAI,MAAM,GAAG,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAClF,IAAI,MAAM,oBAAoB,GAAG,MAAM,OAA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Aa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAClE,MAAC,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO;;;;"}
package/package.json CHANGED
@@ -1,105 +1,105 @@
1
1
  {
2
- "name": "@aws-amplify/api-rest",
3
- "private": false,
4
- "version": "4.0.6-unstable.ef20ad8.0+ef20ad8",
5
- "description": "Api-rest category of aws-amplify",
6
- "main": "./dist/cjs/index.js",
7
- "module": "./dist/esm/index.mjs",
8
- "typings": "./dist/esm/index.d.ts",
9
- "react-native": "./src/index.ts",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "scripts": {
14
- "test": "npm run lint && jest -w 1 --coverage",
15
- "test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
16
- "build-with-test": "npm test && npm build",
17
- "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
18
- "build:esm-cjs": "rollup -c rollup.config.mjs",
19
- "build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
20
- "build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
21
- "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
22
- "clean": "npm run clean:size && rimraf dist lib lib-esm",
23
- "clean:size": "rimraf dual-publish-tmp tmp*",
24
- "format": "echo \"Not implemented\"",
25
- "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
26
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.json -t 70.0"
27
- },
28
- "exports": {
29
- ".": {
30
- "types": "./dist/esm/index.d.ts",
31
- "import": "./dist/esm/index.mjs",
32
- "require": "./dist/cjs/index.js",
33
- "react-native": "./src/index.ts"
34
- },
35
- "./server": {
36
- "types": "./dist/esm/server.d.ts",
37
- "import": "./dist/esm/server.mjs",
38
- "require": "./dist/cjs/server.js"
39
- },
40
- "./internals": {
41
- "types": "./dist/esm/internals/index.d.ts",
42
- "import": "./dist/esm/internals/index.mjs",
43
- "require": "./dist/cjs/internals/index.js",
44
- "react-native": "./src/internals/index.ts"
45
- },
46
- "./internals/server": {
47
- "types": "./dist/esm/internals/server.d.ts",
48
- "import": "./dist/esm/internals/server.mjs",
49
- "require": "./dist/cjs/internals/server.js"
50
- },
51
- "./package.json": "./package.json"
52
- },
53
- "typesVersions": {
54
- ">=4.2": {
55
- "server": [
56
- "./dist/esm/server.d.ts"
57
- ],
58
- "internals": [
59
- "./dist/esm/internals/index.d.ts"
60
- ],
61
- "internals/server": [
62
- "./dist/esm/internals/server.d.ts"
63
- ]
64
- }
65
- },
66
- "repository": {
67
- "type": "git",
68
- "url": "https://github.com/aws-amplify/amplify-js.git"
69
- },
70
- "author": "Amazon Web Services",
71
- "license": "Apache-2.0",
72
- "bugs": {
73
- "url": "https://github.com/aws/aws-amplify/issues"
74
- },
75
- "homepage": "https://aws-amplify.github.io/",
76
- "files": [
77
- "dist/cjs",
78
- "dist/esm",
79
- "src",
80
- "internals",
81
- "server"
82
- ],
83
- "dependencies": {
84
- "tslib": "^2.5.0"
85
- },
86
- "peerDependencies": {
87
- "@aws-amplify/core": "6.0.6-unstable.ef20ad8.0+ef20ad8"
88
- },
89
- "devDependencies": {
90
- "@aws-amplify/core": "6.0.6-unstable.ef20ad8.0+ef20ad8",
91
- "@aws-amplify/react-native": "1.0.6-unstable.ef20ad8.0+ef20ad8",
92
- "@rollup/plugin-typescript": "11.1.5",
93
- "rollup": "3.29.4",
94
- "typescript": "5.0.2"
95
- },
96
- "size-limit": [
97
- {
98
- "name": "API (rest client)",
99
- "path": "./dist/esm/index.mjs",
100
- "import": "{ Amplify, RestAPI }",
101
- "limit": "31.5 kB"
102
- }
103
- ],
104
- "gitHead": "ef20ad8280421400d3e94ca004c93f4f7b166953"
2
+ "name": "@aws-amplify/api-rest",
3
+ "private": false,
4
+ "version": "4.0.6",
5
+ "description": "Api-rest category of aws-amplify",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.mjs",
8
+ "typings": "./dist/esm/index.d.ts",
9
+ "react-native": "./src/index.ts",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "test": "npm run lint && jest -w 1 --coverage",
15
+ "test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
16
+ "build-with-test": "npm test && npm build",
17
+ "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
18
+ "build:esm-cjs": "rollup -c rollup.config.mjs",
19
+ "build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
20
+ "build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
21
+ "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
22
+ "clean": "npm run clean:size && rimraf dist lib lib-esm",
23
+ "clean:size": "rimraf dual-publish-tmp tmp*",
24
+ "format": "echo \"Not implemented\"",
25
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
26
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.json -t 70.0"
27
+ },
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/esm/index.d.ts",
31
+ "import": "./dist/esm/index.mjs",
32
+ "require": "./dist/cjs/index.js",
33
+ "react-native": "./src/index.ts"
34
+ },
35
+ "./server": {
36
+ "types": "./dist/esm/server.d.ts",
37
+ "import": "./dist/esm/server.mjs",
38
+ "require": "./dist/cjs/server.js"
39
+ },
40
+ "./internals": {
41
+ "types": "./dist/esm/internals/index.d.ts",
42
+ "import": "./dist/esm/internals/index.mjs",
43
+ "require": "./dist/cjs/internals/index.js",
44
+ "react-native": "./src/internals/index.ts"
45
+ },
46
+ "./internals/server": {
47
+ "types": "./dist/esm/internals/server.d.ts",
48
+ "import": "./dist/esm/internals/server.mjs",
49
+ "require": "./dist/cjs/internals/server.js"
50
+ },
51
+ "./package.json": "./package.json"
52
+ },
53
+ "typesVersions": {
54
+ ">=4.2": {
55
+ "server": [
56
+ "./dist/esm/server.d.ts"
57
+ ],
58
+ "internals": [
59
+ "./dist/esm/internals/index.d.ts"
60
+ ],
61
+ "internals/server": [
62
+ "./dist/esm/internals/server.d.ts"
63
+ ]
64
+ }
65
+ },
66
+ "repository": {
67
+ "type": "git",
68
+ "url": "https://github.com/aws-amplify/amplify-js.git"
69
+ },
70
+ "author": "Amazon Web Services",
71
+ "license": "Apache-2.0",
72
+ "bugs": {
73
+ "url": "https://github.com/aws/aws-amplify/issues"
74
+ },
75
+ "homepage": "https://aws-amplify.github.io/",
76
+ "files": [
77
+ "dist/cjs",
78
+ "dist/esm",
79
+ "src",
80
+ "internals",
81
+ "server"
82
+ ],
83
+ "dependencies": {
84
+ "tslib": "^2.5.0"
85
+ },
86
+ "peerDependencies": {
87
+ "@aws-amplify/core": "^6.0.0"
88
+ },
89
+ "devDependencies": {
90
+ "@aws-amplify/core": "6.0.6",
91
+ "@aws-amplify/react-native": "1.0.6",
92
+ "@rollup/plugin-typescript": "11.1.5",
93
+ "rollup": "3.29.4",
94
+ "typescript": "5.0.2"
95
+ },
96
+ "size-limit": [
97
+ {
98
+ "name": "API (rest client)",
99
+ "path": "./dist/esm/index.mjs",
100
+ "import": "{ Amplify, RestAPI }",
101
+ "limit": "31.5 kB"
102
+ }
103
+ ],
104
+ "gitHead": "5cee7197b6d3ffa5fd12da514d5981294b0e0efa"
105
105
  }
@@ -39,14 +39,14 @@ const publicHandler = (
39
39
  apiPath,
40
40
  apiOptions?.queryParams
41
41
  );
42
- const libraryOptionsHeaders =
42
+ const libraryConfigHeaders =
43
43
  await amplify.libraryOptions?.API?.REST?.headers?.({
44
44
  apiName,
45
45
  });
46
46
  const { headers: invocationHeaders = {} } = apiOptions;
47
47
  const headers = {
48
48
  // custom headers from invocation options should precede library options
49
- ...libraryOptionsHeaders,
49
+ ...libraryConfigHeaders,
50
50
  ...invocationHeaders,
51
51
  };
52
52
  const signingServiceInfo = parseSigningInfo(url, {