@aws-sdk/middleware-api-key 3.972.9 → 3.972.11
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/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var client = require('@smithy/core/client');
|
|
4
|
+
var protocols = require('@smithy/core/protocols');
|
|
5
5
|
|
|
6
6
|
const resolveApiKeyConfig = (input) => {
|
|
7
7
|
const { apiKey } = input;
|
|
8
8
|
return Object.assign(input, {
|
|
9
|
-
apiKey: apiKey ?
|
|
9
|
+
apiKey: apiKey ? client.normalizeProvider(apiKey) : undefined,
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const apiKeyMiddleware = (pluginConfig, middlewareConfig) => (next, context) => async function (args) {
|
|
14
|
-
if (!
|
|
14
|
+
if (!protocols.HttpRequest.isInstance(args.request) || context.currentAuthConfig)
|
|
15
15
|
return next(args);
|
|
16
16
|
const apiKey = pluginConfig.apiKey && (await pluginConfig.apiKey());
|
|
17
17
|
if (!apiKey) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpRequest } from "@smithy/
|
|
1
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
2
|
export const apiKeyMiddleware = (pluginConfig, middlewareConfig) => (next, context) => async function (args) {
|
|
3
3
|
if (!HttpRequest.isInstance(args.request) || context.currentAuthConfig)
|
|
4
4
|
return next(args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-api-key",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-api-key",
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/types": "^3.973.
|
|
26
|
-
"@smithy/
|
|
27
|
-
"@smithy/types": "^4.14.
|
|
28
|
-
"@smithy/util-middleware": "^4.2.13",
|
|
25
|
+
"@aws-sdk/types": "^3.973.8",
|
|
26
|
+
"@smithy/core": "^3.24.1",
|
|
27
|
+
"@smithy/types": "^4.14.1",
|
|
29
28
|
"tslib": "^2.6.2"
|
|
30
29
|
},
|
|
31
30
|
"engines": {
|