@aws-sdk/client-transcribe-streaming 3.183.0 → 3.185.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.
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -13,32 +14,15 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
13
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
14
15
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
15
16
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
16
- export const getRuntimeConfig = (config) => {
17
- const defaultsMode = resolveDefaultsModeConfig(config);
18
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
19
- const clientSharedValues = getSharedRuntimeConfig(config);
20
- return {
21
- ...clientSharedValues,
22
- ...config,
23
- runtime: "browser",
24
- defaultsMode,
25
- base64Decoder: config?.base64Decoder ?? fromBase64,
26
- base64Encoder: config?.base64Encoder ?? toBase64,
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => eventStreamPayloadHandler),
32
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
33
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
34
- region: config?.region ?? invalidProvider("Region is missing"),
35
- requestHandler: config?.requestHandler ?? new WebSocketHandler(),
36
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
37
- sha256: config?.sha256 ?? Sha256,
38
- streamCollector: config?.streamCollector ?? streamCollector,
39
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
42
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
43
- };
17
+ export var getRuntimeConfig = function (config) {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
21
+ var clientSharedValues = getSharedRuntimeConfig(config);
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), eventStreamPayloadHandlerProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _f !== void 0 ? _f : (function () { return eventStreamPayloadHandler; }), eventStreamSerdeProvider: (_g = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _g !== void 0 ? _g : eventStreamSerdeProvider, maxAttempts: (_h = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _h !== void 0 ? _h : DEFAULT_MAX_ATTEMPTS, region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : invalidProvider("Region is missing"), requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new WebSocketHandler(), retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); }), sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : Sha256, streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : streamCollector, useDualstackEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _p !== void 0 ? _p : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _q !== void 0 ? _q : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _r !== void 0 ? _r : fromUtf8, utf8Encoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _s !== void 0 ? _s : toUtf8 });
44
28
  };
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
@@ -16,38 +17,23 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
16
17
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
17
18
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
18
19
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
19
- export const getRuntimeConfig = (config) => {
20
+ export var getRuntimeConfig = function (config) {
21
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
20
22
  emitWarningIfUnsupportedVersion(process.version);
21
- const defaultsMode = resolveDefaultsModeConfig(config);
22
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
23
- const clientSharedValues = getSharedRuntimeConfig(config);
24
- return {
25
- ...clientSharedValues,
26
- ...config,
27
- runtime: "node",
28
- defaultsMode,
29
- base64Decoder: config?.base64Decoder ?? fromBase64,
30
- base64Encoder: config?.base64Encoder ?? toBase64,
31
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
32
- credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
33
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
34
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
35
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
36
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
37
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
39
- requestHandler: config?.requestHandler ??
40
- new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })),
41
- retryMode: config?.retryMode ??
42
- loadNodeConfig({
43
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
44
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
45
- }),
46
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
47
- streamCollector: config?.streamCollector ?? streamCollector,
48
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
49
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
50
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
51
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
52
- };
23
+ var defaultsMode = resolveDefaultsModeConfig(config);
24
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
25
+ var clientSharedValues = getSharedRuntimeConfig(config);
26
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), eventStreamPayloadHandlerProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _f !== void 0 ? _f : eventStreamPayloadHandlerProvider, eventStreamSerdeProvider: (_g = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _g !== void 0 ? _g : eventStreamSerdeProvider, maxAttempts: (_h = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _h !== void 0 ? _h : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new RequestHandler(function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
27
+ switch (_b.label) {
28
+ case 0:
29
+ _a = [{}];
30
+ return [4, defaultConfigProvider()];
31
+ case 1: return [2, (__assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { disableConcurrentStreams: true }]))];
32
+ }
33
+ }); }); }), retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
34
+ switch (_a.label) {
35
+ case 0: return [4, defaultConfigProvider()];
36
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
37
+ }
38
+ }); }); } })), sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : Hash.bind(null, "sha256"), streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : streamCollector, useDualstackEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _p !== void 0 ? _p : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _q !== void 0 ? _q : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _r !== void 0 ? _r : fromUtf8, utf8Encoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _s !== void 0 ? _s : toUtf8 });
53
39
  };
@@ -1,14 +1,9 @@
1
+ import { __assign } from "tslib";
1
2
  import { Sha256 } from "@aws-crypto/sha256-js";
2
3
  import { eventStreamPayloadHandler, WebSocketHandler } from "@aws-sdk/middleware-sdk-transcribe-streaming";
3
4
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
4
- export const getRuntimeConfig = (config) => {
5
- const browserDefaults = getBrowserRuntimeConfig(config);
6
- return {
7
- ...browserDefaults,
8
- ...config,
9
- runtime: "react-native",
10
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => eventStreamPayloadHandler),
11
- requestHandler: config?.requestHandler ?? new WebSocketHandler(),
12
- sha256: config?.sha256 ?? Sha256,
13
- };
5
+ export var getRuntimeConfig = function (config) {
6
+ var _a, _b, _c;
7
+ var browserDefaults = getBrowserRuntimeConfig(config);
8
+ return __assign(__assign(__assign({}, browserDefaults), config), { runtime: "react-native", eventStreamPayloadHandlerProvider: (_a = config === null || config === void 0 ? void 0 : config.eventStreamPayloadHandlerProvider) !== null && _a !== void 0 ? _a : (function () { return eventStreamPayloadHandler; }), requestHandler: (_b = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _b !== void 0 ? _b : new WebSocketHandler(), sha256: (_c = config === null || config === void 0 ? void 0 : config.sha256) !== null && _c !== void 0 ? _c : Sha256 });
14
9
  };
@@ -1,10 +1,13 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
3
- export const getRuntimeConfig = (config) => ({
4
- apiVersion: "2017-10-26",
5
- disableHostPrefix: config?.disableHostPrefix ?? false,
6
- logger: config?.logger ?? {},
7
- regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
- serviceId: config?.serviceId ?? "Transcribe Streaming",
9
- urlParser: config?.urlParser ?? parseUrl,
10
- });
3
+ export var getRuntimeConfig = function (config) {
4
+ var _a, _b, _c, _d, _e;
5
+ return ({
6
+ apiVersion: "2017-10-26",
7
+ disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
8
+ logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
9
+ regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : defaultRegionInfoProvider,
10
+ serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "Transcribe Streaming",
11
+ urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
12
+ });
13
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-transcribe-streaming",
3
3
  "description": "AWS SDK for JavaScript Transcribe Streaming Client for Node.js, Browser and React Native",
4
- "version": "3.183.0",
4
+ "version": "3.185.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "2.0.0",
22
22
  "@aws-crypto/sha256-js": "2.0.0",
23
- "@aws-sdk/client-sts": "3.183.0",
23
+ "@aws-sdk/client-sts": "3.185.0",
24
24
  "@aws-sdk/config-resolver": "3.183.0",
25
- "@aws-sdk/credential-provider-node": "3.183.0",
25
+ "@aws-sdk/credential-provider-node": "3.185.0",
26
26
  "@aws-sdk/eventstream-handler-node": "3.183.0",
27
27
  "@aws-sdk/eventstream-serde-browser": "3.183.0",
28
28
  "@aws-sdk/eventstream-serde-config-resolver": "3.183.0",
@@ -35,14 +35,14 @@
35
35
  "@aws-sdk/middleware-host-header": "3.183.0",
36
36
  "@aws-sdk/middleware-logger": "3.183.0",
37
37
  "@aws-sdk/middleware-recursion-detection": "3.183.0",
38
- "@aws-sdk/middleware-retry": "3.183.0",
38
+ "@aws-sdk/middleware-retry": "3.185.0",
39
39
  "@aws-sdk/middleware-sdk-transcribe-streaming": "3.183.0",
40
40
  "@aws-sdk/middleware-serde": "3.183.0",
41
41
  "@aws-sdk/middleware-signing": "3.183.0",
42
42
  "@aws-sdk/middleware-stack": "3.183.0",
43
43
  "@aws-sdk/middleware-user-agent": "3.183.0",
44
44
  "@aws-sdk/node-config-provider": "3.183.0",
45
- "@aws-sdk/node-http-handler": "3.183.0",
45
+ "@aws-sdk/node-http-handler": "3.185.0",
46
46
  "@aws-sdk/protocol-http": "3.183.0",
47
47
  "@aws-sdk/smithy-client": "3.183.0",
48
48
  "@aws-sdk/types": "3.183.0",