Skip to content

Commit

Permalink
pass client config to loadNodeConfig calls (smithy-lang#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Dec 17, 2024
1 parent 0480559 commit 7fa6e5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .changeset/witty-pans-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
TypeScriptDependency.NODE_CONFIG_PROVIDER);
writer.addImport("NODE_MAX_ATTEMPT_CONFIG_OPTIONS", null,
TypeScriptDependency.MIDDLEWARE_RETRY);
writer.write("loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS)");
writer.write("loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config)");
},
"retryMode", writer -> {
writer.addDependency(TypeScriptDependency.NODE_CONFIG_PROVIDER);
Expand All @@ -128,7 +128,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
writer.addImport("NODE_RETRY_MODE_CONFIG_OPTIONS", null,
TypeScriptDependency.MIDDLEWARE_RETRY);
writer.addImport("DEFAULT_RETRY_MODE", null, TypeScriptDependency.UTIL_RETRY);
writer.openBlock("loadNodeConfig({", "})", () -> {
writer.openBlock("loadNodeConfig({", "}, config)", () -> {
writer.write("...NODE_RETRY_MODE_CONFIG_OPTIONS,");
writer.write("default: async () => "
+ "(await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
TypeScriptDependency.NODE_CONFIG_PROVIDER);
writer.addImport("NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS", null,
TypeScriptDependency.MIDDLEWARE_COMPRESSION);
writer.write("loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS)");
writer.write("loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config)");
},
"requestMinCompressionSizeBytes", writer -> {
writer.addDependency(TypeScriptDependency.NODE_CONFIG_PROVIDER);
Expand All @@ -74,7 +74,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
TypeScriptDependency.NODE_CONFIG_PROVIDER);
writer.addImport("NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS", null,
TypeScriptDependency.MIDDLEWARE_COMPRESSION);
writer.write("loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS)");
writer.write("loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config)");
}
);
case BROWSER:
Expand Down

0 comments on commit 7fa6e5e

Please sign in to comment.