@aws-sdk/middleware-user-agent 3.921.0 → 3.922.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
@@ -86,8 +86,8 @@ const USER_AGENT = "user-agent";
86
86
  const X_AMZ_USER_AGENT = "x-amz-user-agent";
87
87
  const SPACE = " ";
88
88
  const UA_NAME_SEPARATOR = "/";
89
- const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
90
- const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
89
+ const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
90
+ const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
91
91
  const UA_ESCAPE_CHAR = "-";
92
92
 
93
93
  const BYTE_LIMIT = 1024;
@@ -123,7 +123,7 @@ const userAgentMiddleware = (options) => (next, context) => async (args) => {
123
123
  const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
124
124
  const appId = await options.userAgentAppId();
125
125
  if (appId) {
126
- defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
126
+ defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
127
127
  }
128
128
  const prefix = utilEndpoints.getUserAgentPrefix();
129
129
  const sdkUserAgentValue = (prefix ? [prefix] : [])
@@ -2,6 +2,6 @@ export const USER_AGENT = "user-agent";
2
2
  export const X_AMZ_USER_AGENT = "x-amz-user-agent";
3
3
  export const SPACE = " ";
4
4
  export const UA_NAME_SEPARATOR = "/";
5
- export const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
6
- export const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
5
+ export const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
6
+ export const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
7
7
  export const UA_ESCAPE_CHAR = "-";
@@ -17,7 +17,7 @@ export const userAgentMiddleware = (options) => (next, context) => async (args)
17
17
  const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
18
18
  const appId = await options.userAgentAppId();
19
19
  if (appId) {
20
- defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
20
+ defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
21
21
  }
22
22
  const prefix = getUserAgentPrefix();
23
23
  const sdkUserAgentValue = (prefix ? [prefix] : [])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-user-agent",
3
- "version": "3.921.0",
3
+ "version": "3.922.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",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@aws-sdk/core": "3.921.0",
29
- "@aws-sdk/types": "3.921.0",
30
- "@aws-sdk/util-endpoints": "3.921.0",
28
+ "@aws-sdk/core": "3.922.0",
29
+ "@aws-sdk/types": "3.922.0",
30
+ "@aws-sdk/util-endpoints": "3.922.0",
31
31
  "@smithy/core": "^3.17.2",
32
32
  "@smithy/protocol-http": "^5.3.4",
33
33
  "@smithy/types": "^4.8.1",