@aws-sdk/util-user-agent-node 3.430.0 → 3.437.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.
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.crtAvailability = void 0;
4
+ exports.crtAvailability = {
5
+ isCrtAvailable: false,
6
+ };
package/dist-cjs/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = void 0;
3
+ exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = exports.crtAvailability = void 0;
4
4
  const node_config_provider_1 = require("@smithy/node-config-provider");
5
5
  const os_1 = require("os");
6
6
  const process_1 = require("process");
7
7
  const is_crt_available_1 = require("./is-crt-available");
8
+ var crt_availability_1 = require("./crt-availability");
9
+ Object.defineProperty(exports, "crtAvailability", { enumerable: true, get: function () { return crt_availability_1.crtAvailability; } });
8
10
  exports.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
9
11
  exports.UA_APP_ID_INI_NAME = "sdk-ua-app-id";
10
12
  const defaultUserAgent = ({ serviceId, clientVersion }) => {
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isCrtAvailable = void 0;
4
+ const crt_availability_1 = require("./crt-availability");
4
5
  const isCrtAvailable = () => {
5
- try {
6
- if (typeof require === "function" && typeof module !== "undefined" && require("aws-crt")) {
7
- return ["md/crt-avail"];
8
- }
9
- return null;
10
- }
11
- catch (e) {
12
- return null;
6
+ if (crt_availability_1.crtAvailability.isCrtAvailable) {
7
+ return ["md/crt-avail"];
13
8
  }
9
+ return null;
14
10
  };
15
11
  exports.isCrtAvailable = isCrtAvailable;
@@ -0,0 +1,3 @@
1
+ export const crtAvailability = {
2
+ isCrtAvailable: false,
3
+ };
package/dist-es/index.js CHANGED
@@ -2,6 +2,7 @@ import { loadConfig } from "@smithy/node-config-provider";
2
2
  import { platform, release } from "os";
3
3
  import { env, versions } from "process";
4
4
  import { isCrtAvailable } from "./is-crt-available";
5
+ export { crtAvailability } from "./crt-availability";
5
6
  export const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
6
7
  export const UA_APP_ID_INI_NAME = "sdk-ua-app-id";
7
8
  export const defaultUserAgent = ({ serviceId, clientVersion }) => {
@@ -1,11 +1,7 @@
1
+ import { crtAvailability } from "./crt-availability";
1
2
  export const isCrtAvailable = () => {
2
- try {
3
- if (typeof require === "function" && typeof module !== "undefined" && require("aws-crt")) {
4
- return ["md/crt-avail"];
5
- }
6
- return null;
7
- }
8
- catch (e) {
9
- return null;
3
+ if (crtAvailability.isCrtAvailable) {
4
+ return ["md/crt-avail"];
10
5
  }
6
+ return null;
11
7
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * If \@aws-sdk/signature-v4-crt is installed and loaded, it will register
5
+ * this value to true.
6
+ */
7
+ export declare const crtAvailability: {
8
+ isCrtAvailable: boolean;
9
+ };
@@ -1,4 +1,5 @@
1
1
  import { Provider, UserAgent } from "@smithy/types";
2
+ export { crtAvailability } from "./crt-availability";
2
3
  /**
3
4
  * @internal
4
5
  */
@@ -17,4 +18,3 @@ interface DefaultUserAgentOptions {
17
18
  * Collect metrics from runtime to put into user agent.
18
19
  */
19
20
  export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => Provider<UserAgent>;
20
- export {};
@@ -0,0 +1,3 @@
1
+ export declare const crtAvailability: {
2
+ isCrtAvailable: boolean;
3
+ };
@@ -1,4 +1,5 @@
1
1
  import { Provider, UserAgent } from "@smithy/types";
2
+ export { crtAvailability } from "./crt-availability";
2
3
  export declare const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
3
4
  export declare const UA_APP_ID_INI_NAME = "sdk-ua-app-id";
4
5
  interface DefaultUserAgentOptions {
@@ -9,4 +10,3 @@ export declare const defaultUserAgent: ({
9
10
  serviceId,
10
11
  clientVersion,
11
12
  }: DefaultUserAgentOptions) => Provider<UserAgent>;
12
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-node",
3
- "version": "3.430.0",
3
+ "version": "3.437.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",
@@ -20,9 +20,9 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/types": "3.428.0",
24
- "@smithy/node-config-provider": "^2.1.2",
25
- "@smithy/types": "^2.3.5",
23
+ "@aws-sdk/types": "3.433.0",
24
+ "@smithy/node-config-provider": "^2.1.3",
25
+ "@smithy/types": "^2.4.0",
26
26
  "tslib": "^2.5.0"
27
27
  },
28
28
  "devDependencies": {