From 73687aa5a0d5a29b3b0b010700661bf84a4b65da Mon Sep 17 00:00:00 2001 From: Chase Coalwell <782571+srchase@users.noreply.github.com> Date: Tue, 24 Oct 2023 14:54:36 -0600 Subject: [PATCH] Update codegen to use migrated util-endpoints --- .../smithy/typescript/codegen/TypeScriptDependency.java | 3 ++- .../codegen/endpointsV2/EndpointsV2Generator.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java index 4dd6b914076..25f4ea64f63 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java @@ -52,7 +52,8 @@ public enum TypeScriptDependency implements Dependency { UTIL_RETRY("dependencies", "@smithy/util-retry", false), MIDDLEWARE_STACK("dependencies", "@smithy/middleware-stack", true), MIDDLEWARE_ENDPOINTS_V2("dependencies", "@smithy/middleware-endpoint", false), - AWS_SDK_UTIL_ENDPOINTS("dependencies", "@aws-sdk/util-endpoints", false), + @Deprecated AWS_SDK_UTIL_ENDPOINTS("dependencies", "@aws-sdk/util-endpoints", false), + UTIL_ENDPOINTS("dependencies", "@smithy/util-endpoints", false), AWS_CRYPTO_SHA256_BROWSER("dependencies", "@aws-crypto/sha256-browser", "3.0.0", true), AWS_CRYPTO_SHA256_JS("dependencies", "@aws-crypto/sha256-js", "3.0.0", true), diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2Generator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2Generator.java index 5e53c7ab840..604dbc8f076 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2Generator.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2Generator.java @@ -179,9 +179,9 @@ private void generateEndpointResolver() { writer.addImport("EndpointV2", null, TypeScriptDependency.SMITHY_TYPES); writer.addImport("Logger", null, TypeScriptDependency.SMITHY_TYPES); - writer.addDependency(TypeScriptDependency.AWS_SDK_UTIL_ENDPOINTS); - writer.addImport("EndpointParams", null, TypeScriptDependency.AWS_SDK_UTIL_ENDPOINTS); - writer.addImport("resolveEndpoint", null, TypeScriptDependency.AWS_SDK_UTIL_ENDPOINTS); + writer.addDependency(TypeScriptDependency.UTIL_ENDPOINTS); + writer.addImport("EndpointParams", null, TypeScriptDependency.UTIL_ENDPOINTS); + writer.addImport("resolveEndpoint", null, TypeScriptDependency.UTIL_ENDPOINTS); writer.addRelativeImport("EndpointParameters", null, Paths.get(".", CodegenUtils.SOURCE_FOLDER, ENDPOINT_FOLDER, ENDPOINT_PARAMETERS_FILE.replace(".ts", "")));