Skip to content

Commit

Permalink
fix: default import package.json for spec compatibility (#1505)
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Varonos <r.varonos@gmail.com>
  • Loading branch information
trivikr and rvaronos authored Sep 14, 2020
1 parent bee87d8 commit 797ba7d
Show file tree
Hide file tree
Showing 690 changed files with 2,070 additions and 1,380 deletions.
5 changes: 3 additions & 2 deletions clients/client-accessanalyzer/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-accessanalyzer/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AccessAnalyzerClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-accessanalyzer/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-acm-pca/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-acm-pca/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ACMPCAClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-acm-pca/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-acm/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-acm/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ACMClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-acm/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-alexa-for-business/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-alexa-for-business/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AlexaForBusinessClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-alexa-for-business/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-amplify/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-amplify/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AmplifyClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-amplify/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-api-gateway/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-api-gateway/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./APIGatewayClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-api-gateway/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ApiGatewayManagementApiClient";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-apigatewaymanagementapi/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-apigatewayv2/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-apigatewayv2/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-js";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ApiGatewayV2Client";
Expand All @@ -7,7 +8,7 @@ import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"
export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
defaultUserAgent: `aws-sdk-js-v3-react-native-${packageInfo.name}/${packageInfo.version}`,
sha256: Sha256,
urlParser: parseUrl,
};
5 changes: 3 additions & 2 deletions clients/client-apigatewayv2/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
Expand All @@ -20,7 +21,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
Expand Down
5 changes: 3 additions & 2 deletions clients/client-app-mesh/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { name, version } from "./package.json";
import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
Expand All @@ -18,7 +19,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidFunction("Credential is missing") as any,
defaultUserAgent: defaultUserAgent(name, version),
defaultUserAgent: defaultUserAgent(packageInfo.name, packageInfo.version),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidFunction("Region is missing") as any,
requestHandler: new FetchHttpHandler(),
Expand Down
Loading

0 comments on commit 797ba7d

Please sign in to comment.