diff --git a/package-lock.json b/package-lock.json index 5bfbdc5133..8693cfc2bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1130,6 +1130,10 @@ "resolved": "packages/ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "packages/ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "packages/ts/generator-typescript-utils", "link": true @@ -20390,6 +20394,78 @@ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, + "packages/ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, + "packages/ts/generator-typescript-plugin-subtypes/node_modules/@types/node": { + "version": "20.6.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.3.tgz", + "integrity": "sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==", + "dev": true + }, + "packages/ts/generator-typescript-plugin-subtypes/node_modules/concurrently": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", + "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "lodash": "^4.17.21", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "spawn-command": "0.0.2", + "supports-color": "^8.1.1", + "tree-kill": "^1.2.2", + "yargs": "^17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": "^14.13.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, "packages/ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", diff --git a/packages/java/engine-core/pom.xml b/packages/java/engine-core/pom.xml index f814ade206..6a02bb515b 100644 --- a/packages/java/engine-core/pom.xml +++ b/packages/java/engine-core/pom.xml @@ -73,6 +73,11 @@ parser-jvm-plugin-nonnull ${project.version} + + dev.hilla + parser-jvm-plugin-subtypes + ${project.version} + dev.hilla parser-jvm-plugin-model diff --git a/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorConfiguration.java b/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorConfiguration.java index fbd4ce9613..9a5a22d475 100644 --- a/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorConfiguration.java +++ b/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorConfiguration.java @@ -142,7 +142,8 @@ static class PluginsProcessor extends ConfigList.Processor { new Plugin("@hilla/generator-typescript-plugin-client"), new Plugin("@hilla/generator-typescript-plugin-barrel"), new Plugin("@hilla/generator-typescript-plugin-model"), - new Plugin("@hilla/generator-typescript-plugin-push")); + new Plugin("@hilla/generator-typescript-plugin-push"), + new Plugin("@hilla/generator-typescript-plugin-subtypes")); PluginsProcessor() { super(DEFAULTS); diff --git a/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorProcessor.java b/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorProcessor.java index 64859f1516..47c93aad21 100644 --- a/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorProcessor.java +++ b/packages/java/engine-core/src/main/java/dev/hilla/engine/GeneratorProcessor.java @@ -25,6 +25,7 @@ @NpmPackage(value = "@hilla/generator-typescript-plugin-barrel", version = "2.3.0-alpha5") @NpmPackage(value = "@hilla/generator-typescript-plugin-model", version = "2.3.0-alpha5") @NpmPackage(value = "@hilla/generator-typescript-plugin-push", version = "2.3.0-alpha5") +@NpmPackage(value = "@hilla/generator-typescript-plugin-subtypes", version = "2.3.0-alpha5") public final class GeneratorProcessor { private static final Logger logger = LoggerFactory .getLogger(GeneratorProcessor.class); diff --git a/packages/java/engine-core/src/main/java/dev/hilla/engine/ParserConfiguration.java b/packages/java/engine-core/src/main/java/dev/hilla/engine/ParserConfiguration.java index 10be8827f3..c2d9f0ff70 100644 --- a/packages/java/engine-core/src/main/java/dev/hilla/engine/ParserConfiguration.java +++ b/packages/java/engine-core/src/main/java/dev/hilla/engine/ParserConfiguration.java @@ -12,6 +12,7 @@ import dev.hilla.parser.plugins.backbone.BackbonePlugin; import dev.hilla.parser.plugins.model.ModelPlugin; import dev.hilla.parser.plugins.nonnull.NonnullPlugin; +import dev.hilla.parser.plugins.subtypes.SubTypesPlugin; import dev.hilla.parser.plugins.transfertypes.TransferTypesPlugin; import dev.hilla.parser.utils.ConfigList; @@ -188,6 +189,7 @@ static class PluginsProcessor extends ConfigList.Processor { new Plugin(BackbonePlugin.class.getName()), new Plugin(TransferTypesPlugin.class.getName()), new Plugin(NonnullPlugin.class.getName()), + new Plugin(SubTypesPlugin.class.getName()), new Plugin(ModelPlugin.class.getName())); PluginsProcessor() { diff --git a/packages/java/parser-jvm-plugin-backbone/src/main/java/dev/hilla/parser/plugins/backbone/EntityPlugin.java b/packages/java/parser-jvm-plugin-backbone/src/main/java/dev/hilla/parser/plugins/backbone/EntityPlugin.java index a220d525eb..ebe5ea4855 100644 --- a/packages/java/parser-jvm-plugin-backbone/src/main/java/dev/hilla/parser/plugins/backbone/EntityPlugin.java +++ b/packages/java/parser-jvm-plugin-backbone/src/main/java/dev/hilla/parser/plugins/backbone/EntityPlugin.java @@ -67,8 +67,8 @@ public NodeDependencies scan(@Nonnull NodeDependencies nodeDependencies) { Stream.of(EntityNode.of(ref.getClassInfo()))); } - private void attachSchemaWithNameToOpenApi(Schema schema, String name, - OpenAPI openApi) { + public static void attachSchemaWithNameToOpenApi(Schema schema, + String name, OpenAPI openApi) { var components = openApi.getComponents(); if (components == null) { diff --git a/packages/java/parser-jvm-plugin-subtypes/pom.xml b/packages/java/parser-jvm-plugin-subtypes/pom.xml new file mode 100644 index 0000000000..81d2e6fee7 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + + dev.hilla + hilla-project + 2.3-SNAPSHOT + ../../../pom.xml + + + parser-jvm-plugin-subtypes + Hilla JVM Parser SubTypes Plugin + jar + + + ${project.parent.basedir} + + + + + dev.hilla + parser-jvm-core + ${project.version} + + + com.google.code.findbugs + jsr305 + + + io.github.classgraph + classgraph + + + org.junit.jupiter + junit-jupiter + test + + + dev.hilla + parser-jvm-utils + ${project.version} + + + dev.hilla + parser-jvm-plugin-backbone + ${project.version} + + + dev.hilla + parser-jvm-test-utils + ${project.version} + test + + + diff --git a/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java b/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java new file mode 100644 index 0000000000..339228b749 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java @@ -0,0 +1,155 @@ +package dev.hilla.parser.plugins.subtypes; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import dev.hilla.parser.core.AbstractNode; +import dev.hilla.parser.core.AbstractPlugin; +import dev.hilla.parser.core.Node; +import dev.hilla.parser.core.NodeDependencies; +import dev.hilla.parser.core.NodePath; +import dev.hilla.parser.core.Plugin; +import dev.hilla.parser.core.PluginConfiguration; +import dev.hilla.parser.models.ClassInfoModel; +import dev.hilla.parser.models.ClassRefSignatureModel; +import dev.hilla.parser.plugins.backbone.BackbonePlugin; +import dev.hilla.parser.plugins.backbone.EntityPlugin; +import dev.hilla.parser.plugins.backbone.nodes.EntityNode; +import dev.hilla.parser.plugins.backbone.nodes.TypedNode; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; + +import javax.annotation.Nonnull; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Stream; + +/** + * This plugin adds support for {@code @JsonTypeInfo} and {@code @JsonSubTypes}. + */ +public final class SubTypesPlugin extends AbstractPlugin { + @Override + public void enter(NodePath nodePath) { + } + + @Override + public void exit(NodePath nodePath) { + // deal with the union nodes, which does not correspond to an existing + // class, but express the union of all the @JsonSubTypes + if (nodePath.getNode() instanceof UnionNode) { + var unionNode = (UnionNode) nodePath.getNode(); + var cls = (Class) unionNode.getSource().get(); + + // verify that the class has a @JsonTypeInfo annotation + // and then add all the @JsonSubTypes to the schema as a `oneOf` + if (cls.getAnnotationsByType(JsonTypeInfo.class).length > 0) { + var schema = (Schema) unionNode.getTarget(); + getJsonSubTypes(cls).map(JsonSubTypes.Type::value) + .forEach(c -> { + schema.addOneOfItem(new Schema() { + { + set$ref("#/components/schemas/" + + c.getName()); + } + }); + }); + } + + // attach the schema to the openapi + EntityPlugin.attachSchemaWithNameToOpenApi(unionNode.getTarget(), + cls.getName() + "Union", + (OpenAPI) nodePath.getParentPath().getNode().getTarget()); + } + + // entity nodes whose superclass has a @JsonSubTypes annotation must + // have a @type property whose value comes from the annotation + if (nodePath.getNode() instanceof EntityNode) { + var entityNode = (EntityNode) nodePath.getNode(); + var cls = (Class) entityNode.getSource().get(); + + Optional.ofNullable(cls.getSuperclass()) + .map(SubTypesPlugin::getJsonSubTypes).stream() + .flatMap(Function.identity()) + .filter(t -> cls.equals(t.value())).findAny() + .ifPresent(t -> { + var schema = (ComposedSchema) entityNode.getTarget(); + schema.getAnyOf().stream() + .filter(s -> s instanceof ObjectSchema) + .map(ObjectSchema.class::cast) + .forEach(s -> s.addProperty("@type", + new StringSchema() { + { + setType("string"); + setExample(t.name()); + } + })); + }); + } + } + + @Override + public Collection> getRequiredPlugins() { + return List.of(BackbonePlugin.class); + } + + @Nonnull + @Override + public NodeDependencies scan(@Nonnull NodeDependencies nodeDependencies) { + if (!(nodeDependencies.getNode() instanceof TypedNode)) { + return nodeDependencies; + } + + var typedNode = (TypedNode) nodeDependencies.getNode(); + if (!(typedNode.getType() instanceof ClassRefSignatureModel)) { + return nodeDependencies; + } + + var ref = (ClassRefSignatureModel) typedNode.getType(); + if (ref.isJDKClass() || ref.isDate() || ref.isIterable()) { + return nodeDependencies; + } + + // all types mentioned in @JsonSubTypes must be parsed, even if they are + // not used directly + Class refClass = (Class) ref.getClassInfo().get(); + var subTypes = getJsonSubTypes(refClass).map(JsonSubTypes.Type::value) + .map(ClassInfoModel::of).> map(EntityNode::of); + + // create a union node for classes annotated with @JsonTypeInfo + if (refClass.getAnnotationsByType(JsonTypeInfo.class).length > 0) { + var unionType = UnionNode.of(ref.getClassInfo()); + subTypes = Stream.concat(Stream.of(unionType), subTypes); + } + + return nodeDependencies.appendRelatedNodes(subTypes); + } + + private static Stream getJsonSubTypes(Class cls) { + return Optional.of(cls) + .map(c -> c.getAnnotationsByType(JsonSubTypes.class)) + .filter(a -> a.length > 0).map(a -> a[0]) + .map(JsonSubTypes::value).stream().flatMap(Arrays::stream); + } + + /** + * A node that represents the union of all the mentioned subclasses of a + * class annotated with {@code @JsonSubTypes}. + */ + public static class UnionNode + extends AbstractNode> { + private UnionNode(@Nonnull ClassInfoModel source, + @Nonnull ObjectSchema target) { + super(source, target); + } + + @Nonnull + static public UnionNode of(@Nonnull ClassInfoModel model) { + return new UnionNode(model, new ObjectSchema()); + } + } +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/main/java/module-info.java b/packages/java/parser-jvm-plugin-subtypes/src/main/java/module-info.java new file mode 100644 index 0000000000..564a7b8c9e --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/main/java/module-info.java @@ -0,0 +1,12 @@ +module dev.hilla.parser.plugins.subtypes { + requires com.fasterxml.jackson.databind; + requires dev.hilla.parser.plugins.backbone; + requires dev.hilla.parser.utils; + requires jsr305; + requires jakarta.annotation; + requires io.swagger.v3.oas.models; + requires io.github.classgraph; + requires dev.hilla.parser.core; + + exports dev.hilla.parser.plugins.subtypes; +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/AddEvent.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/AddEvent.java new file mode 100644 index 0000000000..6cd61b804d --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/AddEvent.java @@ -0,0 +1,6 @@ +package dev.hilla.parser.plugins.subtypes; + +public class AddEvent extends BaseEvent { + + public String item; +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/BaseEvent.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/BaseEvent.java new file mode 100644 index 0000000000..e67663186c --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/BaseEvent.java @@ -0,0 +1,12 @@ +package dev.hilla.parser.plugins.subtypes; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY) +@JsonSubTypes({ @JsonSubTypes.Type(value = AddEvent.class, name = "add"), + @JsonSubTypes.Type(value = UpdateEvent.class, name = "update"), + @JsonSubTypes.Type(value = DeleteEvent.class, name = "delete") }) +public class BaseEvent { + public int id; +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/DeleteEvent.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/DeleteEvent.java new file mode 100644 index 0000000000..7622775281 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/DeleteEvent.java @@ -0,0 +1,7 @@ +package dev.hilla.parser.plugins.subtypes; + +public class DeleteEvent extends BaseEvent { + + public String item; + public boolean force; +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/Endpoint.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/Endpoint.java new file mode 100644 index 0000000000..c6b495965f --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/Endpoint.java @@ -0,0 +1,11 @@ +package dev.hilla.parser.plugins.subtypes; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Endpoint { +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/EndpointExposed.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/EndpointExposed.java new file mode 100644 index 0000000000..1a3aecc092 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/EndpointExposed.java @@ -0,0 +1,11 @@ +package dev.hilla.parser.plugins.subtypes; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface EndpointExposed { +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesEndpoint.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesEndpoint.java new file mode 100644 index 0000000000..1c9e290880 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesEndpoint.java @@ -0,0 +1,12 @@ +package dev.hilla.parser.plugins.subtypes; + +@Endpoint +public class SubTypesEndpoint { + + public BaseEvent sendEvent() { + return new AddEvent(); + } + + public void receiveEvent(BaseEvent event) { + } +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesMethodsTest.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesMethodsTest.java new file mode 100644 index 0000000000..9c81ac08f0 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/SubTypesMethodsTest.java @@ -0,0 +1,28 @@ +package dev.hilla.parser.plugins.subtypes; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import dev.hilla.parser.core.Parser; +import dev.hilla.parser.plugins.backbone.BackbonePlugin; +import dev.hilla.parser.plugins.subtypes.test.helpers.TestHelper; + +public class SubTypesMethodsTest { + private final TestHelper helper = new TestHelper(getClass()); + + @Test + public void should_CorrectlyHandleSuperClassMethods() + throws IOException, URISyntaxException { + var openAPI = new Parser().classLoader(getClass().getClassLoader()) + .classPath(Set.of(helper.getTargetDir().toString())) + .endpointAnnotation(Endpoint.class.getName()) + .endpointExposedAnnotation(EndpointExposed.class.getName()) + .addPlugin(new BackbonePlugin()).addPlugin(new SubTypesPlugin()) + .execute(); + + helper.executeParserWithConfig(openAPI); + } +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/UpdateEvent.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/UpdateEvent.java new file mode 100644 index 0000000000..e9e7fe40be --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/UpdateEvent.java @@ -0,0 +1,7 @@ +package dev.hilla.parser.plugins.subtypes; + +public class UpdateEvent extends BaseEvent { + + public String oldItem; + public String newItem; +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/test/helpers/TestHelper.java b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/test/helpers/TestHelper.java new file mode 100644 index 0000000000..e2cd1f2e2b --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/java/dev/hilla/parser/plugins/subtypes/test/helpers/TestHelper.java @@ -0,0 +1,41 @@ +package dev.hilla.parser.plugins.subtypes.test.helpers; + +import static dev.hilla.parser.testutils.JsonAssertions.assertEquals; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Path; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import dev.hilla.parser.testutils.ResourceLoader; + +import io.swagger.v3.core.util.Json; +import io.swagger.v3.oas.models.OpenAPI; + +public final class TestHelper { + private final ObjectMapper mapper = Json.mapper(); + private final ResourceLoader resourceLoader; + private final Path targetDir; + + public TestHelper(Class cls) { + try { + this.resourceLoader = new ResourceLoader(cls); + this.targetDir = resourceLoader.findTargetDirPath(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + + public void executeParserWithConfig(OpenAPI openAPI) + throws IOException, URISyntaxException { + var expected = mapper.readValue(resourceLoader.find("openapi.json"), + OpenAPI.class); + + assertEquals(expected, openAPI); + } + + public Path getTargetDir() { + return targetDir; + } +} diff --git a/packages/java/parser-jvm-plugin-subtypes/src/test/resources/dev/hilla/parser/plugins/subtypes/openapi.json b/packages/java/parser-jvm-plugin-subtypes/src/test/resources/dev/hilla/parser/plugins/subtypes/openapi.json new file mode 100644 index 0000000000..6704d5ae47 --- /dev/null +++ b/packages/java/parser-jvm-plugin-subtypes/src/test/resources/dev/hilla/parser/plugins/subtypes/openapi.json @@ -0,0 +1,172 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Hilla Application", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost:8080/connect", + "description": "Hilla Backend" + } + ], + "tags": [ + { + "name": "SubTypesEndpoint", + "x-class-name": "dev.hilla.parser.plugins.subtypes.SubTypesEndpoint" + } + ], + "paths": { + "/SubTypesEndpoint/receiveEvent": { + "post": { + "tags": [ + "SubTypesEndpoint" + ], + "operationId": "SubTypesEndpoint_receiveEvent_POST", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "event": { + "nullable": true, + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "" + } + } + } + }, + "/SubTypesEndpoint/sendEvent": { + "post": { + "tags": [ + "SubTypesEndpoint" + ], + "operationId": "SubTypesEndpoint_sendEvent_POST", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "nullable": true, + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "dev.hilla.parser.plugins.subtypes.BaseEvent": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + } + }, + "dev.hilla.parser.plugins.subtypes.BaseEventUnion": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.AddEvent" + }, + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.UpdateEvent" + }, + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.DeleteEvent" + } + ] + }, + "dev.hilla.parser.plugins.subtypes.AddEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "item": { + "type": "string", + "nullable": true + }, + "@type": { + "type": "string", + "example": "add" + } + } + } + ] + }, + "dev.hilla.parser.plugins.subtypes.UpdateEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "oldItem": { + "type": "string", + "nullable": true + }, + "newItem": { + "type": "string", + "nullable": true + }, + "@type": { + "type": "string", + "example": "update" + } + } + } + ] + }, + "dev.hilla.parser.plugins.subtypes.DeleteEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "item": { + "type": "string", + "nullable": true + }, + "force": { + "type": "boolean" + }, + "@type": { + "type": "string", + "example": "delete" + } + } + } + ] + } + } + } +} diff --git a/packages/java/tests/csrf-context/package-lock.json b/packages/java/tests/csrf-context/package-lock.json index 4ebc6827c1..32b7c527c6 100644 --- a/packages/java/tests/csrf-context/package-lock.json +++ b/packages/java/tests/csrf-context/package-lock.json @@ -15,6 +15,7 @@ "@hilla/generator-typescript-plugin-client": "../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "../../../ts/generator-typescript-utils", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -340,6 +341,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -2701,6 +2741,10 @@ "resolved": "../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../ts/generator-typescript-utils", "link": true @@ -8642,6 +8686,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/csrf-context/package.json b/packages/java/tests/csrf-context/package.json index a4f49fb7f3..375970d36b 100644 --- a/packages/java/tests/csrf-context/package.json +++ b/packages/java/tests/csrf-context/package.json @@ -11,6 +11,7 @@ "@hilla/generator-typescript-plugin-client": "../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "../../../ts/generator-typescript-utils", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -45,6 +46,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -69,7 +71,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "a7a154a5f79c2c1f92242d6a8f75c4bf6df97cf1d21c6505bf6e543827b8b4a0" + "hash": "bdc792e23e473f252035f18d9b973ebbda3ba7431ac0ee2c6daab9bb5f0fa890" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/csrf/package-lock.json b/packages/java/tests/csrf/package-lock.json index 532266268f..51e7054700 100644 --- a/packages/java/tests/csrf/package-lock.json +++ b/packages/java/tests/csrf/package-lock.json @@ -15,6 +15,7 @@ "@hilla/generator-typescript-plugin-client": "../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "../../../ts/generator-typescript-utils", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -340,6 +341,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -2713,6 +2753,10 @@ "resolved": "../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../ts/generator-typescript-utils", "link": true @@ -8721,6 +8765,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/csrf/package.json b/packages/java/tests/csrf/package.json index a4f49fb7f3..375970d36b 100644 --- a/packages/java/tests/csrf/package.json +++ b/packages/java/tests/csrf/package.json @@ -11,6 +11,7 @@ "@hilla/generator-typescript-plugin-client": "../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "../../../ts/generator-typescript-utils", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -45,6 +46,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", @@ -69,7 +71,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "a7a154a5f79c2c1f92242d6a8f75c4bf6df97cf1d21c6505bf6e543827b8b4a0" + "hash": "bdc792e23e473f252035f18d9b973ebbda3ba7431ac0ee2c6daab9bb5f0fa890" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/gradle/single-module-tests/package.json b/packages/java/tests/gradle/single-module-tests/package.json index 476740c727..3a47d631d0 100644 --- a/packages/java/tests/gradle/single-module-tests/package.json +++ b/packages/java/tests/gradle/single-module-tests/package.json @@ -11,6 +11,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/hilla-frontend": "file:../../../../ts/hilla-frontend", "@hilla/react-auth": "file:../../../../ts/react-auth", diff --git a/packages/java/tests/gradle/single-module/package.json b/packages/java/tests/gradle/single-module/package.json index 16cb25325b..74e725ee90 100644 --- a/packages/java/tests/gradle/single-module/package.json +++ b/packages/java/tests/gradle/single-module/package.json @@ -11,6 +11,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/hilla-frontend": "file:../../../../ts/hilla-frontend", "@hilla/react-auth": "file:../../../../ts/react-auth", diff --git a/packages/java/tests/spring/endpoints discovery/package-lock.json b/packages/java/tests/spring/endpoints discovery/package-lock.json index dcb65c6d1a..8c84c624f1 100644 --- a/packages/java/tests/spring/endpoints discovery/package-lock.json +++ b/packages/java/tests/spring/endpoints discovery/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -137,7 +138,6 @@ } }, "../../../../ts/frontend": { - "name": "@hilla/frontend", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -417,6 +417,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -477,7 +516,6 @@ } }, "../../../../ts/react-auth": { - "name": "@hilla/react-auth", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -506,7 +544,6 @@ } }, "../../../../ts/react-form": { - "name": "@hilla/react-form", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -533,7 +570,6 @@ } }, "../../../../ts/react-grid": { - "name": "@hilla/react-grid", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -560,6 +596,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2867,6 +2906,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10334,6 +10377,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/endpoints discovery/package.json b/packages/java/tests/spring/endpoints discovery/package.json index 2320a4ef81..e2934e56a3 100644 --- a/packages/java/tests/spring/endpoints discovery/package.json +++ b/packages/java/tests/spring/endpoints discovery/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -117,6 +118,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -208,7 +210,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "3ecb2a323a0d89381773d8b597dd8ec5378ff0afca6a2b4331fa28b0a76dd54a" + "hash": "3b4aa01b7c39fc3363189e08c226366c953f77e1881b8587cd50bc7d5dad6ee7" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/endpoints-contextpath/package-lock.json b/packages/java/tests/spring/endpoints-contextpath/package-lock.json index 290c406332..46bfb78ce8 100644 --- a/packages/java/tests/spring/endpoints-contextpath/package-lock.json +++ b/packages/java/tests/spring/endpoints-contextpath/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -417,6 +418,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -560,6 +600,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2867,6 +2910,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10256,6 +10303,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/endpoints-contextpath/package.json b/packages/java/tests/spring/endpoints-contextpath/package.json index ed8a625eef..e2934e56a3 100644 --- a/packages/java/tests/spring/endpoints-contextpath/package.json +++ b/packages/java/tests/spring/endpoints-contextpath/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -117,6 +118,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -208,7 +210,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "59abee59e375f62daa0b7ff8be48faf218271fb72df78af36363c4cc91f44332" + "hash": "3b4aa01b7c39fc3363189e08c226366c953f77e1881b8587cd50bc7d5dad6ee7" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/endpoints-custom-client/package-lock.json b/packages/java/tests/spring/endpoints-custom-client/package-lock.json index 29821540d4..fa3a55ee50 100644 --- a/packages/java/tests/spring/endpoints-custom-client/package-lock.json +++ b/packages/java/tests/spring/endpoints-custom-client/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -416,6 +417,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -559,6 +599,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2866,6 +2909,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10254,6 +10301,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/endpoints-custom-client/package.json b/packages/java/tests/spring/endpoints-custom-client/package.json index ed8a625eef..e2934e56a3 100644 --- a/packages/java/tests/spring/endpoints-custom-client/package.json +++ b/packages/java/tests/spring/endpoints-custom-client/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -117,6 +118,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -208,7 +210,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "59abee59e375f62daa0b7ff8be48faf218271fb72df78af36363c4cc91f44332" + "hash": "3b4aa01b7c39fc3363189e08c226366c953f77e1881b8587cd50bc7d5dad6ee7" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/endpoints-latest-java/package-lock.json b/packages/java/tests/spring/endpoints-latest-java/package-lock.json index 07756a6f72..0b3ec8b5af 100644 --- a/packages/java/tests/spring/endpoints-latest-java/package-lock.json +++ b/packages/java/tests/spring/endpoints-latest-java/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -416,6 +417,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -556,6 +596,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2863,6 +2906,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10330,6 +10377,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/endpoints-latest-java/package.json b/packages/java/tests/spring/endpoints-latest-java/package.json index ed8a625eef..e2934e56a3 100644 --- a/packages/java/tests/spring/endpoints-latest-java/package.json +++ b/packages/java/tests/spring/endpoints-latest-java/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -117,6 +118,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -208,7 +210,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "59abee59e375f62daa0b7ff8be48faf218271fb72df78af36363c4cc91f44332" + "hash": "3b4aa01b7c39fc3363189e08c226366c953f77e1881b8587cd50bc7d5dad6ee7" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/endpoints-maven-engine/package-lock.json b/packages/java/tests/spring/endpoints-maven-engine/package-lock.json index a5c32013c2..dc48db7e17 100644 --- a/packages/java/tests/spring/endpoints-maven-engine/package-lock.json +++ b/packages/java/tests/spring/endpoints-maven-engine/package-lock.json @@ -7,19 +7,16 @@ "name": "no-name", "license": "UNLICENSED", "dependencies": { - "@hilla/form": "file:../../../../ts/form", - "@hilla/frontend": "file:../../../../ts/frontend", - "@hilla/generator-typescript-cli": "file:../../../../ts/generator-typescript-cli", - "@hilla/generator-typescript-core": "file:../../../../ts/generator-typescript-core", - "@hilla/generator-typescript-plugin-backbone": "file:../../../../ts/generator-typescript-plugin-backbone", - "@hilla/generator-typescript-plugin-barrel": "file:../../../../ts/generator-typescript-plugin-barrel", - "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", - "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", - "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", - "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", - "@hilla/react-auth": "file:../../../../ts/react-auth", - "@hilla/react-form": "file:../../../../ts/react-form", - "@hilla/react-grid": "file:../../../../ts/react-grid", + "@hilla/form": "../../../../ts/form", + "@hilla/frontend": "../../../../ts/hilla-frontend", + "@hilla/generator-typescript-cli": "../../../../ts/generator-typescript-cli", + "@hilla/generator-typescript-core": "../../../../ts/generator-typescript-core", + "@hilla/generator-typescript-plugin-backbone": "../../../../ts/generator-typescript-plugin-backbone", + "@hilla/generator-typescript-plugin-barrel": "../../../../ts/generator-typescript-plugin-barrel", + "@hilla/generator-typescript-plugin-client": "../../../../ts/generator-typescript-plugin-client", + "@hilla/generator-typescript-plugin-model": "../../../../ts/generator-typescript-plugin-model", + "@hilla/generator-typescript-plugin-push": "../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-utils": "../../../../ts/generator-typescript-utils", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", "@vaadin/router": "1.7.5", @@ -45,54 +42,24 @@ }, "../../../../ts/form": { "name": "@hilla/form", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache-2.0", "dependencies": { - "@hilla/frontend": "*", - "validator": "^13.11.0" + "rimraf": "^3.0.2", + "validator": "^13.6.0" }, "devDependencies": { "@esm-bundle/chai": "^4.3.4-fix.0", - "@types/chai": "^4.3.5", + "@types/chai": "^4.2.21", "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "lit": "^2.3.0" - } - }, - "../../../../ts/frontend": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@vaadin/common-frontend": "^0.0.18", - "atmosphere.js": "^3.1.3", - "js-cookie": "^3.0.5" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@open-wc/testing": "^3.2.0", - "@types/atmosphere.js": "^2.1.3", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", - "@types/js-cookie": "^3.0.3", - "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-as-promised": "^7.1.1", + "@types/mocha": "^9.0.0", + "@types/sinon": "^10.0.2", + "@types/sinon-chai": "^3.2.5", + "@types/validator": "^13.6.0", "chai-dom": "^1.11.0", - "fetch-mock": "^9.11.0", - "sinon": "^15.2.0", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" + "typescript": "^5.0.1-rc" }, "peerDependencies": { "lit": "^2.3.0" @@ -100,69 +67,67 @@ }, "../../../../ts/generator-typescript-cli": { "name": "@hilla/generator-typescript-cli", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", "get-stdin": "^9.0.0", - "meow": "^12.1.0" + "meow": "^10.1.1" }, "bin": { "tsgen": "bin/index.js" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "chai-as-promised": "^7.1.1", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.3.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-core": { "name": "@hilla/generator-typescript-core", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "meow": "^12.1.0", - "openapi-types": "^12.1.3", - "typescript": "^5.1.6" + "@apidevtools/swagger-parser": "^10.0.3", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "meow": "^10.1.1", + "openapi-types": "^9.3.0", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.3.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" @@ -170,208 +135,208 @@ }, "../../../../ts/generator-typescript-plugin-backbone": { "name": "@hilla/generator-typescript-plugin-backbone", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", "fast-deep-equal": "^3.1.3", - "openapi-types": "^12.1.3", - "typescript": "^5.1.6" + "openapi-types": "^9.3.0", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-plugin-barrel": { "name": "@hilla/generator-typescript-plugin-barrel", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "typescript": "^5.1.6" + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-backbone": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-backbone": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-plugin-client": { "name": "@hilla/generator-typescript-plugin-client", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "typescript": "^5.1.6" + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-plugin-model": { "name": "@hilla/generator-typescript-plugin-model", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", "fast-deep-equal": "^3.1.3", - "openapi-types": "^12.1.3", - "typescript": "^5.1.6" + "openapi-types": "^9.3.0", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/form": "^2.3.0-alpha5", - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5" + "@hilla/form": "^2.1.0-alpha4", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-backbone": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-plugin-push": { "name": "@hilla/generator-typescript-plugin-push", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", "fast-deep-equal": "^3.1.3", - "openapi-types": "^12.1.3", - "typescript": "^5.1.6" + "openapi-types": "^9.3.0", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4" } }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", - "version": "2.3.0-alpha5", + "version": "2.1.0-alpha4", "license": "Apache 2.0", "dependencies": { - "pino": "^8.15.0", - "pino-pretty": "^10.2.0", - "typescript": "^5.1.6" + "pino": "^7.0.5", + "pino-pretty": "^7.3.0", + "typescript": "^5.0.1-rc" }, "devDependencies": { - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" }, "engines": { "node": ">= 16.13" @@ -380,7 +345,6 @@ "../../../../ts/hilla-frontend": { "name": "@hilla/frontend", "version": "2.1.0-alpha4", - "extraneous": true, "license": "Apache-2.0", "dependencies": { "@vaadin/common-frontend": "^0.0.12", @@ -407,87 +371,6 @@ "lit": "^2.3.0" } }, - "../../../../ts/react-auth": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/frontend": "*" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "react-router-dom": "^6.16.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18", - "react-router-dom": "^6" - } - }, - "../../../../ts/react-form": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/form": "*" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18" - } - }, - "../../../../ts/react-grid": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/form": "*", - "@hilla/react-components": "2.2.0-alpha16" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2706,7 +2589,7 @@ "link": true }, "node_modules/@hilla/frontend": { - "resolved": "../../../../ts/frontend", + "resolved": "../../../../ts/hilla-frontend", "link": true }, "node_modules/@hilla/generator-typescript-cli": { @@ -2741,18 +2624,6 @@ "resolved": "../../../../ts/generator-typescript-utils", "link": true }, - "node_modules/@hilla/react-auth": { - "resolved": "../../../../ts/react-auth", - "link": true - }, - "node_modules/@hilla/react-form": { - "resolved": "../../../../ts/react-form", - "link": true - }, - "node_modules/@hilla/react-grid": { - "resolved": "../../../../ts/react-grid", - "link": true - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -7583,301 +7454,235 @@ "version": "file:../../../../ts/form", "requires": { "@esm-bundle/chai": "^4.3.4-fix.0", - "@hilla/frontend": "*", - "@types/chai": "^4.3.5", + "@types/chai": "^4.2.21", "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", + "@types/mocha": "^9.0.0", + "@types/sinon": "^10.0.2", + "@types/sinon-chai": "^3.2.5", + "@types/validator": "^13.6.0", "chai-dom": "^1.11.0", - "sinon": "^15.2.0", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "typescript": "^5.1.6", - "validator": "^13.11.0" + "typescript": "^5.0.1-rc", + "validator": "^13.6.0" } }, "@hilla/frontend": { - "version": "file:../../../../ts/frontend", + "version": "file:../../../../ts/hilla-frontend", "requires": { "@esm-bundle/chai": "^4.3.4-fix.0", - "@open-wc/testing": "^3.2.0", - "@types/atmosphere.js": "^2.1.3", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", + "@open-wc/testing": "^2.5.33", + "@types/chai": "^4.2.21", "@types/js-cookie": "^3.0.3", - "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "@vaadin/common-frontend": "^0.0.18", - "atmosphere.js": "^3.1.3", - "chai-as-promised": "^7.1.1", + "@types/mocha": "^9.0.0", + "@types/sinon": "^10.0.2", + "@types/sinon-chai": "^3.2.5", + "@types/validator": "^13.6.3", + "@vaadin/common-frontend": "^0.0.12", + "a-atmosphere-javascript": "3.1.3-2", "chai-dom": "^1.11.0", "fetch-mock": "^9.11.0", - "js-cookie": "^3.0.5", - "sinon": "^15.2.0", + "js-cookie": "^3.0.1", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-cli": { "version": "file:../../../../ts/generator-typescript-cli", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "chai-as-promised": "^7.1.1", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.3.0", "copyfiles": "^2.4.1", "get-stdin": "^9.0.0", - "meow": "^12.1.0", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "meow": "^10.1.1", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0" + "type-fest": "^2.5.1" } }, "@hilla/generator-typescript-core": { "version": "file:../../../../ts/generator-typescript-core", "requires": { - "@apidevtools/swagger-parser": "^10.1.0", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@apidevtools/swagger-parser": "^10.0.3", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.3.0", "copyfiles": "^2.4.1", - "meow": "^12.1.0", - "mocha": "^10.2.0", - "openapi-types": "^12.1.3", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "meow": "^10.1.1", + "mocha": "^9.1.3", + "openapi-types": "^9.3.0", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-plugin-backbone": { "version": "file:../../../../ts/generator-typescript-plugin-backbone", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", "fast-deep-equal": "^3.1.3", - "mocha": "^10.2.0", - "openapi-types": "^12.1.3", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "openapi-types": "^9.3.0", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-plugin-barrel": { "version": "file:../../../../ts/generator-typescript-plugin-barrel", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-backbone": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-plugin-client": { "version": "file:../../../../ts/generator-typescript-plugin-client", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-plugin-model": { "version": "file:../../../../ts/generator-typescript-plugin-model", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", "fast-deep-equal": "^3.1.3", - "mocha": "^10.2.0", - "openapi-types": "^12.1.3", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "openapi-types": "^9.3.0", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-plugin-push": { "version": "file:../../../../ts/generator-typescript-plugin-push", "requires": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@hilla/generator-typescript-core": "^2.1.0-alpha4", + "@hilla/generator-typescript-plugin-client": "^2.1.0-alpha4", + "@hilla/generator-typescript-utils": "^2.1.0-alpha4", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", "fast-deep-equal": "^3.1.3", - "mocha": "^10.2.0", - "openapi-types": "^12.1.3", - "pino": "^8.15.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "openapi-types": "^9.3.0", + "pino": "^7.0.5", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { - "@types/chai": "^4.3.5", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "c8": "^8.0.1", - "chai": "^4.3.7", - "concurrently": "^8.2.0", + "@types/chai": "^4.2.22", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.1", + "@types/sinon": "^10.0.6", + "@types/sinon-chai": "^3.2.5", + "c8": "^7.10.0", + "chai": "^4.3.4", + "concurrently": "^6.4.0", "copyfiles": "^2.4.1", - "mocha": "^10.2.0", - "pino": "^8.15.0", - "pino-pretty": "^10.2.0", - "rimraf": "^5.0.1", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "type-fest": "^4.2.0", - "typescript": "^5.1.6" - } - }, - "@hilla/react-auth": { - "version": "file:../../../../ts/react-auth", - "requires": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@hilla/frontend": "*", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "react-router-dom": "^6.16.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - } - }, - "@hilla/react-form": { - "version": "file:../../../../ts/react-form", - "requires": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@hilla/form": "*", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - } - }, - "@hilla/react-grid": { - "version": "file:../../../../ts/react-grid", - "requires": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@hilla/form": "*", - "@hilla/react-components": "2.2.0-alpha16", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", + "mocha": "^9.1.3", + "pino": "^7.0.5", + "pino-pretty": "^7.3.0", + "rimraf": "^3.0.2", + "sinon": "^11.1.2", "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" + "type-fest": "^2.5.1", + "typescript": "^5.0.1-rc" } }, "@jridgewell/gen-mapping": { diff --git a/packages/java/tests/spring/endpoints-maven-engine/package.json b/packages/java/tests/spring/endpoints-maven-engine/package.json index 65b8ab2e92..2258626e6a 100644 --- a/packages/java/tests/spring/endpoints-maven-engine/package.json +++ b/packages/java/tests/spring/endpoints-maven-engine/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", diff --git a/packages/java/tests/spring/endpoints/package-lock.json b/packages/java/tests/spring/endpoints/package-lock.json index d16eaa1852..0112a3aade 100644 --- a/packages/java/tests/spring/endpoints/package-lock.json +++ b/packages/java/tests/spring/endpoints/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -113,7 +114,7 @@ }, "../../../../ts/form": { "name": "@hilla/form", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache-2.0", "dependencies": { "@hilla/frontend": "*", @@ -137,7 +138,6 @@ } }, "../../../../ts/frontend": { - "name": "@hilla/frontend", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -417,6 +417,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -477,7 +516,6 @@ } }, "../../../../ts/react-auth": { - "name": "@hilla/react-auth", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -506,7 +544,6 @@ } }, "../../../../ts/react-form": { - "name": "@hilla/react-form", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -533,7 +570,6 @@ } }, "../../../../ts/react-grid": { - "name": "@hilla/react-grid", "version": "2.3.0-alpha5", "license": "Apache-2.0", "dependencies": { @@ -560,6 +596,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2867,6 +2906,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10255,6 +10298,33 @@ "typescript": "^5.1.6" } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/endpoints/package.json b/packages/java/tests/spring/endpoints/package.json index 2320a4ef81..e2934e56a3 100644 --- a/packages/java/tests/spring/endpoints/package.json +++ b/packages/java/tests/spring/endpoints/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -117,6 +118,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -208,7 +210,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "3ecb2a323a0d89381773d8b597dd8ec5378ff0afca6a2b4331fa28b0a76dd54a" + "hash": "3b4aa01b7c39fc3363189e08c226366c953f77e1881b8587cd50bc7d5dad6ee7" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/native/package-lock.json b/packages/java/tests/spring/native/package-lock.json index a93b85adb5..b8763d8274 100644 --- a/packages/java/tests/spring/native/package-lock.json +++ b/packages/java/tests/spring/native/package-lock.json @@ -7,29 +7,25 @@ "name": "no-name", "license": "UNLICENSED", "dependencies": { - "@hilla/form": "file:../../../../ts/form", - "@hilla/frontend": "file:../../../../ts/frontend", - "@hilla/generator-typescript-cli": "file:../../../../ts/generator-typescript-cli", - "@hilla/generator-typescript-core": "file:../../../../ts/generator-typescript-core", - "@hilla/generator-typescript-plugin-backbone": "file:../../../../ts/generator-typescript-plugin-backbone", - "@hilla/generator-typescript-plugin-barrel": "file:../../../../ts/generator-typescript-plugin-barrel", - "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", - "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", - "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", - "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", - "@hilla/react-auth": "file:../../../../ts/react-auth", + "@hilla/frontend": "../../../../ts/hilla-frontend", + "@hilla/generator-typescript-cli": "../../../../ts/generator-typescript-cli", + "@hilla/generator-typescript-core": "../../../../ts/generator-typescript-core", + "@hilla/generator-typescript-plugin-backbone": "../../../../ts/generator-typescript-plugin-backbone", + "@hilla/generator-typescript-plugin-barrel": "../../../../ts/generator-typescript-plugin-barrel", + "@hilla/generator-typescript-plugin-client": "../../../../ts/generator-typescript-plugin-client", + "@hilla/generator-typescript-plugin-model": "../../../../ts/generator-typescript-plugin-model", + "@hilla/generator-typescript-plugin-push": "../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-utils": "../../../../ts/generator-typescript-utils", "@hilla/react-components": "2.1.0-alpha9", - "@hilla/react-form": "file:../../../../ts/react-form", - "@hilla/react-grid": "file:../../../../ts/react-grid", "@polymer/polymer": "3.5.1", "@vaadin/common-frontend": "0.0.18", - "@vaadin/icon": "24.2.0-alpha16", - "@vaadin/icons": "24.2.0-alpha16", - "@vaadin/polymer-legacy-adapter": "24.2.0-alpha16", + "@vaadin/icon": "24.1.0-alpha6", + "@vaadin/icons": "24.1.0-alpha6", + "@vaadin/polymer-legacy-adapter": "24.1.0-alpha6", "@vaadin/router": "1.7.5", - "@vaadin/tooltip": "24.2.0-alpha16", - "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16", + "@vaadin/tooltip": "24.1.0-alpha6", + "@vaadin/vaadin-lumo-styles": "24.1.0-alpha6", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6", "construct-style-sheets-polyfill": "3.1.0", "lit": "2.7.6", "react": "^18.2.0", @@ -60,6 +56,7 @@ "../../../../ts/form": { "name": "@hilla/form", "version": "2.2.0-beta1", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "@hilla/frontend": "*", @@ -82,42 +79,12 @@ "lit": "^2.3.0" } }, - "../../../../ts/frontend": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@vaadin/common-frontend": "^0.0.18", - "atmosphere.js": "^3.1.3", - "js-cookie": "^3.0.5" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@open-wc/testing": "^3.2.0", - "@types/atmosphere.js": "^2.1.3", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", - "@types/js-cookie": "^3.0.3", - "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-as-promised": "^7.1.1", - "chai-dom": "^1.11.0", - "fetch-mock": "^9.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "lit": "^2.3.0" - } - }, "../../../../ts/generator-typescript-cli": { "name": "@hilla/generator-typescript-cli", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "get-stdin": "^9.0.0", "meow": "^12.1.0" }, @@ -125,7 +92,7 @@ "tsgen": "bin/index.js" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", @@ -148,16 +115,16 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-core": { "name": "@hilla/generator-typescript-core", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "meow": "^12.1.0", "openapi-types": "^12.1.3", "typescript": "^5.1.6" @@ -184,17 +151,17 @@ }, "../../../../ts/generator-typescript-plugin-backbone": { "name": "@hilla/generator-typescript-plugin-backbone", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "^5.1.6" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-client": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/mocha": "^10.0.1", "@types/node": "^20.5.0", @@ -215,21 +182,21 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-client": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-plugin-barrel": { "name": "@hilla/generator-typescript-plugin-barrel", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "typescript": "^5.1.6" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-backbone": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/mocha": "^10.0.1", "@types/node": "^20.5.0", @@ -250,20 +217,20 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-backbone": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-plugin-client": { "name": "@hilla/generator-typescript-plugin-client", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "typescript": "^5.1.6" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/mocha": "^10.0.1", "@types/node": "^20.5.0", @@ -284,22 +251,22 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-plugin-model": { "name": "@hilla/generator-typescript-plugin-model", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "^5.1.6" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-client": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/mocha": "^10.0.1", "@types/node": "^20.5.0", @@ -320,24 +287,24 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/form": "^2.3.0-alpha5", - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-backbone": "^2.3.0-alpha5" + "@hilla/form": "^2.2.0-beta1", + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-backbone": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-plugin-push": { "name": "@hilla/generator-typescript-plugin-push", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { - "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.2.0-beta1", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "^5.1.6" }, "devDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-client": "^2.2.0-beta1", "@types/chai": "^4.3.5", "@types/mocha": "^10.0.1", "@types/node": "^20.5.0", @@ -358,13 +325,13 @@ "node": ">= 16.13" }, "peerDependencies": { - "@hilla/generator-typescript-core": "^2.3.0-alpha5", - "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" + "@hilla/generator-typescript-core": "^2.2.0-beta1", + "@hilla/generator-typescript-plugin-client": "^2.2.0-beta1" } }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", - "version": "2.3.0-alpha5", + "version": "2.2.0-beta1", "license": "Apache 2.0", "dependencies": { "pino": "^8.15.0", @@ -394,7 +361,6 @@ "../../../../ts/hilla-frontend": { "name": "@hilla/frontend", "version": "2.2.0-beta1", - "extraneous": true, "license": "Apache-2.0", "dependencies": { "@vaadin/common-frontend": "^0.0.18", @@ -423,87 +389,6 @@ "lit": "^2.3.0" } }, - "../../../../ts/react-auth": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/frontend": "*" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "react-router-dom": "^6.16.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18", - "react-router-dom": "^6" - } - }, - "../../../../ts/react-form": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/form": "*" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18" - } - }, - "../../../../ts/react-grid": { - "version": "2.3.0-alpha5", - "license": "Apache-2.0", - "dependencies": { - "@hilla/form": "*", - "@hilla/react-components": "2.2.0-alpha16" - }, - "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.4.3", - "@types/chai": "^4.3.5", - "@types/chai-dom": "^1.11.0", - "@types/mocha": "^10.0.1", - "@types/react": "^18.2.20", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", - "@types/validator": "^13.11.1", - "chai-dom": "^1.11.0", - "sinon": "^15.2.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.1.6" - }, - "peerDependencies": { - "react": "^18" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -2554,12 +2439,8 @@ "node": ">=12" } }, - "node_modules/@hilla/form": { - "resolved": "../../../../ts/form", - "link": true - }, "node_modules/@hilla/frontend": { - "resolved": "../../../../ts/frontend", + "resolved": "../../../../ts/hilla-frontend", "link": true }, "node_modules/@hilla/generator-typescript-cli": { @@ -2594,10 +2475,6 @@ "resolved": "../../../../ts/generator-typescript-utils", "link": true }, - "node_modules/@hilla/react-auth": { - "resolved": "../../../../ts/react-auth", - "link": true - }, "node_modules/@hilla/react-components": { "version": "2.1.0-alpha9", "resolved": "https://registry.npmjs.org/@hilla/react-components/-/react-components-2.1.0-alpha9.tgz", @@ -2676,14 +2553,6 @@ } } }, - "node_modules/@hilla/react-form": { - "resolved": "../../../../ts/react-form", - "link": true - }, - "node_modules/@hilla/react-grid": { - "resolved": "../../../../ts/react-grid", - "link": true - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -3000,13 +2869,13 @@ "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==" }, "node_modules/@vaadin/a11y-base": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.2.0-alpha16.tgz", - "integrity": "sha512-fDdShC3VTVSeKvhvLNz57aV5YHuzYwVZbxk95gt7/oDaRjDdtwB3UNbfrocYeA9K7ZYelKYaJKGgOdB61D9nvw==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.1.0-alpha6.tgz", + "integrity": "sha512-6gg6Qgh4yfM9zXRJBFFSPumOFyiSm8R2A/YuTlPb4lAE6eWRu2ze5F166HR4vk/B6E9Z0OPHN00rLAAkP7xeKA==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.2.0-alpha16", + "@vaadin/component-base": "24.1.0-alpha6", "lit": "^2.0.0" } }, @@ -3503,9 +3372,9 @@ } }, "node_modules/@vaadin/component-base": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.2.0-alpha16.tgz", - "integrity": "sha512-CgYhep24uHL94Zc1g/GkUMFf7J0xcYaPP0Nx7ktkGIk1Vw/5gcoRgG8JiTjE96s4n1akEj33IGRJ+JN1kPgLlw==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.1.0-alpha6.tgz", + "integrity": "sha512-NevzKyke+u/ZiVQpXx6wbzbKZrYQUlxrlK5LOyK80RAHXUZ3qBscs1bCtr/7VIDWwpjSNFgPiBXeMHgVMiqGeg==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -4266,24 +4135,24 @@ } }, "node_modules/@vaadin/icon": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.2.0-alpha16.tgz", - "integrity": "sha512-LofovgfWl2Tv1+zuq/h3v48qJ4o9nDt8vNVCtKZ52reEzP9S589oSyPi1nnGCCeDMmnXq0rpo/Qga+ITmATFyA==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.1.0-alpha6.tgz", + "integrity": "sha512-FAVnwyL31sMBELo43ctdAFCpzLyOyzZX7BMsqskxioygzqMg2HN31YtBMUp6oZGmfxgGvzkSgpbkUvJhQkgP/w==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.2.0-alpha16", - "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16", + "@vaadin/component-base": "24.1.0-alpha6", + "@vaadin/vaadin-lumo-styles": "24.1.0-alpha6", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6", "lit": "^2.0.0" } }, "node_modules/@vaadin/icons": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.2.0-alpha16.tgz", - "integrity": "sha512-twY02/slu1RkVLG8iWGGbN4NwcRdvjGm1UNbcEkTqo8BPPameGccVSdStLYq2rGQlnZhhcg7nWmtqG//sl9bRQ==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.1.0-alpha6.tgz", + "integrity": "sha512-OdMJG0JvEyuD1wLD9fxPZ/qZGX4TM+5nwvXzW2EtxxVml2GWN9W7M5oV3pUPG/Q9aF+WaoZcGkyT1pOUkFQm7g==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "24.2.0-alpha16" + "@vaadin/icon": "24.1.0-alpha6" } }, "node_modules/@vaadin/input-container": { @@ -4859,17 +4728,17 @@ } }, "node_modules/@vaadin/overlay": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.2.0-alpha16.tgz", - "integrity": "sha512-KA8c2DfgL4LCfksFEHF3J7fyDO61oPxMI5LsdbldWHU3QRz09Gv0fHODexrjbg8mZAFZ+khc5oT2wOYGnJ8g+Q==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.1.0-alpha6.tgz", + "integrity": "sha512-LRiECwUD9yBYDibkGAxjQyb4UBIegLC0ZeT8/F7GMCvDffR9f6Nx71xyR4aieoDrpBwKtqA9HDzWN0AnLCx9aA==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/a11y-base": "24.2.0-alpha16", - "@vaadin/component-base": "24.2.0-alpha16", - "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16", - "@vaadin/vaadin-material-styles": "24.2.0-alpha16", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16" + "@vaadin/a11y-base": "24.1.0-alpha6", + "@vaadin/component-base": "24.1.0-alpha6", + "@vaadin/vaadin-lumo-styles": "24.1.0-alpha6", + "@vaadin/vaadin-material-styles": "24.1.0-alpha6", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6" } }, "node_modules/@vaadin/password-field": { @@ -4908,12 +4777,12 @@ } }, "node_modules/@vaadin/polymer-legacy-adapter": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.2.0-alpha16.tgz", - "integrity": "sha512-E5IRICpBwcDqYTtnTaW39K2uGlQl9OMRLoZFENx7r3amTgc/b8fSJtRsXjh943lfcFzl8APoK2izEak/it25FQ==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.1.0-alpha6.tgz", + "integrity": "sha512-cVLSro6bNEjCkrK4aScTRAVJfVfyGfa2pwq9tdYkSWabGbE2NL32rGNRCPEJJvu1Bn82qAD/UIZ6LxLNRk/Zyw==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6", "lit": "^2.0.0" } }, @@ -5431,17 +5300,17 @@ } }, "node_modules/@vaadin/tooltip": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.2.0-alpha16.tgz", - "integrity": "sha512-7YTjZ3gDdU2t7O5+J9mcwDrQXx7EA4oVyvIXsAbOrtuZQe2PRmFVm9Sv5tUsWaWVpb/4CP8tfvwt6NFHFSNLCA==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.1.0-alpha6.tgz", + "integrity": "sha512-6goTYOrKEIrxoUgjxCBXUu7szX5GF1rEJ8m09QeEcdHFH3kn7pdQW/nGp7gE9cOloV1jrw/ySE+6SIiRAarzKw==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/a11y-base": "24.2.0-alpha16", - "@vaadin/component-base": "24.2.0-alpha16", - "@vaadin/overlay": "24.2.0-alpha16", - "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16", - "@vaadin/vaadin-material-styles": "24.2.0-alpha16", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16" + "@vaadin/a11y-base": "24.1.0-alpha6", + "@vaadin/component-base": "24.1.0-alpha6", + "@vaadin/overlay": "24.1.0-alpha6", + "@vaadin/vaadin-lumo-styles": "24.1.0-alpha6", + "@vaadin/vaadin-material-styles": "24.1.0-alpha6", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6" } }, "node_modules/@vaadin/upload": { @@ -5498,28 +5367,28 @@ "integrity": "sha512-N6a5nLT/ytEUlpPo+nvdCKIGoyNjPsj3rzPGvGYK8x9Ceg76OTe1xI/GtN71mRW9e2HUScR0kCNOkl1Z63YDjw==" }, "node_modules/@vaadin/vaadin-lumo-styles": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.2.0-alpha16.tgz", - "integrity": "sha512-HZvCDFHXj9eKw6BUeJ7P2TFNG+xrZNDoNJ/gJpgBbSRekTvFZAHB76ZuFwqhvCmvuZUvdcbF1NNuh00LPmZMoA==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.1.0-alpha6.tgz", + "integrity": "sha512-8RfcnLAjVVP6ZkEFDtxUnsgvZOj0LbCxujQSj24Iekr5hM3Kw1cSNUaT8pj+Jz8CKNDuO4RnYH+FMLeP970Obg==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "24.2.0-alpha16", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16" + "@vaadin/icon": "24.1.0-alpha6", + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6" } }, "node_modules/@vaadin/vaadin-material-styles": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.2.0-alpha16.tgz", - "integrity": "sha512-DcN1kIdnwiDVUIxMiYrL2Pav7oA1Jer9Q+oziLVdEOZ49NKUeo3k0AduYvt05fasf+rrC+6Qd0OHU1r1lW7iHg==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.1.0-alpha6.tgz", + "integrity": "sha512-WE7H2iTMgPBRLJ7wHihl5TQeNE0GkTsSE5LuUn+iZjBMgIuW9rnGwkb+SpL8nBcRvzmwvyHd7q1DNLgxQcd2EA==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16" + "@vaadin/vaadin-themable-mixin": "24.1.0-alpha6" } }, "node_modules/@vaadin/vaadin-themable-mixin": { - "version": "24.2.0-alpha16", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.2.0-alpha16.tgz", - "integrity": "sha512-vXdhYK2ZTOwFFJr4i+t6dSzA36cih6iRfDQ8UvnnnT0JwuAaXvXQjlAjs2i2Qmdes0k7ia5EQ6wHrm532iTBlg==", + "version": "24.1.0-alpha6", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.1.0-alpha6.tgz", + "integrity": "sha512-p8m9I/eYDTCbSRwRXGXg77Bxe84zeCTjw3Obb6mUlI7VgEmC4sAZ/yJ4RvancLFAH8c0zrnLg1F8kukSsbA7WA==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^2.0.0" diff --git a/packages/java/tests/spring/native/package.json b/packages/java/tests/spring/native/package.json index 7bf107fb94..f6998dda36 100644 --- a/packages/java/tests/spring/native/package.json +++ b/packages/java/tests/spring/native/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-components": "2.1.0-alpha9", diff --git a/packages/java/tests/spring/react-grid-test/package-lock.json b/packages/java/tests/spring/react-grid-test/package-lock.json index 23d31c9ade..d5b75b6bf7 100644 --- a/packages/java/tests/spring/react-grid-test/package-lock.json +++ b/packages/java/tests/spring/react-grid-test/package-lock.json @@ -16,6 +16,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/hilla-frontend": "file:../../../../ts/hilla-frontend", "@hilla/react-auth": "file:../../../../ts/react-auth", @@ -354,6 +355,45 @@ "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5" } }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -468,6 +508,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -2554,6 +2597,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true diff --git a/packages/java/tests/spring/react-grid-test/package.json b/packages/java/tests/spring/react-grid-test/package.json index 1e3c8e7c6c..4f59a1b4d0 100644 --- a/packages/java/tests/spring/react-grid-test/package.json +++ b/packages/java/tests/spring/react-grid-test/package.json @@ -12,6 +12,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/hilla-frontend": "file:../../../../ts/hilla-frontend", "@hilla/react-auth": "file:../../../../ts/react-auth", @@ -53,6 +54,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@hilla/react-auth": "2.3.0-alpha5", "@hilla/react-components": "2.2.0-alpha16", @@ -82,7 +84,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "dce0cc083f9abdcefe7283629a5d1619d8cdd4c52cc608f1642cd8e6fe087680" + "hash": "5938147ed4e6040b7221ac3648b8d7b777a9db5f0797171a13ad0ad4bba8417a" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/security-contextpath/package-lock.json b/packages/java/tests/spring/security-contextpath/package-lock.json index 67c573452c..ea8acbdc4d 100644 --- a/packages/java/tests/spring/security-contextpath/package-lock.json +++ b/packages/java/tests/spring/security-contextpath/package-lock.json @@ -17,6 +17,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -458,6 +459,45 @@ "dev": true, "license": "MIT" }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -603,6 +643,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@adobe/lit-mobx": { "version": "2.0.0-rc.4", "license": "Apache-2.0", @@ -2819,6 +2862,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -10000,6 +10047,33 @@ } } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/security-contextpath/package.json b/packages/java/tests/spring/security-contextpath/package.json index 3bb70d5c1d..22ffdd8512 100644 --- a/packages/java/tests/spring/security-contextpath/package.json +++ b/packages/java/tests/spring/security-contextpath/package.json @@ -13,6 +13,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -125,6 +126,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -217,7 +219,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "476296adbe542b74f72ff6d156ab1e0f0701ec7159df8950e14d7404e5c3a755" + "hash": "a66a8ec53f5be9ae33c454a4a3377d7af70651448f302eebc335f0abb13e2f51" }, "overrides": { "@vaadin/icon": "$@vaadin/icon", diff --git a/packages/java/tests/spring/security-jwt/package-lock.json b/packages/java/tests/spring/security-jwt/package-lock.json index 876f34dcc6..398a7fec47 100644 --- a/packages/java/tests/spring/security-jwt/package-lock.json +++ b/packages/java/tests/spring/security-jwt/package-lock.json @@ -17,6 +17,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -453,6 +454,45 @@ "dev": true, "license": "MIT" }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -598,6 +638,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@adobe/lit-mobx": { "version": "2.0.0-rc.4", "license": "Apache-2.0", @@ -2814,6 +2857,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -9989,6 +10036,33 @@ } } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/security-jwt/package.json b/packages/java/tests/spring/security-jwt/package.json index 820475c4bc..48a9d1e2f4 100644 --- a/packages/java/tests/spring/security-jwt/package.json +++ b/packages/java/tests/spring/security-jwt/package.json @@ -13,6 +13,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -125,6 +126,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -217,7 +219,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "476296adbe542b74f72ff6d156ab1e0f0701ec7159df8950e14d7404e5c3a755" + "hash": "a66a8ec53f5be9ae33c454a4a3377d7af70651448f302eebc335f0abb13e2f51" }, "overrides": { "@vaadin/bundles": "$@vaadin/bundles", diff --git a/packages/java/tests/spring/security-urlmapping/package-lock.json b/packages/java/tests/spring/security-urlmapping/package-lock.json index 4a6c65a37f..cb42a983ab 100644 --- a/packages/java/tests/spring/security-urlmapping/package-lock.json +++ b/packages/java/tests/spring/security-urlmapping/package-lock.json @@ -17,6 +17,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -458,6 +459,45 @@ "dev": true, "license": "MIT" }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -603,6 +643,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@adobe/lit-mobx": { "version": "2.0.0-rc.4", "license": "Apache-2.0", @@ -2819,6 +2862,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -9992,6 +10039,33 @@ } } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/security-urlmapping/package.json b/packages/java/tests/spring/security-urlmapping/package.json index 820475c4bc..48a9d1e2f4 100644 --- a/packages/java/tests/spring/security-urlmapping/package.json +++ b/packages/java/tests/spring/security-urlmapping/package.json @@ -13,6 +13,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -125,6 +126,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -217,7 +219,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "476296adbe542b74f72ff6d156ab1e0f0701ec7159df8950e14d7404e5c3a755" + "hash": "a66a8ec53f5be9ae33c454a4a3377d7af70651448f302eebc335f0abb13e2f51" }, "overrides": { "@vaadin/bundles": "$@vaadin/bundles", diff --git a/packages/java/tests/spring/security/package-lock.json b/packages/java/tests/spring/security/package-lock.json index f8ffd60a42..a08075fdc8 100644 --- a/packages/java/tests/spring/security/package-lock.json +++ b/packages/java/tests/spring/security/package-lock.json @@ -17,6 +17,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -453,6 +454,45 @@ "dev": true, "license": "MIT" }, + "../../../../ts/generator-typescript-plugin-subtypes": { + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "license": "Apache 2.0", + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">= 16.13" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + } + }, "../../../../ts/generator-typescript-utils": { "name": "@hilla/generator-typescript-utils", "version": "2.3.0-alpha5", @@ -598,6 +638,9 @@ "react": "^18" } }, + "../../../ts/generator-typescript-plugin-subtypes": { + "extraneous": true + }, "node_modules/@adobe/lit-mobx": { "version": "2.0.0-rc.4", "license": "Apache-2.0", @@ -2814,6 +2857,10 @@ "resolved": "../../../../ts/generator-typescript-plugin-push", "link": true }, + "node_modules/@hilla/generator-typescript-plugin-subtypes": { + "resolved": "../../../../ts/generator-typescript-plugin-subtypes", + "link": true + }, "node_modules/@hilla/generator-typescript-utils": { "resolved": "../../../../ts/generator-typescript-utils", "link": true @@ -9925,6 +9972,33 @@ } } }, + "@hilla/generator-typescript-plugin-subtypes": { + "version": "file:../../../../ts/generator-typescript-plugin-subtypes", + "requires": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "fast-deep-equal": "^3.1.3", + "mocha": "^10.2.0", + "openapi-types": "^12.1.3", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0", + "typescript": "^5.1.6" + } + }, "@hilla/generator-typescript-utils": { "version": "file:../../../../ts/generator-typescript-utils", "requires": { diff --git a/packages/java/tests/spring/security/package.json b/packages/java/tests/spring/security/package.json index 56b91e79ed..5ee3eb0a04 100644 --- a/packages/java/tests/spring/security/package.json +++ b/packages/java/tests/spring/security/package.json @@ -13,6 +13,7 @@ "@hilla/generator-typescript-plugin-client": "file:../../../../ts/generator-typescript-plugin-client", "@hilla/generator-typescript-plugin-model": "file:../../../../ts/generator-typescript-plugin-model", "@hilla/generator-typescript-plugin-push": "file:../../../../ts/generator-typescript-plugin-push", + "@hilla/generator-typescript-plugin-subtypes": "file:../../../../ts/generator-typescript-plugin-subtypes", "@hilla/generator-typescript-utils": "file:../../../../ts/generator-typescript-utils", "@hilla/react-auth": "file:../../../../ts/react-auth", "@hilla/react-form": "file:../../../../ts/react-form", @@ -120,6 +121,7 @@ "@hilla/generator-typescript-plugin-client": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-model": "2.3.0-alpha5", "@hilla/generator-typescript-plugin-push": "2.3.0-alpha5", + "@hilla/generator-typescript-plugin-subtypes": "2.3.0-alpha5", "@hilla/generator-typescript-utils": "2.3.0-alpha5", "@polymer/polymer": "3.5.1", "@vaadin/a11y-base": "24.2.0-alpha16", @@ -212,7 +214,7 @@ "workbox-core": "7.0.0", "workbox-precaching": "7.0.0" }, - "hash": "e3857e839dda3fa42fd44c61d921b174f0bc92bc67be3419d66ef02090c51a47" + "hash": "59f259833dadc4fd6aa042185091a3dc056d0c26f8cae6418dcfd25b0c86a24f" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/ts/generator-typescript-core/src/PluginManager.ts b/packages/ts/generator-typescript-core/src/PluginManager.ts index 81e80cc5dd..625a3dd362 100644 --- a/packages/ts/generator-typescript-core/src/PluginManager.ts +++ b/packages/ts/generator-typescript-core/src/PluginManager.ts @@ -8,7 +8,14 @@ export default class PluginManager { readonly #plugins: Plugin[]; constructor(plugins: readonly PluginConstructor[], resolver: ReferenceResolver, logger: LoggerFactory) { - const standardPlugins = ['BackbonePlugin', 'ClientPlugin', 'BarrelPlugin', 'ModelPlugin', 'PushPlugin']; + const standardPlugins = [ + 'BackbonePlugin', + 'ClientPlugin', + 'BarrelPlugin', + 'ModelPlugin', + 'PushPlugin', + 'SubTypesPlugin', + ]; const customPlugins = plugins.filter((p) => !standardPlugins.includes(p.name)); if (customPlugins.length > 0) { logger.global.info(`Plugins: ${plugins.map(({ name }) => name).join(', ')}`); diff --git a/packages/ts/generator-typescript-plugin-subtypes/.eslintrc b/packages/ts/generator-typescript-plugin-subtypes/.eslintrc new file mode 100644 index 0000000000..6ac92d4ca9 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": ["../../../.eslintrc"], + "parserOptions": { + "project": "./tsconfig.json" + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/.lintstagedrc.js b/packages/ts/generator-typescript-plugin-subtypes/.lintstagedrc.js new file mode 100644 index 0000000000..4ea5625af3 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/.lintstagedrc.js @@ -0,0 +1,6 @@ +import { commands } from '../../../.lintstagedrc.js'; + +export default { + 'src/**/*.{js,ts}': commands, + 'test/**/*.{js,ts}': commands, +}; diff --git a/packages/ts/generator-typescript-plugin-subtypes/LICENSE b/packages/ts/generator-typescript-plugin-subtypes/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/ts/generator-typescript-plugin-subtypes/README.md b/packages/ts/generator-typescript-plugin-subtypes/README.md new file mode 100644 index 0000000000..a9856d9bc1 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/README.md @@ -0,0 +1 @@ +# Hilla TypeScript Generator JsonSubTypes Support Plugin diff --git a/packages/ts/generator-typescript-plugin-subtypes/package.json b/packages/ts/generator-typescript-plugin-subtypes/package.json new file mode 100644 index 0000000000..60d2f64cd5 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/package.json @@ -0,0 +1,84 @@ +{ + "name": "@hilla/generator-typescript-plugin-subtypes", + "version": "2.3.0-alpha5", + "description": "A Hilla TypeScript Generator plugin to support JsonSubTypes", + "main": "index.js", + "type": "module", + "engines": { + "node": ">= 16.13" + }, + "scripts": { + "clean:build": "rimraf *.{d.ts.map,d.ts,js.map,js}", + "build": "concurrently npm:build:*", + "build:transpile": "tsc --isolatedModules -p tsconfig.build.json", + "build:copy": "cd src && copyfiles **/*.d.ts ..", + "lint": "eslint src test", + "lint:fix": "eslint src test --fix", + "test": "mocha test/**/*.spec.ts --config ../../../.mocharc.json", + "test:update": "npm run test -- --update", + "test:coverage": "c8 -c ../../../.c8rc.json npm test", + "typecheck": "tsc --noEmit", + "version": "node ../../../scripts/bump/package-update.js" + }, + "exports": { + ".": { + "default": "./index.js" + }, + "./index.js": { + "default": "./index.js" + } + }, + "repository": { + "type": "git", + "url": "https://github.com/vaadin/hilla.git", + "directory": "packages/ts/generator-typescript-plugin-subtypes" + }, + "keywords": [ + "hilla", + "typescript", + "generator" + ], + "author": "Vaadin Ltd.", + "license": "Apache 2.0", + "bugs": { + "url": "https://github.com/vaadin/hilla/issues" + }, + "homepage": "https://hilla.dev", + "files": [ + "*.{d.ts.map,d.ts,js.map,js}" + ], + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5" + }, + "dependencies": { + "@hilla/generator-typescript-utils": "^2.3.0-alpha5", + "fast-deep-equal": "^3.1.3", + "openapi-types": "^12.1.3", + "typescript": "^5.1.6" + }, + "devDependencies": { + "@hilla/generator-typescript-core": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-client": "^2.3.0-alpha5", + "@hilla/generator-typescript-plugin-model": "^2.3.0-alpha5", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.0", + "@types/sinon": "^10.0.16", + "@types/sinon-chai": "^3.2.9", + "c8": "^8.0.1", + "chai": "^4.3.7", + "concurrently": "^8.2.0", + "copyfiles": "^2.4.1", + "mocha": "^10.2.0", + "pino": "^8.15.0", + "rimraf": "^5.0.1", + "sinon": "^15.2.0", + "sinon-chai": "^3.7.0", + "type-fest": "^4.2.0" + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/src/ModelFixProcessor.ts b/packages/ts/generator-typescript-plugin-subtypes/src/ModelFixProcessor.ts new file mode 100644 index 0000000000..314edec2d3 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/src/ModelFixProcessor.ts @@ -0,0 +1,40 @@ +import createSourceFile from '@hilla/generator-typescript-utils/createSourceFile.js'; +import ts, { type ClassDeclaration, type GetAccessorDeclaration } from 'typescript'; + +function propertyNameToString(node: ts.PropertyName): string | null { + if (ts.isIdentifier(node) || ts.isStringLiteral(node) || ts.isNumericLiteral(node)) { + return node.text; + } + return null; +} + +export class ModelFixProcessor { + readonly #source: ts.SourceFile; + + constructor(source: ts.SourceFile) { + this.#source = source; + } + + process(): ts.SourceFile { + const statements = this.#source.statements.map((statement) => { + // filter out the @type property from all models + if (ts.isClassDeclaration(statement)) { + const members = statement.members.filter( + (member) => !(ts.isGetAccessor(member) && propertyNameToString(member.name) === '@type'), + ); + + return ts.factory.createClassDeclaration( + statement.modifiers, + statement.name, + statement.typeParameters, + statement.heritageClauses, + members, + ); + } + + return statement; + }); + + return createSourceFile(statements, this.#source.fileName); + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/src/SubTypesProcessor.ts b/packages/ts/generator-typescript-plugin-subtypes/src/SubTypesProcessor.ts new file mode 100644 index 0000000000..db128c704b --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/src/SubTypesProcessor.ts @@ -0,0 +1,53 @@ +import { dirname } from 'path/posix'; +import { + convertReferenceSchemaToPath, + convertReferenceSchemaToSpecifier, + type ReferenceSchema, +} from '@hilla/generator-typescript-core/Schema.js'; +import { simplifyFullyQualifiedName } from '@hilla/generator-typescript-core/utils.js'; +import createSourceFile from '@hilla/generator-typescript-utils/createSourceFile.js'; +import DependencyManager from '@hilla/generator-typescript-utils/dependencies/DependencyManager.js'; +import PathManager from '@hilla/generator-typescript-utils/dependencies/PathManager.js'; +import ts from 'typescript'; + +export class SubTypesProcessor { + readonly #typeName: string; + readonly #source: ts.SourceFile; + readonly #oneOf: ReferenceSchema[]; + readonly #dependencies; + + constructor(typeName: string, source: ts.SourceFile, oneOf: ReferenceSchema[]) { + this.#typeName = typeName; + this.#source = source; + this.#oneOf = oneOf; + this.#dependencies = new DependencyManager( + new PathManager({ extension: '.js', relativeTo: dirname(source.fileName) }), + ); + } + + process(): ts.SourceFile { + const { exports, imports, paths } = this.#dependencies; + + // import all sub types and return them + const subTypes = this.#oneOf.map((schema) => { + const path = paths.createRelativePath(convertReferenceSchemaToPath(schema)); + const subType = convertReferenceSchemaToSpecifier(schema); + return imports.default.add(path, subType, true); + }); + + // create a union type from the sub types + const union = ts.factory.createUnionTypeNode( + subTypes.map((subType) => ts.factory.createTypeReferenceNode(subType)), + ); + + // create the statement + const { fileName, statements } = this.#source; + const unionTypeName = `${simplifyFullyQualifiedName(this.#typeName)}`; + const unionIdentifier = ts.factory.createIdentifier(unionTypeName); + const statement = ts.factory.createTypeAliasDeclaration(undefined, unionIdentifier, undefined, union); + + exports.default.set(unionTypeName); + + return createSourceFile([...imports.toCode(), ...statements, statement, ...exports.toCode()], fileName); + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/src/TypeFixProcessor.ts b/packages/ts/generator-typescript-plugin-subtypes/src/TypeFixProcessor.ts new file mode 100644 index 0000000000..a3f919f3fb --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/src/TypeFixProcessor.ts @@ -0,0 +1,52 @@ +import createSourceFile from '@hilla/generator-typescript-utils/createSourceFile.js'; +import ts from 'typescript'; + +function propertyNameToString(node: ts.PropertyName): string | null { + if (ts.isIdentifier(node) || ts.isStringLiteral(node) || ts.isNumericLiteral(node)) { + return node.text; + } + return null; +} + +export class TypeFixProcessor { + readonly #source: ts.SourceFile; + readonly #typeValue: string; + + constructor(source: ts.SourceFile, typeValue: string) { + this.#source = source; + this.#typeValue = typeValue; + } + + process(): ts.SourceFile { + const statements = this.#source.statements.map((statement) => { + // search in the interface definition + if (ts.isInterfaceDeclaration(statement)) { + const members = statement.members.map((member) => { + // search for the @type property and replace it with a quoted string + if (ts.isPropertySignature(member) && propertyNameToString(member.name) === '@type') { + return ts.factory.createPropertySignature( + undefined, + ts.factory.createStringLiteral('@type'), + undefined, + ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(this.#typeValue)), + ); + } + + return member; + }); + + return ts.factory.createInterfaceDeclaration( + statement.modifiers, + statement.name, + statement.typeParameters, + statement.heritageClauses, + members, + ); + } + + return statement; + }); + + return createSourceFile(statements, this.#source.fileName); + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/src/index.ts b/packages/ts/generator-typescript-plugin-subtypes/src/index.ts new file mode 100644 index 0000000000..373eb3a307 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/src/index.ts @@ -0,0 +1,68 @@ +import Plugin from '@hilla/generator-typescript-core/Plugin.js'; +import type { ReferenceSchema } from '@hilla/generator-typescript-core/Schema.js'; +import type SharedStorage from '@hilla/generator-typescript-core/SharedStorage.js'; +import { convertFullyQualifiedNameToRelativePath } from '@hilla/generator-typescript-core/utils.js'; +import { ModelFixProcessor } from './ModelFixProcessor.js'; +import { SubTypesProcessor } from './SubTypesProcessor.js'; +import { TypeFixProcessor } from './TypeFixProcessor.js'; + +export default class SubTypesPlugin extends Plugin { + declare ['constructor']: typeof SubTypesPlugin; + + override get path(): string { + return import.meta.url; + } + + override async execute(storage: SharedStorage): Promise { + const { api, sources } = storage; + + const components = api.components?.schemas; + + if (!components) { + return; + } + + Object.entries(components).forEach(([baseKey, baseComponent]) => { + // search for components with oneOf: those are union types + if ('oneOf' in baseComponent && Array.isArray(baseComponent.oneOf)) { + const fn = `${convertFullyQualifiedNameToRelativePath(baseKey)}.ts`; + const source = sources.find(({ fileName }) => fileName === fn)!; + // replace the (empty) source with a newly-generated one + const newSource = new SubTypesProcessor(baseKey, source, baseComponent.oneOf).process(); + sources.splice(sources.indexOf(source), 1, newSource); + + // mentioned types in the oneOf need to be fixed as well + baseComponent.oneOf.forEach((schema) => { + if ('$ref' in schema) { + const path = (schema as ReferenceSchema).$ref; + Object.entries(components).forEach(([subKey, subComponent]) => { + if ('anyOf' in subComponent && subKey === path.substring('#/components/schemas/'.length)) { + subComponent.anyOf?.forEach((s) => { + if ('properties' in s && '@type' in s.properties! && 'example' in s.properties['@type']) { + const typeValue = s.properties['@type'].example as string; + const subFn = `${convertFullyQualifiedNameToRelativePath(subKey)}.ts`; + const subSource = sources.find(({ fileName }) => fileName === subFn)!; + // fix the source to replace the @type property name with a quoted string + const fixedSource = new TypeFixProcessor(subSource, typeValue).process(); + sources.splice(sources.indexOf(subSource), 1, fixedSource); + + // fix the model to remove the @type property + const modelFn = `${convertFullyQualifiedNameToRelativePath(subKey)}Model.ts`; + const modelSource = sources.find(({ fileName }) => fileName === modelFn)!; + const fixedModelSource = new ModelFixProcessor(modelSource).process(); + sources.splice(sources.indexOf(modelSource), 1, fixedModelSource); + } + }); + } + }); + } + }); + + // remove the union type model file + const unionFn = `${convertFullyQualifiedNameToRelativePath(baseKey)}Model.ts`; + const unionSource = sources.find(({ fileName }) => fileName === unionFn)!; + sources.splice(sources.indexOf(unionSource), 1); + } + }); + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.json b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.json new file mode 100644 index 0000000000..6704d5ae47 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.json @@ -0,0 +1,172 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Hilla Application", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost:8080/connect", + "description": "Hilla Backend" + } + ], + "tags": [ + { + "name": "SubTypesEndpoint", + "x-class-name": "dev.hilla.parser.plugins.subtypes.SubTypesEndpoint" + } + ], + "paths": { + "/SubTypesEndpoint/receiveEvent": { + "post": { + "tags": [ + "SubTypesEndpoint" + ], + "operationId": "SubTypesEndpoint_receiveEvent_POST", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "event": { + "nullable": true, + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "" + } + } + } + }, + "/SubTypesEndpoint/sendEvent": { + "post": { + "tags": [ + "SubTypesEndpoint" + ], + "operationId": "SubTypesEndpoint_sendEvent_POST", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "nullable": true, + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "dev.hilla.parser.plugins.subtypes.BaseEvent": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + } + }, + "dev.hilla.parser.plugins.subtypes.BaseEventUnion": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.AddEvent" + }, + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.UpdateEvent" + }, + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.DeleteEvent" + } + ] + }, + "dev.hilla.parser.plugins.subtypes.AddEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "item": { + "type": "string", + "nullable": true + }, + "@type": { + "type": "string", + "example": "add" + } + } + } + ] + }, + "dev.hilla.parser.plugins.subtypes.UpdateEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "oldItem": { + "type": "string", + "nullable": true + }, + "newItem": { + "type": "string", + "nullable": true + }, + "@type": { + "type": "string", + "example": "update" + } + } + } + ] + }, + "dev.hilla.parser.plugins.subtypes.DeleteEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/dev.hilla.parser.plugins.subtypes.BaseEvent" + }, + { + "type": "object", + "properties": { + "item": { + "type": "string", + "nullable": true + }, + "force": { + "type": "boolean" + }, + "@type": { + "type": "string", + "example": "delete" + } + } + } + ] + } + } + } +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.spec.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.spec.ts new file mode 100644 index 0000000000..2fa0e01fdd --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/SubTypes.spec.ts @@ -0,0 +1,51 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import BackbonePlugin from '@hilla/generator-typescript-plugin-backbone/index.js'; +import ModelPlugin from '@hilla/generator-typescript-plugin-model/index.js'; +import snapshotMatcher from '@hilla/generator-typescript-utils/testing/snapshotMatcher.js'; +import { expect, use } from 'chai'; +import sinonChai from 'sinon-chai'; +import SubTypesPlugin from '../../src/index.js'; +import { createGenerator, loadInput } from '../utils/common.js'; + +use(sinonChai); +use(snapshotMatcher); + +describe('SubTypesPlugin', () => { + context('when the entity has `oneOf`', () => { + it('generates as union type', async () => { + const sectionName = 'SubTypes'; + const generator = createGenerator([BackbonePlugin, ModelPlugin, SubTypesPlugin]); + const input = await loadInput(sectionName, import.meta.url); + const files = await generator.process(input); + expect(files.length).to.equal(10); + + const t = await files[1].text(); + expect(t).to.exist; + + const endpointFile = files.find((f) => f.name === 'SubTypesEndpoint.ts')!; + expect(endpointFile).to.exist; + await expect(await endpointFile.text()).toMatchSnapshot(`${sectionName}Endpoint`, import.meta.url); + expect(endpointFile.name).to.equal(`${sectionName}Endpoint.ts`); + + const baseEventUnionFile = files.find((f) => f.name === 'dev/hilla/parser/plugins/subtypes/BaseEventUnion.ts')!; + expect(baseEventUnionFile).to.exist; + await expect(await baseEventUnionFile.text()).toMatchSnapshot('BaseEventUnion', import.meta.url); + expect(baseEventUnionFile.name).to.equal('dev/hilla/parser/plugins/subtypes/BaseEventUnion.ts'); + + const baseEventFile = files.find((f) => f.name === 'dev/hilla/parser/plugins/subtypes/BaseEvent.ts')!; + expect(baseEventFile).to.exist; + await expect(await baseEventFile.text()).toMatchSnapshot('BaseEvent', import.meta.url); + expect(baseEventFile.name).to.equal('dev/hilla/parser/plugins/subtypes/BaseEvent.ts'); + + const addEventFile = files.find((f) => f.name === 'dev/hilla/parser/plugins/subtypes/AddEvent.ts')!; + expect(addEventFile).to.exist; + await expect(await addEventFile.text()).toMatchSnapshot('AddEvent', import.meta.url); + expect(addEventFile.name).to.equal('dev/hilla/parser/plugins/subtypes/AddEvent.ts'); + + const addEventModelFile = files.find((f) => f.name === 'dev/hilla/parser/plugins/subtypes/AddEventModel.ts')!; + expect(addEventModelFile).to.exist; + await expect(await addEventModelFile.text()).toMatchSnapshot('AddEventModel', import.meta.url); + expect(addEventModelFile.name).to.equal('dev/hilla/parser/plugins/subtypes/AddEventModel.ts'); + }); + }); +}); diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEvent.snap.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEvent.snap.ts new file mode 100644 index 0000000000..37df3b3c78 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEvent.snap.ts @@ -0,0 +1,6 @@ +import type BaseEvent_1 from "./BaseEvent.js"; +interface AddEvent extends BaseEvent_1 { + item?: string; + "@type": "add"; +} +export default AddEvent; diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEventModel.snap.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEventModel.snap.ts new file mode 100644 index 0000000000..37e7f70d33 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/AddEventModel.snap.ts @@ -0,0 +1,10 @@ +import { _getPropertyModel as _getPropertyModel_1, StringModel as StringModel_1 } from "@hilla/form"; +import type AddEvent_1 from "./AddEvent.js"; +import BaseEventModel_1 from "./BaseEventModel.js"; +class AddEventModel extends BaseEventModel_1 { + declare static createEmptyValue: () => AddEvent_1; + get item(): StringModel_1 { + return this[_getPropertyModel_1]("item", StringModel_1, [true]) as StringModel_1; + } +} +export default AddEventModel; diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEvent.snap.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEvent.snap.ts new file mode 100644 index 0000000000..b6d210c794 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEvent.snap.ts @@ -0,0 +1,4 @@ +interface BaseEvent { + id: number; +} +export default BaseEvent; diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEventUnion.snap.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEventUnion.snap.ts new file mode 100644 index 0000000000..e0b5848f5a --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/BaseEventUnion.snap.ts @@ -0,0 +1,5 @@ +import type AddEvent_1 from "./AddEvent.js"; +import type DeleteEvent_1 from "./DeleteEvent.js"; +import type UpdateEvent_1 from "./UpdateEvent.js"; +type BaseEventUnion = AddEvent_1 | UpdateEvent_1 | DeleteEvent_1; +export default BaseEventUnion; diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/SubTypesEndpoint.snap.ts b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/SubTypesEndpoint.snap.ts new file mode 100644 index 0000000000..b471de7db8 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/push-type/fixtures/SubTypesEndpoint.snap.ts @@ -0,0 +1,6 @@ +import { EndpointRequestInit as EndpointRequestInit_1 } from "@hilla/frontend"; +import client_1 from "./connect-client.default.js"; +import type BaseEvent_1 from "./dev/hilla/parser/plugins/subtypes/BaseEvent.js"; +async function receiveEvent_1(event: BaseEvent_1 | undefined, init?: EndpointRequestInit_1): Promise { return client_1.call("SubTypesEndpoint", "receiveEvent", { event }, init); } +async function sendEvent_1(init?: EndpointRequestInit_1): Promise { return client_1.call("SubTypesEndpoint", "sendEvent", {}, init); } +export { receiveEvent_1 as receiveEvent, sendEvent_1 as sendEvent }; diff --git a/packages/ts/generator-typescript-plugin-subtypes/test/utils/common.ts b/packages/ts/generator-typescript-plugin-subtypes/test/utils/common.ts new file mode 100644 index 0000000000..1f10f04030 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/test/utils/common.ts @@ -0,0 +1,14 @@ +import { readFile } from 'node:fs/promises'; +import Generator from '@hilla/generator-typescript-core/Generator.js'; +import type { PluginConstructor } from '@hilla/generator-typescript-core/Plugin.js'; +import LoggerFactory from '@hilla/generator-typescript-utils/LoggerFactory.js'; + +export const pathBase = 'dev/hilla/parser/plugins/subtypes'; + +export function createGenerator(plugins: readonly PluginConstructor[]): Generator { + return new Generator(plugins, { logger: new LoggerFactory({ name: 'tsgen-test-subtypes', verbose: true }) }); +} + +export async function loadInput(name: string, importMeta: string): Promise { + return readFile(new URL(`./${name}.json`, importMeta), 'utf8'); +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/tsconfig.build.json b/packages/ts/generator-typescript-plugin-subtypes/tsconfig.build.json new file mode 100644 index 0000000000..445f3f4492 --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "." + }, + "include": ["src"] +} diff --git a/packages/ts/generator-typescript-plugin-subtypes/tsconfig.json b/packages/ts/generator-typescript-plugin-subtypes/tsconfig.json new file mode 100644 index 0000000000..cf0eb8454e --- /dev/null +++ b/packages/ts/generator-typescript-plugin-subtypes/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.json", + "include": ["src", "test"], + "exclude": ["test/**/*.snap.ts"] +} diff --git a/pom.xml b/pom.xml index 248b22068a..895de14a87 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,7 @@ packages/java/parser-jvm-plugin-backbone packages/java/parser-jvm-plugin-model packages/java/parser-jvm-plugin-nonnull + packages/java/parser-jvm-plugin-subtypes packages/java/parser-jvm-plugin-transfertypes packages/java/parser-jvm-test-utils packages/java/parser-jvm-utils