@aws-sdk/middleware-api-key 3.731.0 → 3.775.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/index.js CHANGED
@@ -19,29 +19,28 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
 
21
21
  // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
24
  apiKeyMiddleware: () => apiKeyMiddleware,
25
25
  apiKeyMiddlewareOptions: () => apiKeyMiddlewareOptions,
26
26
  getApiKeyPlugin: () => getApiKeyPlugin,
27
27
  resolveApiKeyConfig: () => resolveApiKeyConfig
28
28
  });
29
- module.exports = __toCommonJS(src_exports);
29
+ module.exports = __toCommonJS(index_exports);
30
30
 
31
31
  // src/apiKeyConfiguration.ts
32
32
  var import_util_middleware = require("@smithy/util-middleware");
33
33
  var resolveApiKeyConfig = /* @__PURE__ */ __name((input) => {
34
- return {
35
- ...input,
36
- apiKey: input.apiKey ? (0, import_util_middleware.normalizeProvider)(input.apiKey) : void 0
37
- };
34
+ const { apiKey } = input;
35
+ return Object.assign(input, {
36
+ apiKey: apiKey ? (0, import_util_middleware.normalizeProvider)(apiKey) : void 0
37
+ });
38
38
  }, "resolveApiKeyConfig");
39
39
 
40
40
  // src/apiKeyMiddleware.ts
41
41
  var import_protocol_http = require("@smithy/protocol-http");
42
42
  var apiKeyMiddleware = /* @__PURE__ */ __name((pluginConfig, middlewareConfig) => (next, context) => async function(args) {
43
- if (!import_protocol_http.HttpRequest.isInstance(args.request) || context.currentAuthConfig)
44
- return next(args);
43
+ if (!import_protocol_http.HttpRequest.isInstance(args.request) || context.currentAuthConfig) return next(args);
45
44
  const apiKey = pluginConfig.apiKey && await pluginConfig.apiKey();
46
45
  if (!apiKey) {
47
46
  context.currentAuthConfig = void 0;
@@ -63,9 +62,9 @@ var apiKeyMiddlewareOptions = {
63
62
  override: true
64
63
  };
65
64
  var getApiKeyPlugin = /* @__PURE__ */ __name((pluginConfig, middlewareConfig) => ({
66
- applyToStack: (clientStack) => {
65
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
67
66
  clientStack.addRelativeTo(apiKeyMiddleware(pluginConfig, middlewareConfig), apiKeyMiddlewareOptions);
68
- }
67
+ }, "applyToStack")
69
68
  }), "getApiKeyPlugin");
70
69
  // Annotate the CommonJS export names for ESM import in node:
71
70
 
@@ -1,7 +1,7 @@
1
1
  import { normalizeProvider } from "@smithy/util-middleware";
2
2
  export const resolveApiKeyConfig = (input) => {
3
- return {
4
- ...input,
5
- apiKey: input.apiKey ? normalizeProvider(input.apiKey) : undefined,
6
- };
3
+ const { apiKey } = input;
4
+ return Object.assign(input, {
5
+ apiKey: apiKey ? normalizeProvider(apiKey) : undefined,
6
+ });
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-api-key",
3
- "version": "3.731.0",
3
+ "version": "3.775.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-api-key",
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.731.0",
25
- "@smithy/protocol-http": "^5.0.0",
26
- "@smithy/types": "^4.0.0",
27
- "@smithy/util-middleware": "^4.0.0",
24
+ "@aws-sdk/types": "3.775.0",
25
+ "@smithy/protocol-http": "^5.1.0",
26
+ "@smithy/types": "^4.2.0",
27
+ "@smithy/util-middleware": "^4.0.2",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "engines": {