@aws-sdk/middleware-user-agent 3.758.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,15 +19,15 @@ 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
  DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID,
25
25
  getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,
26
26
  getUserAgentPlugin: () => getUserAgentPlugin,
27
27
  resolveUserAgentConfig: () => resolveUserAgentConfig,
28
28
  userAgentMiddleware: () => userAgentMiddleware
29
29
  });
30
- module.exports = __toCommonJS(src_exports);
30
+ module.exports = __toCommonJS(index_exports);
31
31
 
32
32
  // src/configurations.ts
33
33
  var import_core = require("@smithy/core");
@@ -41,10 +41,10 @@ function isValidUserAgentAppId(appId) {
41
41
  __name(isValidUserAgentAppId, "isValidUserAgentAppId");
42
42
  function resolveUserAgentConfig(input) {
43
43
  const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
44
- return {
45
- ...input,
46
- customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent,
47
- userAgentAppId: async () => {
44
+ const { customUserAgent } = input;
45
+ return Object.assign(input, {
46
+ customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
47
+ userAgentAppId: /* @__PURE__ */ __name(async () => {
48
48
  const appId = await normalizedAppIdProvider();
49
49
  if (!isValidUserAgentAppId(appId)) {
50
50
  const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
@@ -55,8 +55,8 @@ function resolveUserAgentConfig(input) {
55
55
  }
56
56
  }
57
57
  return appId;
58
- }
59
- };
58
+ }, "userAgentAppId")
59
+ });
60
60
  }
61
61
  __name(resolveUserAgentConfig, "resolveUserAgentConfig");
62
62
 
@@ -211,9 +211,9 @@ var getUserAgentMiddlewareOptions = {
211
211
  override: true
212
212
  };
213
213
  var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({
214
- applyToStack: (clientStack) => {
214
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
215
215
  clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
216
- }
216
+ }, "applyToStack")
217
217
  }), "getUserAgentPlugin");
218
218
  // Annotate the CommonJS export names for ESM import in node:
219
219
 
@@ -8,9 +8,9 @@ function isValidUserAgentAppId(appId) {
8
8
  }
9
9
  export function resolveUserAgentConfig(input) {
10
10
  const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
11
- return {
12
- ...input,
13
- customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent,
11
+ const { customUserAgent } = input;
12
+ return Object.assign(input, {
13
+ customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
14
14
  userAgentAppId: async () => {
15
15
  const appId = await normalizedAppIdProvider();
16
16
  if (!isValidUserAgentAppId(appId)) {
@@ -24,5 +24,5 @@ export function resolveUserAgentConfig(input) {
24
24
  }
25
25
  return appId;
26
26
  },
27
- };
27
+ });
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-user-agent",
3
- "version": "3.758.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-user-agent",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/core": "3.758.0",
28
- "@aws-sdk/types": "3.734.0",
29
- "@aws-sdk/util-endpoints": "3.743.0",
30
- "@smithy/core": "^3.1.5",
31
- "@smithy/protocol-http": "^5.0.1",
32
- "@smithy/types": "^4.1.0",
27
+ "@aws-sdk/core": "3.775.0",
28
+ "@aws-sdk/types": "3.775.0",
29
+ "@aws-sdk/util-endpoints": "3.775.0",
30
+ "@smithy/core": "^3.2.0",
31
+ "@smithy/protocol-http": "^5.1.0",
32
+ "@smithy/types": "^4.2.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {