diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddClientRuntimeConfig.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddClientRuntimeConfig.java index 2f199067ef5..ed49fdd3bec 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddClientRuntimeConfig.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddClientRuntimeConfig.java @@ -118,7 +118,7 @@ public Map> 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); @@ -128,7 +128,7 @@ public Map> 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,"); diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddCompressionDependency.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddCompressionDependency.java index 45c7929813e..bae7d042106 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddCompressionDependency.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddCompressionDependency.java @@ -65,7 +65,7 @@ public Map> 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); @@ -74,7 +74,7 @@ public Map> 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: