Skip to content

Commit

Permalink
use templating, use instance name for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Jul 30, 2024
1 parent b392816 commit 57294b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,11 @@ private void addCommandSpecificPlugins() {
return;
}
writer.openBlock(", { ", " }", () -> {
writer.writeInline(String.join(", ", additionalParameters));
writer
.pushState()
.putContext("params", additionalParameters)
.writeInline("${#params}${value:L}, ${/params}")
.popState();
clientAddParamsWriterConsumers.forEach((key, consumer) -> {
writer.writeInline("$L: $C,", key, (Consumer<TypeScriptWriter>) (w -> {
consumer.accept(w, CommandConstructorCodeSection.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,11 @@ private void generateConstructor() {
}

writer.openBlock(", {", " }", () -> {
writer.writeInline(String.join(", ", additionalParameters));
writer
.pushState()
.putContext("params", additionalParameters)
.writeInline("${#params}${value:L}, ${/params}")
.popState();
clientAddParamsWriterConsumers.forEach((key, consumer) -> {
writer.writeInline("$L: $C,", key, (Consumer<TypeScriptWriter>) (w -> {
consumer.accept(w, ClientBodyExtraCodeSection.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public final class AddEventStreamDependency implements TypeScriptIntegration {
@Override
public List<String> runAfter() {
return List.of(
AddBuiltinPlugins.class.getCanonicalName()
new AddBuiltinPlugins().name()
);
}

Expand Down

0 comments on commit 57294b9

Please sign in to comment.