Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass client config to loadNodeConfig calls #1471

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
---
---
Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: empty changeset is not needed is only Java file are edited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree it's not necessary, but I sometimes create one to remind myself of what changes are pending since it creates an item in the changeset folder associated with this commit.

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
Loading