-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clients): move source files to 'src' folder (#2845)
- Loading branch information
Showing
17,643 changed files
with
30,983 additions
and
29,601 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
/build/ | ||
/coverage/ | ||
/docs/ | ||
/dist/ | ||
/dist-* | ||
*.tsbuildinfo | ||
*.tgz | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
clients/client-accessanalyzer/src/runtimeConfig.browser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// @ts-ignore: package.json will be imported from dist folders | ||
import packageInfo from "../package.json"; | ||
|
||
import { Sha256 } from "@aws-crypto/sha256-browser"; | ||
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; | ||
import { invalidProvider } from "@aws-sdk/invalid-dependency"; | ||
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; | ||
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; | ||
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; | ||
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; | ||
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; | ||
import { AccessAnalyzerClientConfig } from "./AccessAnalyzerClient"; | ||
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { | ||
const clientSharedValues = getSharedRuntimeConfig(config); | ||
return { | ||
...clientSharedValues, | ||
...config, | ||
runtime: "browser", | ||
base64Decoder: config?.base64Decoder ?? fromBase64, | ||
base64Encoder: config?.base64Encoder ?? toBase64, | ||
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, | ||
credentialDefaultProvider: | ||
config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), | ||
defaultUserAgentProvider: | ||
config?.defaultUserAgentProvider ?? | ||
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), | ||
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, | ||
region: config?.region ?? invalidProvider("Region is missing"), | ||
requestHandler: config?.requestHandler ?? new FetchHttpHandler(), | ||
retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), | ||
sha256: config?.sha256 ?? Sha256, | ||
streamCollector: config?.streamCollector ?? streamCollector, | ||
utf8Decoder: config?.utf8Decoder ?? fromUtf8, | ||
utf8Encoder: config?.utf8Encoder ?? toUtf8, | ||
}; | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// @ts-ignore: package.json will be imported from dist folders | ||
import packageInfo from "../package.json"; | ||
|
||
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; | ||
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"; | ||
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; | ||
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; | ||
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; | ||
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; | ||
import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; | ||
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; | ||
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; | ||
import { AccessAnalyzerClientConfig } from "./AccessAnalyzerClient"; | ||
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; | ||
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { | ||
emitWarningIfUnsupportedVersion(process.version); | ||
const clientSharedValues = getSharedRuntimeConfig(config); | ||
return { | ||
...clientSharedValues, | ||
...config, | ||
runtime: "node", | ||
base64Decoder: config?.base64Decoder ?? fromBase64, | ||
base64Encoder: config?.base64Encoder ?? toBase64, | ||
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, | ||
credentialDefaultProvider: | ||
config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), | ||
defaultUserAgentProvider: | ||
config?.defaultUserAgentProvider ?? | ||
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), | ||
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), | ||
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), | ||
requestHandler: config?.requestHandler ?? new NodeHttpHandler(), | ||
retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), | ||
sha256: config?.sha256 ?? Hash.bind(null, "sha256"), | ||
streamCollector: config?.streamCollector ?? streamCollector, | ||
utf8Decoder: config?.utf8Decoder ?? fromUtf8, | ||
utf8Encoder: config?.utf8Encoder ?? toUtf8, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
/build/ | ||
/coverage/ | ||
/docs/ | ||
/dist/ | ||
/dist-* | ||
*.tsbuildinfo | ||
*.tgz | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.