Skip to content

Commit 5792a60

Browse files
committed
chore(codegen): add TypeScript Integration for codegen
1 parent 665331c commit 5792a60

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAccountIdEndpointModeRuntimeConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package software.amazon.smithy.aws.typescript.codegen;
77

88
import static software.amazon.smithy.aws.typescript.codegen.AwsTraitsUtils.isAwsService;
9+
import static software.amazon.smithy.aws.typescript.codegen.AwsTraitsUtils.isSigV4Service;
910

1011
import java.util.HashMap;
1112
import java.util.Map;
@@ -65,6 +66,9 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
6566
) {
6667
ServiceShape service = settings.getService(model);
6768
Map<String, Consumer<TypeScriptWriter>> runtimeConfigs = new HashMap<>();
69+
if (!isSigV4Service(settings, model) || !isAwsService(settings, model)) {
70+
return Collections.emptyMap();
71+
}
6872
if (isAwsService(settings, model)) {
6973
Optional<EndpointRuleSetTrait> endpointRuleSetTrait = service.getTrait(EndpointRuleSetTrait.class);
7074
if (endpointRuleSetTrait.isPresent()) {

codegen/smithy-aws-typescript-codegen/src/main/resources/META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
software.amazon.smithy.aws.typescript.codegen.AddEndpointsV2ParameterNameMap
22
software.amazon.smithy.aws.typescript.codegen.AddAwsRuntimeConfig
3+
software.amazon.smithy.aws.typescript.codegen.AddAccountIdEndpointModeRuntimeConfig
34
software.amazon.smithy.aws.typescript.codegen.AddBuiltinPlugins
45
software.amazon.smithy.aws.typescript.codegen.AddAwsAuthPlugin
56
software.amazon.smithy.aws.typescript.codegen.AddTokenAuthPlugin

0 commit comments

Comments
 (0)