@aws-sdk/client-translate 3.34.0 → 3.37.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 +47 -0
- package/{dist/cjs → dist-cjs}/Translate.js +1 -6
- package/{dist/cjs → dist-cjs}/TranslateClient.js +8 -18
- package/{dist/cjs → dist-cjs}/commands/CreateParallelDataCommand.js +2 -30
- package/{dist/cjs → dist-cjs}/commands/DeleteParallelDataCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteTerminologyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeTextTranslationJobCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetParallelDataCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetTerminologyCommand.js +2 -27
- package/dist-cjs/commands/ImportTerminologyCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/ListParallelDataCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListTerminologiesCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListTextTranslationJobsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/StartTextTranslationJobCommand.js +2 -34
- package/{dist/cjs → dist-cjs}/commands/StopTextTranslationJobCommand.js +2 -33
- package/{dist/cjs → dist-cjs}/commands/TranslateTextCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/UpdateParallelDataCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -163
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListParallelDataPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListTerminologiesPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListTextTranslationJobsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/Translate.js +1 -2
- package/{dist/es → dist-es}/TranslateClient.js +1 -2
- package/{dist/es → dist-es}/commands/CreateParallelDataCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteParallelDataCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteTerminologyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeTextTranslationJobCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetParallelDataCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetTerminologyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ImportTerminologyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListParallelDataCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListTerminologiesCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListTextTranslationJobsCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StartTextTranslationJobCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StopTextTranslationJobCommand.js +2 -3
- package/{dist/es → dist-es}/commands/TranslateTextCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateParallelDataCommand.js +2 -3
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListParallelDataPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListTerminologiesPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListTextTranslationJobsPaginator.js +1 -2
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
- package/{dist/types → dist-types}/Translate.d.ts +2 -2
- package/{dist/types → dist-types}/TranslateClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/CreateParallelDataCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteParallelDataCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteTerminologyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeTextTranslationJobCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetParallelDataCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetTerminologyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ImportTerminologyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListParallelDataCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListTerminologiesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListTextTranslationJobsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartTextTranslationJobCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StopTextTranslationJobCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/TranslateTextCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateParallelDataCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListParallelDataPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTerminologiesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTextTranslationJobsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/Translate.d.ts +17 -74
- package/{dist/types → dist-types}/ts3.4/TranslateClient.d.ts +32 -98
- package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/DeleteParallelDataCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/GetParallelDataCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/GetTerminologyCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +700 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListParallelDataPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTerminologiesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTextTranslationJobsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +45 -42
- package/Translate.ts +0 -552
- package/TranslateClient.ts +0 -290
- package/commands/CreateParallelDataCommand.ts +0 -97
- package/commands/DeleteParallelDataCommand.ts +0 -94
- package/commands/DeleteTerminologyCommand.ts +0 -94
- package/commands/DescribeTextTranslationJobCommand.ts +0 -98
- package/commands/GetParallelDataCommand.ts +0 -94
- package/commands/GetTerminologyCommand.ts +0 -94
- package/commands/ImportTerminologyCommand.ts +0 -101
- package/commands/ListParallelDataCommand.ts +0 -94
- package/commands/ListTerminologiesCommand.ts +0 -94
- package/commands/ListTextTranslationJobsCommand.ts +0 -94
- package/commands/StartTextTranslationJobCommand.ts +0 -101
- package/commands/StopTextTranslationJobCommand.ts +0 -100
- package/commands/TranslateTextCommand.ts +0 -95
- package/commands/UpdateParallelDataCommand.ts +0 -95
- package/dist/cjs/Translate.js.map +0 -1
- package/dist/cjs/TranslateClient.js.map +0 -1
- package/dist/cjs/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist/cjs/commands/GetParallelDataCommand.js.map +0 -1
- package/dist/cjs/commands/GetTerminologyCommand.js.map +0 -1
- package/dist/cjs/commands/ImportTerminologyCommand.js +0 -68
- package/dist/cjs/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist/cjs/commands/ListParallelDataCommand.js.map +0 -1
- package/dist/cjs/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist/cjs/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist/cjs/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist/cjs/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist/cjs/commands/TranslateTextCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateParallelDataCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -93
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListParallelDataPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/Translate.js.map +0 -1
- package/dist/es/TranslateClient.js.map +0 -1
- package/dist/es/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist/es/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist/es/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist/es/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist/es/commands/GetParallelDataCommand.js.map +0 -1
- package/dist/es/commands/GetTerminologyCommand.js.map +0 -1
- package/dist/es/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist/es/commands/ListParallelDataCommand.js.map +0 -1
- package/dist/es/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist/es/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist/es/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist/es/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist/es/commands/TranslateTextCommand.js.map +0 -1
- package/dist/es/commands/UpdateParallelDataCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -22
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -93
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListParallelDataPaginator.js.map +0 -1
- package/dist/es/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist/es/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist/es/protocols/Aws_json1_1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/commands/CreateParallelDataCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/DeleteTerminologyCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ImportTerminologyCommand.d.ts +0 -42
- package/dist/types/ts3.4/commands/ListParallelDataCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListTerminologiesCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +0 -42
- package/dist/types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +0 -41
- package/dist/types/ts3.4/commands/TranslateTextCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/UpdateParallelDataCommand.d.ts +0 -36
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1304
- package/endpoints.ts +0 -77
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1625
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListParallelDataPaginator.ts +0 -58
- package/pagination/ListTerminologiesPaginator.ts +0 -58
- package/pagination/ListTextTranslationJobsPaginator.ts +0 -58
- package/protocols/Aws_json1_1.ts +0 -2522
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -31
- package/tsconfig.types.json +0 -8
package/runtimeConfig.browser.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import packageInfo from "./package.json";
|
|
2
|
-
|
|
3
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
-
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
6
|
-
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
7
|
-
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
8
|
-
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
9
|
-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
10
|
-
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
11
|
-
import { TranslateClientConfig } from "./TranslateClient";
|
|
12
|
-
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export const getRuntimeConfig = (config: TranslateClientConfig) => {
|
|
18
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
19
|
-
return {
|
|
20
|
-
...clientSharedValues,
|
|
21
|
-
...config,
|
|
22
|
-
runtime: "browser",
|
|
23
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
-
credentialDefaultProvider:
|
|
27
|
-
config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))),
|
|
28
|
-
defaultUserAgentProvider:
|
|
29
|
-
config?.defaultUserAgentProvider ??
|
|
30
|
-
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
31
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
32
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
33
|
-
requestHandler: config?.requestHandler ?? new FetchHttpHandler(),
|
|
34
|
-
retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)),
|
|
35
|
-
sha256: config?.sha256 ?? Sha256,
|
|
36
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
37
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
-
};
|
|
40
|
-
};
|
package/runtimeConfig.native.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
-
import { TranslateClientConfig } from "./TranslateClient";
|
|
3
|
-
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export const getRuntimeConfig = (config: TranslateClientConfig) => {
|
|
9
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
10
|
-
return {
|
|
11
|
-
...browserDefaults,
|
|
12
|
-
...config,
|
|
13
|
-
runtime: "react-native",
|
|
14
|
-
sha256: config?.sha256 ?? Sha256,
|
|
15
|
-
};
|
|
16
|
-
};
|
package/runtimeConfig.shared.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defaultRegionInfoProvider } from "./endpoints";
|
|
2
|
-
import { Logger as __Logger } from "@aws-sdk/types";
|
|
3
|
-
import { parseUrl } from "@aws-sdk/url-parser";
|
|
4
|
-
import { TranslateClientConfig } from "./TranslateClient";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export const getRuntimeConfig = (config: TranslateClientConfig) => ({
|
|
10
|
-
apiVersion: "2017-07-01",
|
|
11
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
|
-
logger: config?.logger ?? ({} as __Logger),
|
|
13
|
-
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
14
|
-
serviceId: config?.serviceId ?? "Translate",
|
|
15
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
16
|
-
});
|
package/runtimeConfig.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import packageInfo from "./package.json";
|
|
2
|
-
|
|
3
|
-
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
|
-
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
|
-
import { Hash } from "@aws-sdk/hash-node";
|
|
7
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
8
|
-
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
|
-
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
|
-
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
|
-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
|
-
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
|
-
import { TranslateClientConfig } from "./TranslateClient";
|
|
15
|
-
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
16
|
-
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
21
|
-
export const getRuntimeConfig = (config: TranslateClientConfig) => {
|
|
22
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
23
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
24
|
-
return {
|
|
25
|
-
...clientSharedValues,
|
|
26
|
-
...config,
|
|
27
|
-
runtime: "node",
|
|
28
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
29
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
30
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
31
|
-
credentialDefaultProvider:
|
|
32
|
-
config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
33
|
-
defaultUserAgentProvider:
|
|
34
|
-
config?.defaultUserAgentProvider ??
|
|
35
|
-
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
36
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
37
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
38
|
-
requestHandler: config?.requestHandler ?? new NodeHttpHandler(),
|
|
39
|
-
retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
|
|
40
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
41
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
42
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
43
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
44
|
-
};
|
|
45
|
-
};
|
package/tsconfig.es.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"],
|
|
8
|
-
"outDir": "dist/es"
|
|
9
|
-
}
|
|
10
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"alwaysStrict": true,
|
|
4
|
-
"target": "ES2018",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"downlevelIteration": true,
|
|
9
|
-
"importHelpers": true,
|
|
10
|
-
"noEmitHelpers": true,
|
|
11
|
-
"incremental": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"outDir": "dist/cjs",
|
|
15
|
-
"removeComments": true
|
|
16
|
-
},
|
|
17
|
-
"typedocOptions": {
|
|
18
|
-
"exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"],
|
|
19
|
-
"excludeNotExported": true,
|
|
20
|
-
"excludePrivate": true,
|
|
21
|
-
"hideGenerator": true,
|
|
22
|
-
"ignoreCompilerErrors": true,
|
|
23
|
-
"includeDeclarations": true,
|
|
24
|
-
"stripInternal": true,
|
|
25
|
-
"readme": "README.md",
|
|
26
|
-
"mode": "file",
|
|
27
|
-
"out": "docs",
|
|
28
|
-
"theme": "minimal",
|
|
29
|
-
"plugin": ["@aws-sdk/client-documentation-generator"]
|
|
30
|
-
}
|
|
31
|
-
}
|