Skip to content

Commit

Permalink
merge url-parser-node and url-parser-browser; add url-parser-native (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP authored and srchase committed Mar 17, 2023
1 parent c525c8c commit c9de05f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ final class RuntimeConfigGenerator {
TypeScriptDependency.AWS_SDK_HASH_NODE.packageName);
writer.write("sha256: Hash.bind(null, \"sha256\"),");
},
"urlParser", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_URL_PARSER_NODE);
writer.addImport("parseUrl", "parseUrl",
TypeScriptDependency.AWS_SDK_URL_PARSER_NODE.packageName);
writer.write("urlParser: parseUrl,");
},
"bodyLengthChecker", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_UTIL_BODY_LENGTH_NODE);
writer.addImport("calculateBodyLength", "calculateBodyLength",
Expand Down Expand Up @@ -109,12 +103,6 @@ final class RuntimeConfigGenerator {
TypeScriptDependency.AWS_CRYPTO_SHA256_BROWSER.packageName);
writer.write("sha256: Sha256,");
},
"urlParser", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_URL_PARSER_BROWSER);
writer.addImport("parseUrl", "parseUrl",
TypeScriptDependency.AWS_SDK_URL_PARSER_BROWSER.packageName);
writer.write("urlParser: parseUrl,");
},
"bodyLengthChecker", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_UTIL_BODY_LENGTH_BROWSER);
writer.addImport("calculateBodyLength", "calculateBodyLength",
Expand Down Expand Up @@ -160,15 +148,21 @@ final class RuntimeConfigGenerator {
writer.write("sha256: Sha256,");
},
"urlParser", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_URL_PARSER_NODE);
writer.addDependency(TypeScriptDependency.AWS_SDK_URL_PARSER_NATIVE);
writer.addImport("parseUrl", "parseUrl",
TypeScriptDependency.AWS_SDK_URL_PARSER_NODE.packageName);
TypeScriptDependency.AWS_SDK_URL_PARSER_NATIVE.packageName);
writer.write("urlParser: parseUrl,");
}
);
private final Map<String, Consumer<TypeScriptWriter>> sharedRuntimeConfigDefaults = MapUtils.of(
"disableHostPrefix", writer -> {
writer.write("disableHostPrefix: false,");
},
"urlParser", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_URL_PARSER);
writer.addImport("parseUrl", "parseUrl",
TypeScriptDependency.AWS_SDK_URL_PARSER.packageName);
writer.write("urlParser: parseUrl,");
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public enum TypeScriptDependency implements SymbolDependencyContainer {
AWS_CRYPTO_SHA256_JS("dependencies", "@aws-crypto/sha256-js", "^1.0.0", true),
AWS_SDK_HASH_NODE("dependencies", "@aws-sdk/hash-node", "3.0.0", true),

AWS_SDK_URL_PARSER_BROWSER("dependencies", "@aws-sdk/url-parser-browser", "3.0.0", true),
AWS_SDK_URL_PARSER_NODE("dependencies", "@aws-sdk/url-parser-node", "3.0.0", true),
AWS_SDK_URL_PARSER("dependencies", "@aws-sdk/url-parser", "3.0.0", true),
AWS_SDK_URL_PARSER_NATIVE("dependencies", "@aws-sdk/url-parser-native", "3.0.0", true),

AWS_SDK_UTIL_BASE64_BROWSER("dependencies", "@aws-sdk/util-base64-browser", "3.0.0", true),
AWS_SDK_UTIL_BASE64_NODE("dependencies", "@aws-sdk/util-base64-node", "3.0.0", true),
Expand Down

0 comments on commit c9de05f

Please sign in to comment.