@aws-sdk/middleware-api-key 3.972.16 → 3.972.18
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 +4 -6
- package/package.json +6 -6
package/dist-cjs/index.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var client = require('@smithy/core/client');
|
|
4
|
-
var protocols = require('@smithy/core/protocols');
|
|
1
|
+
const { normalizeProvider } = require("@smithy/core/client");
|
|
2
|
+
const { HttpRequest } = require("@smithy/core/protocols");
|
|
5
3
|
|
|
6
4
|
const resolveApiKeyConfig = (input) => {
|
|
7
5
|
const { apiKey } = input;
|
|
8
6
|
return Object.assign(input, {
|
|
9
|
-
apiKey: apiKey ?
|
|
7
|
+
apiKey: apiKey ? normalizeProvider(apiKey) : undefined,
|
|
10
8
|
});
|
|
11
9
|
};
|
|
12
10
|
|
|
13
11
|
const apiKeyMiddleware = (pluginConfig, middlewareConfig) => (next, context) => async function (args) {
|
|
14
|
-
if (!
|
|
12
|
+
if (!HttpRequest.isInstance(args.request) || context.currentAuthConfig)
|
|
15
13
|
return next(args);
|
|
16
14
|
const apiKey = pluginConfig.apiKey && (await pluginConfig.apiKey());
|
|
17
15
|
if (!apiKey) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-api-key",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.18",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
|
-
"build:cjs": "node ../../scripts/compilation/inline
|
|
7
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
6
|
+
"build:cjs": "node ../../scripts/compilation/inline",
|
|
7
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
8
8
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
9
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
9
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
10
10
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
11
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
11
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
12
12
|
"test": "yarn g:vitest run",
|
|
13
13
|
"test:watch": "yarn g:vitest watch"
|
|
14
14
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/types": "^3.973.
|
|
25
|
+
"@aws-sdk/types": "^3.973.13",
|
|
26
26
|
"@smithy/core": "^3.24.6",
|
|
27
27
|
"@smithy/types": "^4.14.3",
|
|
28
28
|
"tslib": "^2.6.2"
|