-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(protocol-test): update json 1.0 test (#2616)
* chore(geneate-clients): copy client with diff name to folder * fix(generate-clients): copy client with different name of the folder * chore(protocol-test): update json 1.0 test
- Loading branch information
1 parent
514b3e7
commit 6febb5f
Showing
7 changed files
with
98 additions
and
84 deletions.
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
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { Sha256 } from "@aws-crypto/sha256-js"; | ||
import { ClientDefaults } from "./JSONRPC10Client"; | ||
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser"; | ||
import { JSONRPC10ClientConfig } from "./JSONRPC10Client"; | ||
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const ClientDefaultValues: Required<ClientDefaults> = { | ||
...BrowserDefaults, | ||
runtime: "react-native", | ||
sha256: Sha256, | ||
export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => { | ||
const browserDefaults = getBrowserRuntimeConfig(config); | ||
return { | ||
...browserDefaults, | ||
...config, | ||
runtime: "react-native", | ||
sha256: config.sha256 ?? Sha256, | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import { defaultRegionInfoProvider } from "./endpoints"; | ||
import { Logger as __Logger } from "@aws-sdk/types"; | ||
import { parseUrl } from "@aws-sdk/url-parser"; | ||
import { JSONRPC10ClientConfig } from "./JSONRPC10Client"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const ClientSharedValues = { | ||
export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => ({ | ||
apiVersion: "2020-07-14", | ||
disableHostPrefix: false, | ||
logger: {} as __Logger, | ||
regionInfoProvider: defaultRegionInfoProvider, | ||
serviceId: "JSON RPC 10", | ||
urlParser: parseUrl, | ||
}; | ||
disableHostPrefix: config.disableHostPrefix ?? false, | ||
logger: config.logger ?? ({} as __Logger), | ||
regionInfoProvider: config.regionInfoProvider ?? defaultRegionInfoProvider, | ||
serviceId: config.serviceId ?? "JSON RPC 10", | ||
urlParser: config.urlParser ?? parseUrl, | ||
}); |
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