@aws-sdk/util-user-agent-browser 3.186.0 → 3.188.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/CHANGELOG.md +8 -0
- package/dist-es/index.js +14 -22
- package/dist-es/index.native.js +11 -18
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/util-user-agent-browser
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aws-sdk/util-user-agent-browser
|
package/dist-es/index.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
1
|
import bowser from "bowser";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
];
|
|
18
|
-
if (serviceId) {
|
|
19
|
-
sections.push(["api/".concat(serviceId), clientVersion]);
|
|
20
|
-
}
|
|
21
|
-
return [2, sections];
|
|
22
|
-
});
|
|
23
|
-
}); };
|
|
2
|
+
export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
|
|
3
|
+
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
|
|
4
|
+
? bowser.parse(window.navigator.userAgent)
|
|
5
|
+
: undefined;
|
|
6
|
+
const sections = [
|
|
7
|
+
["aws-sdk-js", clientVersion],
|
|
8
|
+
[`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version],
|
|
9
|
+
["lang/js"],
|
|
10
|
+
["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`],
|
|
11
|
+
];
|
|
12
|
+
if (serviceId) {
|
|
13
|
+
sections.push([`api/${serviceId}`, clientVersion]);
|
|
14
|
+
}
|
|
15
|
+
return sections;
|
|
24
16
|
};
|
package/dist-es/index.native.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
];
|
|
13
|
-
if (serviceId) {
|
|
14
|
-
sections.push(["api/".concat(serviceId), clientVersion]);
|
|
15
|
-
}
|
|
16
|
-
return [2, sections];
|
|
17
|
-
});
|
|
18
|
-
}); };
|
|
1
|
+
export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
|
|
2
|
+
const sections = [
|
|
3
|
+
["aws-sdk-js", clientVersion],
|
|
4
|
+
["os/other"],
|
|
5
|
+
["lang/js"],
|
|
6
|
+
["md/rn"],
|
|
7
|
+
];
|
|
8
|
+
if (serviceId) {
|
|
9
|
+
sections.push([`api/${serviceId}`, clientVersion]);
|
|
10
|
+
}
|
|
11
|
+
return sections;
|
|
19
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/util-user-agent-browser",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.188.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"react-native": "dist-es/index.native.js",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/types": "3.
|
|
24
|
+
"@aws-sdk/types": "3.188.0",
|
|
25
25
|
"bowser": "^2.11.0",
|
|
26
26
|
"tslib": "^2.3.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@aws-sdk/protocol-http": "3.
|
|
29
|
+
"@aws-sdk/protocol-http": "3.188.0",
|
|
30
30
|
"@tsconfig/recommended": "1.0.1",
|
|
31
31
|
"concurrently": "7.0.0",
|
|
32
32
|
"downlevel-dts": "0.10.1",
|