diff --git a/packages/java/endpoint/src/main/java/com/vaadin/hilla/EndpointCodeGenerator.java b/packages/java/endpoint/src/main/java/com/vaadin/hilla/EndpointCodeGenerator.java index 9af3b833d6..f2bde080d3 100644 --- a/packages/java/endpoint/src/main/java/com/vaadin/hilla/EndpointCodeGenerator.java +++ b/packages/java/endpoint/src/main/java/com/vaadin/hilla/EndpointCodeGenerator.java @@ -16,7 +16,6 @@ package com.vaadin.hilla; import java.io.IOException; -import java.lang.annotation.Annotation; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collection; @@ -24,8 +23,8 @@ import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.stream.Stream; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.hilla.engine.EngineConfiguration; import com.vaadin.hilla.engine.GeneratorProcessor; import com.vaadin.hilla.engine.ParserProcessor; @@ -51,8 +50,8 @@ public class EndpointCodeGenerator { private Path buildDirectory; private ApplicationConfiguration configuration; - private String nodeExecutable; private Set classesUsedInOpenApi = null; + private EngineConfiguration engineConfiguration; /** * Creates the singleton. @@ -88,35 +87,24 @@ public void update() { } ApplicationContextProvider.runOnContext(applicationContext -> { - EngineConfiguration engineConfiguration = EngineConfiguration - .getDefault(); // TODO: extract this logic as it is also used in // TaskGenerateOpenAPIImpl List> endpoints = engineConfiguration.getParser() .getEndpointAnnotations().stream() .map(applicationContext::getBeansWithAnnotation) .map(Map::values).flatMap(Collection::stream) - .map(Object::getClass).distinct().toList(); - ParserProcessor parser = new ParserProcessor(engineConfiguration, - false); + .> map(Object::getClass).distinct().toList(); + ParserProcessor parser = new ParserProcessor(engineConfiguration); parser.process(endpoints); GeneratorProcessor generator = new GeneratorProcessor( - engineConfiguration, nodeExecutable, false); + engineConfiguration); generator.process(); try { - OpenAPIUtil.getCurrentOpenAPIPath(buildDirectory, false) - .ifPresent(openApiPath -> { - try { - this.endpointController.registerEndpoints( - openApiPath.toUri().toURL()); - } catch (IOException e) { - LOGGER.error( - "Endpoints could not be registered due to an exception: ", - e); - } - }); + var openApiPath = engineConfiguration.getOpenAPIFile(); + this.endpointController + .registerEndpoints(openApiPath.toUri().toURL()); } catch (IOException e) { throw new RuntimeException(e); } @@ -131,30 +119,36 @@ private void initIfNeeded() { buildDirectory = projectFolder .resolve(configuration.getBuildFolder()); - FrontendTools tools = new FrontendTools(configuration, + var frontendTools = new FrontendTools(configuration, configuration.getProjectFolder()); - nodeExecutable = tools.getNodeBinary(); + engineConfiguration = new EngineConfiguration.Builder() + .baseDir(configuration.getProjectFolder().toPath()) + .buildDir(configuration.getBuildFolder()) + .outputDir( + FrontendUtils + .getFrontendGeneratedFolder( + configuration.getFrontendFolder()) + .toPath()) + .productionMode(false) + .nodeCommand(frontendTools.getNodeBinary()).create(); } } public Optional> getClassesUsedInOpenApi() throws IOException { if (classesUsedInOpenApi == null) { initIfNeeded(); - OpenAPIUtil.getCurrentOpenAPIPath(buildDirectory, false) - .ifPresent(openApiPath -> { - if (openApiPath.toFile().exists()) { - try { - classesUsedInOpenApi = OpenAPIUtil - .findOpenApiClasses( - Files.readString(openApiPath)); - } catch (IOException e) { - throw new RuntimeException(e); - } - } else { - LOGGER.debug( - "No OpenAPI file is available yet ..."); - } - }); + var conf = EngineConfiguration.getDefault(); + var openApiPath = conf.getOpenAPIFile(); + if (openApiPath != null && openApiPath.toFile().exists()) { + try { + classesUsedInOpenApi = OpenAPIUtil + .findOpenApiClasses(Files.readString(openApiPath)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } else { + LOGGER.debug("No OpenAPI file is available yet ..."); + } } return Optional.ofNullable(classesUsedInOpenApi); } diff --git a/packages/java/endpoint/src/main/java/com/vaadin/hilla/OpenAPIUtil.java b/packages/java/endpoint/src/main/java/com/vaadin/hilla/OpenAPIUtil.java index 0b77325536..99c55e34b9 100644 --- a/packages/java/endpoint/src/main/java/com/vaadin/hilla/OpenAPIUtil.java +++ b/packages/java/endpoint/src/main/java/com/vaadin/hilla/OpenAPIUtil.java @@ -59,10 +59,11 @@ public static String getCurrentOpenAPI(Path buildDirectory, */ public static Optional getCurrentOpenAPIPath(Path buildDirectory, boolean isProductionMode) throws IOException { - EngineConfiguration engineConfiguration = EngineConfiguration - .getDefault(); - return Optional - .of(engineConfiguration.getOpenAPIFile(isProductionMode)); + var engineConfiguration = new EngineConfiguration.Builder() + .buildDir(buildDirectory) + .productionMode(isProductionMode) + .create(); + return Optional.of(engineConfiguration.getOpenAPIFile()); } /** diff --git a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/EngineConfiguration.java b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/EngineConfiguration.java index bfc4415f84..7136a367b6 100644 --- a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/EngineConfiguration.java +++ b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/EngineConfiguration.java @@ -5,7 +5,9 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Arrays; +import java.util.Collection; import java.util.List; +import java.util.LinkedHashSet; import java.util.Set; import java.util.stream.Collectors; @@ -13,7 +15,8 @@ import com.vaadin.flow.server.frontend.FrontendUtils; public class EngineConfiguration { - private static final EngineConfiguration INSTANCE = new EngineConfiguration(); + private static EngineConfiguration INSTANCE; + public static final String OPEN_API_PATH = "hilla-openapi.json"; private Set classpath = Arrays .stream(System.getProperty("java.class.path") @@ -24,16 +27,16 @@ public class EngineConfiguration { private String mainClass; private Path buildDir; private Path baseDir; - private Path classesDir; private GeneratorConfiguration generator; private Path outputDir; private ParserConfiguration parser; private EndpointProvider offlineEndpointProvider; + private boolean productionMode = false; + private String nodeCommand = "node"; - public EngineConfiguration() { + private EngineConfiguration() { baseDir = Path.of(System.getProperty("user.dir")); buildDir = baseDir.resolve("target"); - classesDir = buildDir.resolve("classes"); generator = new GeneratorConfiguration(); parser = new ParserConfiguration(); @@ -46,96 +49,53 @@ public EngineConfiguration() { } } - public static EngineConfiguration getDefault() { - return INSTANCE; - } - public Set getClasspath() { return classpath; } - public void setClasspath(Set classpath) { - this.classpath = classpath; - } - public String getGroupId() { return groupId; } - public void setGroupId(String groupId) { - this.groupId = groupId; - } - public String getArtifactId() { return artifactId; } - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - public String getMainClass() { return mainClass; } - public void setMainClass(String mainClass) { - this.mainClass = mainClass; - } - public Path getBuildDir() { return buildDir; } - public void setBuildDir(Path buildDir) { - this.buildDir = buildDir; - } - - public void setBuildDir(String buildDir) { - this.buildDir = baseDir.resolve(buildDir); - } - public Path getBaseDir() { return baseDir; } - public void setBaseDir(Path baseDir) { - this.baseDir = baseDir; - } - - public Path getClassesDir() { - return classesDir; - } - - public void setClassesDir(Path classesDir) { - this.classesDir = classesDir; - } - public GeneratorConfiguration getGenerator() { return generator; } - public void setGenerator(GeneratorConfiguration generator) { - this.generator = generator; - } - public Path getOutputDir() { return outputDir; } - public void setOutputDir(Path outputDir) { - this.outputDir = outputDir; - } - public ParserConfiguration getParser() { return parser; } - public void setParser(ParserConfiguration parser) { - this.parser = parser; + public boolean isProductionMode() { + return productionMode; + } + + public String getNodeCommand() { + return nodeCommand; } - public Path getOpenAPIFile(boolean isProductionMode) { - return isProductionMode ? classesDir.resolve(OPEN_API_PATH) + public Path getOpenAPIFile() { + return productionMode + ? buildDir.resolve("classes").resolve(OPEN_API_PATH) : buildDir.resolve(OPEN_API_PATH); } @@ -153,9 +113,118 @@ public EndpointProvider getOfflineEndpointProvider() { }; } - public void setOfflineEndpointProvider( - EndpointProvider offlineEndpointProvider) { - this.offlineEndpointProvider = offlineEndpointProvider; + public static EngineConfiguration getDefault() { + if (INSTANCE == null) { + INSTANCE = new EngineConfiguration(); + } + + return INSTANCE; + } + + public static void setDefault(EngineConfiguration config) { + INSTANCE = config; + } + + public static final class Builder { + private final EngineConfiguration configuration = new EngineConfiguration(); + + public Builder() { + this(getDefault()); + } + + public Builder(EngineConfiguration configuration) { + this.configuration.baseDir = configuration.baseDir; + this.configuration.buildDir = configuration.buildDir; + this.configuration.classpath = configuration.classpath; + this.configuration.generator = configuration.generator; + this.configuration.parser = configuration.parser; + this.configuration.outputDir = configuration.outputDir; + this.configuration.groupId = configuration.groupId; + this.configuration.artifactId = configuration.artifactId; + this.configuration.mainClass = configuration.mainClass; + this.configuration.offlineEndpointProvider = configuration.offlineEndpointProvider; + this.configuration.productionMode = configuration.productionMode; + this.configuration.nodeCommand = configuration.nodeCommand; + } + + public Builder baseDir(Path value) { + configuration.baseDir = value; + return this; + } + + public Builder buildDir(String value) { + return buildDir(Path.of(value)); + } + + public Builder buildDir(Path value) { + configuration.buildDir = resolve(value); + return this; + } + + public Builder classpath(Collection value) { + configuration.classpath = value.stream().map(Path::of) + .map(this::resolve) + .collect(Collectors.toCollection(LinkedHashSet::new)); + return this; + } + + public EngineConfiguration create() { + return configuration; + } + + public Builder generator(GeneratorConfiguration value) { + configuration.generator = value; + return this; + } + + public Builder outputDir(String value) { + return outputDir(Path.of(value)); + } + + public Builder outputDir(Path value) { + configuration.outputDir = resolve(value); + return this; + } + + public Builder parser(ParserConfiguration value) { + configuration.parser = value; + return this; + } + + public Builder groupId(String value) { + configuration.groupId = value; + return this; + } + + public Builder artifactId(String value) { + configuration.artifactId = value; + return this; + } + + public Builder mainClass(String value) { + configuration.mainClass = value; + return this; + } + + public Builder offlineEndpointProvider(EndpointProvider value) { + configuration.offlineEndpointProvider = value; + return this; + } + + public Builder productionMode(boolean value) { + configuration.productionMode = value; + return this; + } + + public Builder nodeCommand(String value) { + configuration.nodeCommand = value; + return this; + } + + private Path resolve(Path path) { + return path.isAbsolute() ? path.normalize() + : configuration.baseDir.resolve(path).normalize(); + } } @FunctionalInterface diff --git a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java index 517668758c..78deaa8389 100644 --- a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java +++ b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java @@ -27,12 +27,11 @@ public final class GeneratorProcessor { private final Path outputDirectory; private final GeneratorConfiguration.PluginsProcessor pluginsProcessor = new GeneratorConfiguration.PluginsProcessor(); - public GeneratorProcessor(EngineConfiguration conf, String nodeCommand, - boolean isProductionMode) { + public GeneratorProcessor(EngineConfiguration conf) { this.baseDir = conf.getBaseDir(); - this.openAPIFile = conf.getOpenAPIFile(isProductionMode); + this.openAPIFile = conf.getOpenAPIFile(); this.outputDirectory = conf.getOutputDir(); - this.nodeCommand = nodeCommand; + this.nodeCommand = conf.getNodeCommand(); applyConfiguration(conf.getGenerator()); } diff --git a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/ParserProcessor.java b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/ParserProcessor.java index 8cb32e3dd8..06c4d1ac65 100644 --- a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/ParserProcessor.java +++ b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/ParserProcessor.java @@ -34,9 +34,9 @@ public final class ParserProcessor { private Collection exposedPackages = List.of(); private String openAPIBasePath; - public ParserProcessor(EngineConfiguration conf, boolean isProductionMode) { + public ParserProcessor(EngineConfiguration conf) { this.baseDir = conf.getBaseDir(); - this.openAPIFile = conf.getOpenAPIFile(isProductionMode); + this.openAPIFile = conf.getOpenAPIFile(); this.classPath = conf.getClasspath(); applyConfiguration(conf.getParser()); } diff --git a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/AbstractTaskEndpointGenerator.java b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/AbstractTaskEndpointGenerator.java index 54e61d15fa..79ee9755d8 100644 --- a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/AbstractTaskEndpointGenerator.java +++ b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/AbstractTaskEndpointGenerator.java @@ -29,22 +29,14 @@ abstract class AbstractTaskEndpointGenerator implements FallibleCommand { private static boolean firstRun = true; - private final String buildDirectoryName; - protected final File outputDirectory; - private final File projectDirectory; - private final Function resourceFinder; private EngineConfiguration engineConfiguration; - AbstractTaskEndpointGenerator(File projectDirectory, - String buildDirectoryName, File outputDirectory, - Function resourceFinder) { - this.projectDirectory = Objects.requireNonNull(projectDirectory, - "Project directory cannot be null"); - this.buildDirectoryName = Objects.requireNonNull(buildDirectoryName, - "Build directory name cannot be null"); - this.outputDirectory = Objects.requireNonNull(outputDirectory, - "Output directory name cannot be null"); - this.resourceFinder = Objects.requireNonNull(resourceFinder, - "Class finder cannot be null"); + AbstractTaskEndpointGenerator(EngineConfiguration engineConfiguration) { + this.engineConfiguration = Objects.requireNonNull(engineConfiguration, + "Engine configuration cannot be null"); + } + + protected EngineConfiguration getEngineConfiguration() { + return engineConfiguration; } } diff --git a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/EndpointGeneratorTaskFactoryImpl.java b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/EndpointGeneratorTaskFactoryImpl.java index baed35a18f..1953ff7515 100644 --- a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/EndpointGeneratorTaskFactoryImpl.java +++ b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/EndpointGeneratorTaskFactoryImpl.java @@ -29,8 +29,6 @@ import com.vaadin.hilla.engine.ParserProcessor; -import java.nio.file.Path; - /** * An implementation of the EndpointGeneratorTaskFactory, which creates endpoint * generator tasks. @@ -55,36 +53,26 @@ private static FrontendTools buildTools(Options options) { @Override public TaskGenerateEndpoint createTaskGenerateEndpoint(Options options) { - configureFromOptions(options); if (!options.isRunNpmInstall() && !options.isDevBundleBuild() && !options.isProductionMode()) { // Skip for prepare-frontend phase and in production server return new SkipTaskGenerateEndpoint(); } - var nodeExecutable = buildTools(options).getNodeExecutable(); - - return new TaskGenerateEndpointImpl(options.getNpmFolder(), - options.getBuildDirectoryName(), - options.getFrontendGeneratedFolder(), - options.getClassFinder()::getResource, - options.isProductionMode(), nodeExecutable); + var engineConfiguration = configureFromOptions(options); + return new TaskGenerateEndpointImpl(engineConfiguration); } @Override public TaskGenerateOpenAPI createTaskGenerateOpenAPI(Options options) { - configureFromOptions(options); if (!options.isRunNpmInstall() && !options.isDevBundleBuild() && !options.isProductionMode()) { // Skip for prepare-frontend phase and in production server return new SkipTaskGenerateOpenAPI(); } - return new TaskGenerateOpenAPIImpl(options.getNpmFolder(), - options.getBuildDirectoryName(), - options.getFrontendGeneratedFolder(), - options.getClassFinder()::getResource, - options.isProductionMode()); + var engineConfiguration = configureFromOptions(options); + return new TaskGenerateOpenAPIImpl(engineConfiguration); } private static class SkipTaskGenerateEndpoint @@ -103,12 +91,12 @@ public void execute() { } } - private static void configureFromOptions(Options options) { - var conf = EngineConfiguration.getDefault(); - Path buildDir = options.getBuildDirectory().toPath(); - conf.setBaseDir(options.getNpmFolder().toPath()); - conf.setBuildDir(buildDir); - conf.setClassesDir(buildDir.resolve("classes")); - conf.setOutputDir(options.getFrontendGeneratedFolder().toPath()); + private static EngineConfiguration configureFromOptions(Options options) { + return new EngineConfiguration.Builder() + .baseDir(options.getNpmFolder().toPath()) + .buildDir(options.getBuildDirectoryName()) + .outputDir(options.getFrontendGeneratedFolder().toPath()) + .nodeCommand(buildTools(options).getNodeExecutable()) + .productionMode(options.isProductionMode()).create(); } } diff --git a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateEndpointImpl.java b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateEndpointImpl.java index 91656b4d77..6067a958a1 100644 --- a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateEndpointImpl.java +++ b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateEndpointImpl.java @@ -15,10 +15,6 @@ */ package com.vaadin.hilla.internal; -import java.io.File; -import java.net.URL; -import java.util.function.Function; - import com.vaadin.flow.server.ExecutionFailedException; import com.vaadin.flow.server.frontend.TaskGenerateEndpoint; import com.vaadin.hilla.ApplicationContextProvider; @@ -31,36 +27,14 @@ public class TaskGenerateEndpointImpl extends AbstractTaskEndpointGenerator implements TaskGenerateEndpoint { - private final String nodeCommand; - private final boolean productionMode; - /** * Create a task for generating OpenAPI spec. * - * @param projectDirectory - * the base directory of the project. - * - * @param buildDirectoryName - * Java build directory name (relative to the {@code - * projectDirectory}). - * - * @param outputDirectory - * the output directory for generated TypeScript code. - * @param resourceFinder - * used internally to find resources - * @param productionMode - * {@code true} if building for production - * @param nodeCommand - * a command to run NodeJS, either absolute path to the - * executable or PATH-related command + * @param engineConfiguration + * Hilla engine configuration instance */ - TaskGenerateEndpointImpl(File projectDirectory, String buildDirectoryName, - File outputDirectory, Function resourceFinder, - boolean productionMode, String nodeCommand) { - super(projectDirectory, buildDirectoryName, outputDirectory, - resourceFinder); - this.productionMode = productionMode; - this.nodeCommand = nodeCommand; + TaskGenerateEndpointImpl(EngineConfiguration engineConfiguration) { + super(engineConfiguration); } /** @@ -70,7 +44,7 @@ public class TaskGenerateEndpointImpl extends AbstractTaskEndpointGenerator */ @Override public void execute() throws ExecutionFailedException { - if (productionMode) { + if (getEngineConfiguration().isProductionMode()) { runProcessor(); } else { // Even if we don't need the application context here, we have to @@ -83,9 +57,7 @@ public void execute() throws ExecutionFailedException { } private void runProcessor() { - var engineConfiguration = EngineConfiguration.getDefault(); - var processor = new GeneratorProcessor(engineConfiguration, nodeCommand, - productionMode); + var processor = new GeneratorProcessor(getEngineConfiguration()); processor.process(); } } diff --git a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateOpenAPIImpl.java b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateOpenAPIImpl.java index 2879533eee..9e0f3a6e2c 100644 --- a/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateOpenAPIImpl.java +++ b/packages/java/engine-runtime/src/main/java/com/vaadin/hilla/internal/TaskGenerateOpenAPIImpl.java @@ -15,12 +15,9 @@ */ package com.vaadin.hilla.internal; -import java.io.File; -import java.net.URL; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.function.Function; import java.util.stream.Collectors; import com.vaadin.hilla.ApplicationContextProvider; @@ -42,36 +39,14 @@ public class TaskGenerateOpenAPIImpl extends AbstractTaskEndpointGenerator private static final Logger LOGGER = LoggerFactory .getLogger(TaskGenerateOpenAPIImpl.class); - private final boolean isProductionMode; - /** * Create a task for generating OpenAPI spec. * - * @param projectDirectory - * the base directory of the project. - * - * @param buildDirectoryName - * Java build directory name (relative to the {@code - * projectDirectory}). - * - * @param outputDirectory - * the output directory for generated TypeScript code. - * - * @param resourceFinder - * used internally to find resources. - * - * @param classLoader - * the Java Class Loader for the parser. - * - * @param isProductionMode - * {@code true} if building for production. + * @param engineConfiguration + * Hilla engine configuration instance */ - TaskGenerateOpenAPIImpl(File projectDirectory, String buildDirectoryName, - File outputDirectory, Function resourceFinder, - boolean isProductionMode) { - super(projectDirectory, buildDirectoryName, outputDirectory, - resourceFinder); - this.isProductionMode = isProductionMode; + TaskGenerateOpenAPIImpl(EngineConfiguration engineConfiguration) { + super(engineConfiguration); } /** @@ -81,11 +56,11 @@ public class TaskGenerateOpenAPIImpl extends AbstractTaskEndpointGenerator */ @Override public void execute() throws ExecutionFailedException { - var engineConfiguration = EngineConfiguration.getDefault(); - if (isProductionMode) { + var engineConfiguration = getEngineConfiguration(); + if (getEngineConfiguration().isProductionMode()) { var endpoints = engineConfiguration.getOfflineEndpointProvider() .findEndpoints(); - var processor = new ParserProcessor(engineConfiguration, true); + var processor = new ParserProcessor(engineConfiguration); processor.process(endpoints); } else { ApplicationContextProvider.runOnContext(applicationContext -> { @@ -95,7 +70,7 @@ public void execute() throws ExecutionFailedException { .map(Map::values).flatMap(Collection::stream) .map(Object::getClass).distinct() .collect(Collectors.toList()); - var processor = new ParserProcessor(engineConfiguration, false); + var processor = new ParserProcessor(engineConfiguration); processor.process(endpoints); }); } diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/AbstractTaskEndpointGeneratorTest.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/AbstractTaskEndpointGeneratorTest.java index cbdbe2db81..e146bf5339 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/AbstractTaskEndpointGeneratorTest.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/AbstractTaskEndpointGeneratorTest.java @@ -6,6 +6,7 @@ import java.util.Optional; import java.util.function.Function; +import com.vaadin.hilla.engine.EngineConfiguration; import com.vaadin.hilla.engine.commandrunner.CommandRunnerException; import com.vaadin.hilla.engine.commandrunner.MavenRunner; import org.junit.jupiter.api.Test; @@ -17,29 +18,10 @@ class AbstractTaskEndpointGeneratorTest extends TaskTest { @Test - void shouldThrowIfProjectDirectoryIsNull() { + void shouldThrowIfEngineConfigurationIsNull() { assertThrowsExactly(NullPointerException.class, () -> { - new TestTaskEndpointGenerator(null, getBuildDirectory(), - getTemporaryDirectory().resolve(getOutputDirectory()) - .toFile()); - }, "Project directory cannot be null"); - } - - @Test - void shouldThrowIfBuildDirectoryNameIsNull() { - assertThrowsExactly(NullPointerException.class, () -> { - new TestTaskEndpointGenerator(getTemporaryDirectory().toFile(), - null, getTemporaryDirectory().resolve(getOutputDirectory()) - .toFile()); - }, "Build directory name cannot be null"); - } - - @Test - void shouldThrowIfOutputDirectoryIsNull() { - assertThrowsExactly(NullPointerException.class, () -> { - new TestTaskEndpointGenerator(getTemporaryDirectory().toFile(), - getBuildDirectory(), null); - }, "Output directory cannot be null"); + new TestTaskEndpointGenerator(null); + }, "Engine configuration cannot be null"); } private final Function resourceFinder = Thread.currentThread() @@ -47,10 +29,8 @@ void shouldThrowIfOutputDirectoryIsNull() { private class TestTaskEndpointGenerator extends AbstractTaskEndpointGenerator { - TestTaskEndpointGenerator(File projectDirectory, - String buildDirectoryName, File outputDirectory) { - super(projectDirectory, buildDirectoryName, outputDirectory, - resourceFinder); + TestTaskEndpointGenerator(EngineConfiguration engineConfiguration) { + super(engineConfiguration); } @Override diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/NodeTasksEndpointTest.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/NodeTasksEndpointTest.java index d41c4685a6..df1a072505 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/NodeTasksEndpointTest.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/NodeTasksEndpointTest.java @@ -5,17 +5,15 @@ import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.nio.file.Path; import java.util.Arrays; import java.util.List; -import java.util.Map; import java.util.Set; +import com.vaadin.hilla.internal.fixtures.MyEndpoint; import org.apache.commons.io.FileUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; -import org.springframework.context.ApplicationContext; import com.vaadin.flow.di.Lookup; import com.vaadin.flow.server.frontend.EndpointGeneratorTaskFactory; @@ -23,9 +21,6 @@ import com.vaadin.flow.server.frontend.Options; import com.vaadin.flow.server.frontend.scanner.ClassFinder; import com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder; -import com.vaadin.hilla.ApplicationContextProvider; -import com.vaadin.hilla.BrowserCallable; -import com.vaadin.hilla.Endpoint; import com.vaadin.hilla.EndpointController; import com.vaadin.hilla.engine.EngineConfiguration; @@ -35,36 +30,6 @@ public class NodeTasksEndpointTest extends TaskTest { public static class ConnectEndpointsForTesting { } - @Endpoint - public class MyEndpoint { - public void foo(String bar) { - } - - public String bar(String baz) { - return baz; - } - } - - @Endpoint(value = "CustomEndpointName") - public class CustomEndpoint { - public void foo(String bar) { - } - - public String bar(String baz) { - return baz; - } - } - - @Endpoint("WithoutValueEqual") - public class EndpointNoValue { - public void foo(String bar) { - } - - public String bar(String baz) { - return baz; - } - } - @BeforeEach public void setUp() throws IOException, NoSuchFieldException, IllegalAccessException { @@ -78,18 +43,6 @@ public void setUp() EndpointController.class, ConnectEndpointsForTesting.class))) .when(mockLookup).lookup(ClassFinder.class); - var mockApplicationContext = Mockito.mock(ApplicationContext.class); - Mockito.doReturn(Map.of("MyEndpoint", new MyEndpoint(), - "CustomEndpointName", CustomEndpoint.class, "WithoutValueEqual", - EndpointNoValue.class)).when(mockApplicationContext) - .getBeansWithAnnotation(Endpoint.class); - Mockito.doReturn(Map.of()).when(mockApplicationContext) - .getBeansWithAnnotation(BrowserCallable.class); - var applicationContextField = ApplicationContextProvider.class - .getDeclaredField("applicationContext"); - applicationContextField.setAccessible(true); - applicationContextField.set(null, mockApplicationContext); - options = new Options(mockLookup, getTemporaryDirectory().toFile()) .withFrontendDirectory(getTemporaryDirectory() .resolve(getFrontendDirectory()).toFile()) @@ -103,8 +56,6 @@ public void setUp() .withJarFrontendResourcesFolder(getTemporaryDirectory() .resolve("jar-resources").toFile()); - EngineConfiguration.getDefault().setBuildDir(getBuildDirectory()); - createIndexFile(); } @@ -126,11 +77,12 @@ public void should_GenerateEndpointFilesInDevBuildTask() throws Exception { public void should_GenerateEndpointFilesInProductionBuildTask() throws Exception { options = options.withProductionMode(true); - EngineConfiguration.getDefault() - .setOfflineEndpointProvider(() -> List.of(MyEndpoint.class)); + var engineConfiguration = new EngineConfiguration.Builder() + .offlineEndpointProvider(() -> List.of(MyEndpoint.class)) + .create(); + EngineConfiguration.setDefault(engineConfiguration); new NodeTasks(options).execute(); - EngineConfiguration.getDefault().setOfflineEndpointProvider(null); assertEndpointFilesInProductionMode(true); } @@ -142,7 +94,7 @@ public void should_GenerateEndpointFilesInDevServerTask() throws Exception { } private void assertEndpointFiles(boolean shouldExist) { - Arrays.asList("target/hilla-openapi.json", + Arrays.asList("build/hilla-openapi.json", "api/connect-client.default.ts", "api/MyEndpoint.ts") .forEach(name -> assertEquals(shouldExist, new File(getTemporaryDirectory().toFile(), name) @@ -152,7 +104,7 @@ private void assertEndpointFiles(boolean shouldExist) { } private void assertEndpointFilesInProductionMode(boolean shouldExist) { - Arrays.asList("target/classes/hilla-openapi.json", + Arrays.asList("build/classes/hilla-openapi.json", "api/connect-client.default.ts", "api/MyEndpoint.ts") .forEach(name -> assertEquals(shouldExist, new File(getTemporaryDirectory().toFile(), name) diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateEndpointTest.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateEndpointTest.java index d0cd4e47e4..e8193b3e4f 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateEndpointTest.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateEndpointTest.java @@ -31,8 +31,8 @@ public void setUp() throws IOException, URISyntaxException { .toURI()); Files.createDirectories(getOpenAPIFile().getParent()); Files.copy(referenceOpenAPIJsonFile, getOpenAPIFile()); - outputDirectory = Files - .createDirectory(getTemporaryDirectory().resolve("output")); + outputDirectory = Files.createDirectory( + getTemporaryDirectory().resolve(getOutputDirectory())); } @Test @@ -47,9 +47,7 @@ public void should_generate_Two_TypeScriptFiles() throws Exception { assertFalse(client.exists()); taskGenerateEndpoint = new TaskGenerateEndpointImpl( - getTemporaryDirectory().toFile(), getBuildDirectory(), - outputDirectory.toFile(), getClass()::getResource, false, - "node"); + getEngineConfiguration()); taskGenerateEndpoint.execute(); assertTrue(ts1.exists()); @@ -82,9 +80,7 @@ public void should_use_custom_endpoint_name_when_connect_client_exists() assertTrue(customConnectClient.exists()); taskGenerateEndpoint = new TaskGenerateEndpointImpl( - getTemporaryDirectory().toFile(), getBuildDirectory(), - outputDirectory.toFile(), getClass()::getResource, false, - "node"); + getEngineConfiguration()); taskGenerateEndpoint.execute(); assertTrue(ts1.exists()); diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateOpenAPITest.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateOpenAPITest.java index eeb37fd248..5fed4bd0a3 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateOpenAPITest.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskGenerateOpenAPITest.java @@ -16,16 +16,20 @@ package com.vaadin.hilla.internal; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.assertEquals; +import com.vaadin.hilla.ApplicationContextProvider; +import com.vaadin.hilla.internal.fixtures.CustomEndpoint; +import com.vaadin.hilla.internal.fixtures.EndpointNoValue; +import com.vaadin.hilla.internal.fixtures.MyEndpoint; import org.junit.jupiter.api.Test; import com.vaadin.flow.server.frontend.TaskGenerateOpenAPI; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.parser.OpenAPIV3Parser; +import org.springframework.boot.test.context.SpringBootTest; /** * This test suite is only for triggering the OpenAPI generator. For the actual @@ -40,53 +44,47 @@ public class TaskGenerateOpenAPITest extends TaskTest { public void should_UseCustomEndpointNameWithoutValueEqual_InsteadOf_UsingClassName() throws Exception { taskGenerateOpenApi = new TaskGenerateOpenAPIImpl( - getTemporaryDirectory().toFile(), getBuildDirectory(), - getTemporaryDirectory().resolve(getOutputDirectory()).toFile(), - getClass()::getResource, false); + getEngineConfiguration()); taskGenerateOpenApi.execute(); var generatedOpenAPI = getGeneratedOpenAPI(); - assertThat(generatedOpenAPI.getPaths(), - hasKey("/WithoutValueEqual/bar")); - assertThat(generatedOpenAPI.getPaths(), - not(hasKey("/EndpointNoValue/bar"))); - assertThat(generatedOpenAPI.getPaths(), - hasKey("/WithoutValueEqual/foo")); - assertThat(generatedOpenAPI.getPaths(), - not(hasKey("/EndpointNoValue/foo"))); + assertThat(generatedOpenAPI.getPaths().keySet(), + hasItem("/WithoutValueEqual/bar")); + assertThat(generatedOpenAPI.getPaths().keySet(), + not(hasItem("/EndpointNoValue/bar"))); + assertThat(generatedOpenAPI.getPaths().keySet(), + hasItem("/WithoutValueEqual/foo")); + assertThat(generatedOpenAPI.getPaths().keySet(), + not(hasItem("/EndpointNoValue/foo"))); } @Test public void should_UseCustomEndpointName_InsteadOf_UsingClassName() throws Exception { taskGenerateOpenApi = new TaskGenerateOpenAPIImpl( - getTemporaryDirectory().toFile(), getBuildDirectory(), - getTemporaryDirectory().resolve(getOutputDirectory()).toFile(), - getClass()::getResource, false); + getEngineConfiguration()); taskGenerateOpenApi.execute(); var generatedOpenAPI = getGeneratedOpenAPI(); - assertThat(generatedOpenAPI.getPaths(), - hasKey("/CustomEndpointName/bar")); - assertThat(generatedOpenAPI.getPaths(), - not(hasKey("/CustomEndpoint/bar"))); - assertThat(generatedOpenAPI.getPaths(), - hasKey("/CustomEndpointName/foo")); - assertThat(generatedOpenAPI.getPaths(), - not(hasKey("/CustomEndpoint/foo"))); + assertThat(generatedOpenAPI.getPaths().keySet(), + hasItem("/CustomEndpointName/bar")); + assertThat(generatedOpenAPI.getPaths().keySet(), + not(hasItem("/CustomEndpoint/bar"))); + assertThat(generatedOpenAPI.getPaths().keySet(), + hasItem("/CustomEndpointName/foo")); + assertThat(generatedOpenAPI.getPaths().keySet(), + not(hasItem("/CustomEndpoint/foo"))); } @Test public void should_UseDefaultProperties_when_applicationPropertiesIsEmpty() throws Exception { taskGenerateOpenApi = new TaskGenerateOpenAPIImpl( - getTemporaryDirectory().toFile(), getBuildDirectory(), - getTemporaryDirectory().resolve(getOutputDirectory()).toFile(), - getClass()::getResource, false); + getEngineConfiguration()); taskGenerateOpenApi.execute(); diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskTest.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskTest.java index a958cef42e..68b36cd50b 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskTest.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/TaskTest.java @@ -3,7 +3,6 @@ import static com.vaadin.flow.server.frontend.FrontendUtils.PARAM_FRONTEND_DIR; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; @@ -28,10 +27,7 @@ public class TaskTest { @BeforeEach public void setUpTaskApplication() throws IOException, URISyntaxException, - FrontendUtils.CommandExecutionException, InterruptedException, - InvocationTargetException, NoSuchMethodException, - InstantiationException, IllegalAccessException, - NoSuchFieldException { + FrontendUtils.CommandExecutionException, InterruptedException { temporaryDirectory = Files.createTempDirectory(getClass().getName()); temporaryDirectory.toFile().deleteOnExit(); var userDir = temporaryDirectory.toAbsolutePath().toString(); @@ -80,11 +76,11 @@ public void tearDownTaskApplication() throws IOException { } protected String getBuildDirectory() { - return "target"; + return "build"; } protected String getClassesDirectory() { - return "target/classes"; + return "build/classes"; } protected Path getOpenAPIFile() { @@ -103,4 +99,10 @@ protected String getOutputDirectory() { protected Path getTemporaryDirectory() { return temporaryDirectory; } + + protected EngineConfiguration getEngineConfiguration() { + return new EngineConfiguration.Builder() + .baseDir(getTemporaryDirectory()).buildDir(getBuildDirectory()) + .outputDir(getOutputDirectory()).create(); + } } diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/CustomEndpoint.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/CustomEndpoint.java index 65539937c7..c172517e24 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/CustomEndpoint.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/CustomEndpoint.java @@ -1,8 +1,11 @@ package com.vaadin.hilla.internal.fixtures; +import com.vaadin.hilla.Endpoint; + /** * A test class. */ +@Endpoint(value = "CustomEndpointName") public class CustomEndpoint { /** diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/EndpointNoValue.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/EndpointNoValue.java index 1b7ec0c325..7d79a7c9d5 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/EndpointNoValue.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/EndpointNoValue.java @@ -1,8 +1,11 @@ package com.vaadin.hilla.internal.fixtures; +import com.vaadin.hilla.Endpoint; + /** * A test class. */ +@Endpoint("WithoutValueEqual") public class EndpointNoValue { /** diff --git a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/MyEndpoint.java b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/MyEndpoint.java index 2e1b9a284b..47f245bb4e 100644 --- a/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/MyEndpoint.java +++ b/packages/java/engine-runtime/src/test/java/com/vaadin/hilla/internal/fixtures/MyEndpoint.java @@ -1,8 +1,11 @@ package com.vaadin.hilla.internal.fixtures; +import com.vaadin.hilla.BrowserCallable; + /** * A test class. */ +@BrowserCallable public class MyEndpoint { /** diff --git a/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineBuildFrontendTask.kt b/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineBuildFrontendTask.kt index c8e0e47b6d..627db6ff0d 100644 --- a/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineBuildFrontendTask.kt +++ b/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineBuildFrontendTask.kt @@ -46,12 +46,15 @@ public open class EngineBuildFrontendTask : com.vaadin.gradle.VaadinBuildFronten @TaskAction public fun exec() { - var engineConfiguration = EngineConfiguration.getDefault() - engineConfiguration.classpath = classpathElements.map { Path.of(it) }.toSet() - engineConfiguration.groupId = groupId - engineConfiguration.artifactId = artifactId - engineConfiguration.mainClass = mainClass - engineConfiguration.buildDir = buildDir.toPath() + var engineConfiguration = EngineConfiguration.Builder() + .classpath(classpathElements) + .groupId(groupId) + .artifactId(artifactId) + .mainClass(mainClass) + .buildDir(buildDir.toPath()) + .create() + + EngineConfiguration.setDefault(engineConfiguration) super.vaadinBuildFrontend() } diff --git a/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineGenerateTask.kt b/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineGenerateTask.kt index 9a879554ad..757d9298ff 100644 --- a/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineGenerateTask.kt +++ b/packages/java/gradle-plugin/src/main/kotlin/com/vaadin/hilla/gradle/plugin/EngineGenerateTask.kt @@ -22,12 +22,12 @@ import org.gradle.api.GradleException import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.bundling.Jar import java.io.IOException -import java.net.URL -import java.net.URLClassLoader import java.nio.file.Path -import java.util.* import com.vaadin.hilla.engine.* +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Optional + /** * Task that generates the endpoints.ts and model TS classes * needed for calling the backend in a typesafe manner. @@ -45,6 +45,16 @@ public open class EngineGenerateTask : DefaultTask() { } } + @Input + public val groupId: String = project.group.toString() + + @Input + public val artifactId: String = project.name + + @Input + @Optional + public var mainClass: String? = project.findProperty("spring-boot.aot.main-class") as String? + @TaskAction public fun engineGenerate() { val extension: EngineProjectExtension = EngineProjectExtension.get(project) @@ -56,18 +66,19 @@ public open class EngineGenerateTask : DefaultTask() { val buildDir: Path = baseDir.resolve(vaadinExtension.projectBuildDir.get()) try { - val conf: EngineConfiguration = Objects.requireNonNull( - EngineConfiguration.getDefault()) - - val urls = conf.classpath - .stream().map { classPathItem: Path -> - classPathItem.toUri().toURL() - } - .toList() - val isProductionMode = vaadinExtension.productionMode.getOrElse(false); - val parserProcessor = ParserProcessor(conf, isProductionMode) - val generatorProcessor = GeneratorProcessor(conf, extension.nodeCommand, isProductionMode) + val conf: EngineConfiguration = EngineConfiguration.Builder() + .baseDir(baseDir) + .buildDir(buildDir) + .outputDir(vaadinExtension.generatedTsFolder.get().toPath()) + .groupId(groupId) + .artifactId(artifactId) + .mainClass(mainClass) + .productionMode(isProductionMode) + .create() + + val parserProcessor = ParserProcessor(conf) + val generatorProcessor = GeneratorProcessor(conf) val endpoints = AotEndpointFinder(conf).findEndpointClasses() parserProcessor.process(endpoints) diff --git a/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/BuildFrontendMojo.java b/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/BuildFrontendMojo.java index 4790762834..788bb8672b 100644 --- a/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/BuildFrontendMojo.java +++ b/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/BuildFrontendMojo.java @@ -1,16 +1,10 @@ package com.vaadin.hilla.maven; -import java.io.File; -import java.nio.file.Path; -import java.util.List; -import java.util.stream.Collectors; - import com.vaadin.hilla.engine.EngineConfiguration; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import com.vaadin.flow.component.dependency.JavaScript; @@ -19,6 +13,7 @@ import com.vaadin.flow.server.Constants; import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.theme.Theme; +import org.apache.maven.project.MavenProject; /** * Goal that builds the frontend bundle. @@ -41,30 +36,23 @@ @Mojo(name = "build-frontend", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, defaultPhase = LifecyclePhase.PROCESS_CLASSES) public class BuildFrontendMojo extends com.vaadin.flow.plugin.maven.BuildFrontendMojo { - @Parameter(defaultValue = "${project.compileClasspathElements}", readonly = true, required = true) - private List classpathElements; - - @Parameter(defaultValue = "${project.groupId}", readonly = true, required = true) - private String groupId; - - @Parameter(defaultValue = "${project.artifactId}", readonly = true, required = true) - private String artifactId; - - @Parameter(defaultValue = "${project.build.directory}", readonly = true, required = true) - private File buildDir; - - @Parameter(property = "spring-boot.aot.main-class") - private String mainClass; + // FIXME(platosha): Maven only supports parameters on a single class. + // @Parameter(property = "spring-boot.aot.main-class") + // private String mainClass; @Override public void execute() throws MojoExecutionException, MojoFailureException { - var conf = EngineConfiguration.getDefault(); - conf.setClasspath(classpathElements.stream().map(Path::of) - .collect(Collectors.toSet())); - conf.setGroupId(groupId); - conf.setArtifactId(artifactId); - conf.setMainClass(mainClass); - conf.setBuildDir(buildDir.toPath()); + var project = (MavenProject) getPluginContext().get("project"); + if (project == null) { + throw new MojoExecutionException("No project found"); + } + EngineConfiguration.setDefault(new EngineConfiguration.Builder() + .baseDir(npmFolder().toPath()).buildDir(buildFolder()) + .outputDir(generatedTsFolder().toPath()) + .groupId(project.getGroupId()) + .artifactId(project.getArtifactId()) + // .mainClass(mainClass) + .create()); super.execute(); } } diff --git a/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/EngineGenerateMojo.java b/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/EngineGenerateMojo.java index 615342e44e..13ff19550c 100644 --- a/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/EngineGenerateMojo.java +++ b/packages/java/maven-plugin/src/main/java/com/vaadin/hilla/maven/EngineGenerateMojo.java @@ -1,11 +1,8 @@ package com.vaadin.hilla.maven; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; +import java.io.File; -import com.vaadin.hilla.engine.AotEndpointFinder; +import com.vaadin.flow.server.ExecutionFailedException; import org.apache.maven.model.Profile; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugins.annotations.LifecyclePhase; @@ -21,18 +18,33 @@ import com.vaadin.hilla.engine.ParserException; import com.vaadin.hilla.engine.ParserProcessor; +import static com.vaadin.flow.server.frontend.FrontendUtils.FRONTEND; +import static com.vaadin.flow.server.frontend.FrontendUtils.GENERATED; + /** * Maven Plugin for Hilla. Handles parsing Java bytecode and generating * TypeScript code from it. */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME) public final class EngineGenerateMojo extends AbstractMojo { + /** + * A directory with project's frontend source files. + */ + @Parameter(defaultValue = "${project.basedir}/src/main/" + FRONTEND) + private File frontendDirectory; + + @Parameter(defaultValue = "${null}") + private File generatedTsFolder; @Parameter(defaultValue = "node") private String nodeCommand; - @Parameter(defaultValue = "${project}", readonly = true) + + @Parameter(defaultValue = "${project}", readonly = true, required = true) private MavenProject project; + @Parameter(property = "spring-boot.aot.main-class") + private String mainClass; + @Override public void execute() throws EngineGenerateMojoException { if (!FlowModeAbstractMojo.isHillaAvailable(project)) { @@ -44,21 +56,33 @@ public void execute() throws EngineGenerateMojoException { return; } try { - var conf = EngineConfiguration.getDefault(); var isProduction = project.getActiveProfiles().stream() .map(Profile::getId).anyMatch("production"::equals); - var parserProcessor = new ParserProcessor(conf, isProduction); - var generatorProcessor = new GeneratorProcessor(conf, nodeCommand, - isProduction); + var conf = new EngineConfiguration.Builder() + .baseDir(project.getBasedir().toPath()) + .buildDir(project.getBuild().getDirectory()) + .outputDir(generatedTsFolder().toPath()) + .groupId(project.getGroupId()) + .artifactId(project.getArtifactId()).mainClass(mainClass) + .productionMode(isProduction).create(); + var parserProcessor = new ParserProcessor(conf); + var generatorProcessor = new GeneratorProcessor(conf); - var endpoints = new AotEndpointFinder(conf).findEndpointClasses(); + var endpoints = conf.getOfflineEndpointProvider().findEndpoints(); parserProcessor.process(endpoints); generatorProcessor.process(); - } catch (IOException | InterruptedException e) { + } catch (ExecutionFailedException e) { throw new EngineGenerateMojoException("Endpoint collection failed", e); } catch (GeneratorException | ParserException e) { throw new EngineGenerateMojoException("Execution failed", e); } } + + private File generatedTsFolder() { + if (generatedTsFolder != null) { + return generatedTsFolder; + } + return new File(frontendDirectory, GENERATED); + } } diff --git a/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/AbstractMojoTest.java b/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/AbstractMojoTest.java index b872e1e13c..bb164eb754 100644 --- a/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/AbstractMojoTest.java +++ b/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/AbstractMojoTest.java @@ -5,6 +5,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Comparator; +import java.util.List; import java.util.Objects; import java.util.Set; @@ -50,8 +51,9 @@ public void setUpMojoTest() throws Exception { // Maven project is not initialized on the mojo, setup a mock manually project = createMavenProject(); - engineConfiguration = EngineConfiguration.getDefault(); - engineConfiguration.setBaseDir(getTemporaryDirectory()); + engineConfiguration = new EngineConfiguration.Builder() + .offlineEndpointProvider(() -> List.of()).create(); + EngineConfiguration.setDefault(engineConfiguration); } @AfterEach diff --git a/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/EngineGenerateMojoTest.java b/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/EngineGenerateMojoTest.java index 87b4dfc0c3..924ec6e545 100644 --- a/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/EngineGenerateMojoTest.java +++ b/packages/java/maven-plugin/src/test/java/com/vaadin/hilla/maven/EngineGenerateMojoTest.java @@ -25,42 +25,26 @@ public void should_RunParserAndGenerator() throws Exception { Mockito.withSettings().defaultAnswer(Answers.RETURNS_SELF), (mock, context) -> { // Verify ParserProcessor constructor arguments - assertEquals(2, context.arguments().size(), - "expected 2 ParserProcessor arguments"); + assertEquals(1, context.arguments().size(), + "expected 1 ParserProcessor argument"); // Verify configuration argument var conf = (EngineConfiguration) context.arguments().get(0); - assertEquals(conf, getEngineConfiguration()); - - // Verify class loader argument - var classLoader = (ClassLoader) context.arguments().get(1); - assertInstanceOf(URLClassLoader.class, classLoader); - assertEquals(classLoader.getParent(), - EngineGenerateMojo.class.getClassLoader()); - assertArrayEquals( - new URL[] { getTemporaryDirectory() - .resolve("build/classes").toUri().toURL(), - getTemporaryDirectory() - .resolve("build/test-classes") - .toUri().toURL() }, - ((URLClassLoader) classLoader).getURLs()); + verifyConfiguration(conf); }); var mockedConstructionGenerator = Mockito.mockConstruction( GeneratorProcessor.class, Mockito.withSettings() .defaultAnswer(Answers.RETURNS_SELF), ((mock, context) -> { // Verify GeneratorProcessor arguments - assertEquals(3, context.arguments().size(), - "expected 3 GeneratorProcessor arguments"); + assertEquals(1, context.arguments().size(), + "expected 1 GeneratorProcessor argument"); // Verify configuration argument var conf = (EngineConfiguration) context.arguments() .get(0); - assertEquals(conf, getEngineConfiguration()); - })); - - var mockedStaticEngineConfiguration = Mockito - .mockStatic(EngineConfiguration.class)) { + verifyConfiguration(conf); + }));) { // Lookup and initialize mojo var engineGenerateMojo = (EngineGenerateMojo) lookupMojo("generate", @@ -83,4 +67,10 @@ public void should_RunParserAndGenerator() throws Exception { inOrder.verify(generatorProcessor).process(); } } + + private void verifyConfiguration(EngineConfiguration conf) { + assertEquals(conf.getBaseDir(), getTemporaryDirectory()); + assertEquals(conf.getOpenAPIFile(), getTemporaryDirectory() + .resolve("build").resolve("hilla-openapi.json")); + } } diff --git a/packages/java/tests/spring/endpoints discovery/package-lock.json b/packages/java/tests/spring/endpoints discovery/package-lock.json index c514b981f7..e73c979f5d 100644 --- a/packages/java/tests/spring/endpoints discovery/package-lock.json +++ b/packages/java/tests/spring/endpoints discovery/package-lock.json @@ -10,13 +10,13 @@ "@vaadin/common-frontend": "0.0.19", "@vaadin/hilla-frontend": "file:../../../../ts/frontend", "@vaadin/hilla-lit-form": "file:../../../../ts/lit-form", - "@vaadin/icon": "24.6.0-alpha8", - "@vaadin/icons": "24.6.0-alpha8", - "@vaadin/polymer-legacy-adapter": "24.6.0-alpha8", + "@vaadin/icon": "24.6.0-beta1", + "@vaadin/icons": "24.6.0-beta1", + "@vaadin/polymer-legacy-adapter": "24.6.0-beta1", "@vaadin/router": "2.0.0", - "@vaadin/tooltip": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/tooltip": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "construct-style-sheets-polyfill": "3.1.0", "lit": "3.2.1" }, @@ -52,7 +52,7 @@ }, "../../../../ts/frontend": { "name": "@vaadin/hilla-frontend", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "license": "Apache-2.0", "dependencies": { "@vaadin/common-frontend": "^0.0.19", @@ -83,12 +83,12 @@ }, "../../../../ts/generator-cli": { "name": "@vaadin/hilla-generator-cli", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "get-stdin": "^9.0.0", "meow": "^12.1.1" }, @@ -102,7 +102,7 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", @@ -121,12 +121,12 @@ }, "../../../../ts/generator-core": { "name": "@vaadin/hilla-generator-core", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "meow": "^12.1.1", "openapi-types": "^12.1.3", "typescript": "5.6.2" @@ -153,13 +153,13 @@ }, "../../../../ts/generator-plugin-backbone": { "name": "@vaadin/hilla-generator-plugin-backbone", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "5.6.2" @@ -170,8 +170,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -189,13 +189,13 @@ }, "../../../../ts/generator-plugin-barrel": { "name": "@vaadin/hilla-generator-plugin-barrel", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "typescript": "5.6.2" }, "devDependencies": { @@ -204,8 +204,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -223,12 +223,12 @@ }, "../../../../ts/generator-plugin-client": { "name": "@vaadin/hilla-generator-plugin-client", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "typescript": "5.6.2" }, "devDependencies": { @@ -237,7 +237,7 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -255,14 +255,14 @@ }, "../../../../ts/generator-plugin-model": { "name": "@vaadin/hilla-generator-plugin-model", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", - "@vaadin/hilla-lit-form": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", + "@vaadin/hilla-lit-form": "24.6.0-alpha5", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "5.6.2" @@ -273,8 +273,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -292,13 +292,13 @@ }, "../../../../ts/generator-plugin-push": { "name": "@vaadin/hilla-generator-plugin-push", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "5.6.2" @@ -309,8 +309,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -328,14 +328,14 @@ }, "../../../../ts/generator-plugin-signals": { "name": "@vaadin/hilla-generator-plugin-signals", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "fast-deep-equal": "^3.1.3", "iterator-helpers-polyfill": "^3.0.1", "openapi-types": "^12.1.3", @@ -347,8 +347,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", "c8": "^8.0.1", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -365,14 +365,14 @@ }, "../../../../ts/generator-plugin-subtypes": { "name": "@vaadin/hilla-generator-plugin-subtypes", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "fast-deep-equal": "^3.1.3", "openapi-types": "^12.1.3", "typescript": "5.6.2" @@ -383,9 +383,9 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -403,7 +403,7 @@ }, "../../../../ts/generator-utils": { "name": "@vaadin/hilla-generator-utils", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "dev": true, "license": "Apache 2.0", "dependencies": { @@ -460,10 +460,10 @@ }, "../../../../ts/lit-form": { "name": "@vaadin/hilla-lit-form", - "version": "24.6.0-alpha4", + "version": "24.6.0-alpha5", "license": "Apache-2.0", "dependencies": { - "@vaadin/hilla-frontend": "24.6.0-alpha4", + "@vaadin/hilla-frontend": "24.6.0-alpha5", "validator": "^13.11.0" }, "devDependencies": { @@ -3554,13 +3554,14 @@ "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==" }, "node_modules/@vaadin/a11y-base": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.6.0-alpha8.tgz", - "integrity": "sha512-dCVgfB06VzTXlAstWcrnPeL+LolwhP1/HKLblTm13U/qvaAQ1IogI8jJFkyA+HeDBKmVYX1C2oYheU62491W9w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.6.0-beta1.tgz", + "integrity": "sha512-gDi+sUvPM3XAYkg6O9Sai51T7M6KvBTkCg5WSvkTZOVoLJcbV7PgKv5Ah8njoJ3UmFweEWmxhjB1aGDv68dNiw==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.6.0-alpha8", + "@vaadin/component-base": "24.6.0-beta1", "lit": "^3.0.0" } }, @@ -3576,9 +3577,10 @@ } }, "node_modules/@vaadin/component-base": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.6.0-alpha8.tgz", - "integrity": "sha512-vRFjnBUq8VQ2elNUbTwl9+LFxb6wvdwzHWFEd2AK/Xhi25IoaFM+B0+zlZM4O7FunqOvYIiOMzfz5vPrk8vG8w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.6.0-beta1.tgz", + "integrity": "sha512-69qMnRU49CnN1Zbf6SaCpSlZgySY4h8frkOvtW24GkMKprXBoSuWcKsUBXgR/xCMnwYM3KpJbbTVpqLqN6TCpw==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -3636,73 +3638,79 @@ "link": true }, "node_modules/@vaadin/icon": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.6.0-alpha8.tgz", - "integrity": "sha512-K+SPEL5FaS/KXtCN//6R4lpKFFuq8INoPksJPv6053slgSsDOicjZC9ip2Sg8Bc4ifaxhqBhI153m5WVJ5yRuQ==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.6.0-beta1.tgz", + "integrity": "sha512-p2MS1shPHDPK3TITvkb28o1+l4fbDrhSDjdMlk8krTm7daHoDp4QMpXpmR2CfRs8WE8ZgF4XW5jihoudAEfV1Q==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "^3.0.0" } }, "node_modules/@vaadin/icons": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.6.0-alpha8.tgz", - "integrity": "sha512-MROcW+sRCkYSmHfxL91z9gB6q1EruAKu6crmBQaAlIOYEUtsR4egi/lvoK6QJlIJzPA7nyqjYDcwxWruf4nc7w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.6.0-beta1.tgz", + "integrity": "sha512-Za/wfpcE3VUGoBlFVN2JyNdnjCq8QIzCNqLi2tc6LclnawaO+q1LwJiJkMXJ28DwIncLZnw6i1fFB8yxUlYSjg==", + "license": "Apache-2.0", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "24.6.0-alpha8" + "@vaadin/icon": "24.6.0-beta1" } }, "node_modules/@vaadin/lit-renderer": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-24.6.0-alpha8.tgz", - "integrity": "sha512-qhucr9v4B6Kuz26YD5tmr2J7Ol286FXIopeVuReU+m67RN8dEe45g+ptz7bqxqYYhUR3wBZrZSoG3wwTX5zcoA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-24.6.0-beta1.tgz", + "integrity": "sha512-GKFwglatwKne1j52HVF6kFZLUnnaJO+EhH8M9Ge4IIWMTlJRJljt6iWJaip9fnQ0KsEVaQL76WhI1PodW+NoZw==", + "license": "Apache-2.0", "dependencies": { "lit": "^3.0.0" } }, "node_modules/@vaadin/overlay": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.6.0-alpha8.tgz", - "integrity": "sha512-Pq2KeYFS4wCFzV1KvTsyD3Rbv6v0nuY9BVUBpWmBZIK2D4BlU/6KggEHpA835t6PJF4YK5GMQryCiABs6SUqKw==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.6.0-beta1.tgz", + "integrity": "sha512-ILnufqxXlAPWWSr/cz2XI0wvmTNTmC1qmBCIHDnRPT079GXxdH+u49mhfZYvqBKwOkpDwdihvcLvOU0BRcwkKg==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "^3.0.0" } }, "node_modules/@vaadin/polymer-legacy-adapter": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.6.0-alpha8.tgz", - "integrity": "sha512-OSE9WBuVQ3M7XP2Zd1gpyGTSi6pUXVSvPffuMLNck3iLe2O9hd4t98A+SQB6QfQjcJjmEk+4F2jgyxw62SYFyA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.6.0-beta1.tgz", + "integrity": "sha512-rn8kiRXl838X+N12l7LmlgohGCz698G2TkAfYoJjcBpfcbJtzxDmHwBuUgg+2yVTg0NGBICRFBITRaBR5Z6JGg==", + "license": "Apache-2.0", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "^3.0.0" } }, "node_modules/@vaadin/popover": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/popover/-/popover-24.6.0-alpha8.tgz", - "integrity": "sha512-tKXvoodN67CZFKJgOwZKcJNXa41H55qDi76g+cdOYaRZ+KrfsSKjDFs1ZsBkymLYqVVOuyFaOFh7U/WtdyKf7g==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/popover/-/popover-24.6.0-beta1.tgz", + "integrity": "sha512-ZuwtLejdrqfGNAa6ViF4UxdLq4Vx80SkO5DreEDAcFRO5EjQQiQPiH0BK6lm8i5qhZQr7QWrDXm2hMVpwx6ADg==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/lit-renderer": "24.6.0-alpha8", - "@vaadin/overlay": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/lit-renderer": "24.6.0-beta1", + "@vaadin/overlay": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "^3.0.0" } }, @@ -3728,19 +3736,20 @@ } }, "node_modules/@vaadin/tooltip": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.6.0-alpha8.tgz", - "integrity": "sha512-5ZJu4bue9dMdp+R0xIaLEh2zyNwdJGyQ4a4osL1kZPiSE8gbhfAMuyOIzQmZ3Enhup0YVpMGqUI0+px/YpxnDg==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.6.0-beta1.tgz", + "integrity": "sha512-QS9mq/I2pVpsK++Wfitl0n9WQ/mz3ac1mH7DSpmKKzah7pIqCOmO1ap/XQ92ofST7GYxa65iQ4tSwAk2tLTBUg==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/overlay": "24.6.0-alpha8", - "@vaadin/popover": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/overlay": "24.6.0-beta1", + "@vaadin/popover": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "^3.0.0" } }, @@ -3750,30 +3759,33 @@ "integrity": "sha512-N6a5nLT/ytEUlpPo+nvdCKIGoyNjPsj3rzPGvGYK8x9Ceg76OTe1xI/GtN71mRW9e2HUScR0kCNOkl1Z63YDjw==" }, "node_modules/@vaadin/vaadin-lumo-styles": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.6.0-alpha8.tgz", - "integrity": "sha512-/XNt5Ago7TpZcYbxyIRVlX+3KhG7quV6ssOJ7oWHJelrWYEjLWy0ZTHaS5iTamvAq6lOapytuFbO5/sy+z/mUA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.6.0-beta1.tgz", + "integrity": "sha512-0o0lqHy9jP6ZakC4NXcw/fnsqVo56GSJsysIaQalb4KDThHl1XSUT+QeIgUvfqvVLnLzjF1CjoEK+K7NM0luuQ==", + "license": "Apache-2.0", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/icon": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8" + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/icon": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1" } }, "node_modules/@vaadin/vaadin-material-styles": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.6.0-alpha8.tgz", - "integrity": "sha512-ERNeJzZU4h2OjQg/nyU55jHfdMhdst0Sjcl+QTRLf/gNns0pdd7oCWoTZ9o5yNVwo5NAWa7UI3Ry+rOrl8hZ1g==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.6.0-beta1.tgz", + "integrity": "sha512-+TZ7AIKv6zT5FqKtcwoqjrvUk5Pfnt26wgVAFswUQf/sr0Ww+n+WVlPyE62lkRfWpXKPDTgsxOMlRAQcaROlog==", + "license": "Apache-2.0", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8" + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1" } }, "node_modules/@vaadin/vaadin-themable-mixin": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.6.0-alpha8.tgz", - "integrity": "sha512-qKtIYeeukUR5m3h1ASFhmFWHScLHjERPUmDPc66XTX7GWW5vYHv06yzKEzL7xEJx5AghUCQRHwWbE2Xo3EvqzA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.6.0-beta1.tgz", + "integrity": "sha512-C/aGG+uA/esAFpswKM7yKIiNXn4Z65vJqV59XIHI1TANjhvmjjtIx9IdlmgV8FsqsgsnIYUPCJGhe4/QN5VPEw==", + "license": "Apache-2.0", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^3.0.0" @@ -10253,13 +10265,13 @@ "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==" }, "@vaadin/a11y-base": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.6.0-alpha8.tgz", - "integrity": "sha512-dCVgfB06VzTXlAstWcrnPeL+LolwhP1/HKLblTm13U/qvaAQ1IogI8jJFkyA+HeDBKmVYX1C2oYheU62491W9w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.6.0-beta1.tgz", + "integrity": "sha512-gDi+sUvPM3XAYkg6O9Sai51T7M6KvBTkCg5WSvkTZOVoLJcbV7PgKv5Ah8njoJ3UmFweEWmxhjB1aGDv68dNiw==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "3.5.2", - "@vaadin/component-base": "24.6.0-alpha8", + "@vaadin/component-base": "24.6.0-beta1", "lit": "3.2.1" } }, @@ -10272,9 +10284,9 @@ } }, "@vaadin/component-base": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.6.0-alpha8.tgz", - "integrity": "sha512-vRFjnBUq8VQ2elNUbTwl9+LFxb6wvdwzHWFEd2AK/Xhi25IoaFM+B0+zlZM4O7FunqOvYIiOMzfz5vPrk8vG8w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.6.0-beta1.tgz", + "integrity": "sha512-69qMnRU49CnN1Zbf6SaCpSlZgySY4h8frkOvtW24GkMKprXBoSuWcKsUBXgR/xCMnwYM3KpJbbTVpqLqN6TCpw==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "3.5.2", @@ -10316,8 +10328,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", @@ -10342,7 +10354,7 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10365,9 +10377,9 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10391,9 +10403,9 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10415,8 +10427,8 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10438,11 +10450,11 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", - "@vaadin/hilla-lit-form": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", + "@vaadin/hilla-lit-form": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10466,9 +10478,9 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10492,10 +10504,10 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-backbone": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^8.0.1", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10519,10 +10531,10 @@ "@types/node": "^20.7.1", "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", - "@vaadin/hilla-generator-core": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha4", - "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha4", - "@vaadin/hilla-generator-utils": "24.6.0-alpha4", + "@vaadin/hilla-generator-core": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-client": "24.6.0-alpha5", + "@vaadin/hilla-generator-plugin-model": "24.6.0-alpha5", + "@vaadin/hilla-generator-utils": "24.6.0-alpha5", "c8": "^10.1.2", "chai": "^4.3.10", "concurrently": "^8.2.1", @@ -10571,7 +10583,7 @@ "@types/sinon": "^10.0.17", "@types/sinon-chai": "^3.2.10", "@types/validator": "^13.11.2", - "@vaadin/hilla-frontend": "24.6.0-alpha4", + "@vaadin/hilla-frontend": "24.6.0-alpha5", "chai-dom": "^1.11.0", "sinon": "^16.0.0", "sinon-chai": "^3.7.0", @@ -10580,73 +10592,73 @@ } }, "@vaadin/icon": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.6.0-alpha8.tgz", - "integrity": "sha512-K+SPEL5FaS/KXtCN//6R4lpKFFuq8INoPksJPv6053slgSsDOicjZC9ip2Sg8Bc4ifaxhqBhI153m5WVJ5yRuQ==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.6.0-beta1.tgz", + "integrity": "sha512-p2MS1shPHDPK3TITvkb28o1+l4fbDrhSDjdMlk8krTm7daHoDp4QMpXpmR2CfRs8WE8ZgF4XW5jihoudAEfV1Q==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "3.5.2", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "3.2.1" } }, "@vaadin/icons": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.6.0-alpha8.tgz", - "integrity": "sha512-MROcW+sRCkYSmHfxL91z9gB6q1EruAKu6crmBQaAlIOYEUtsR4egi/lvoK6QJlIJzPA7nyqjYDcwxWruf4nc7w==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/icons/-/icons-24.6.0-beta1.tgz", + "integrity": "sha512-Za/wfpcE3VUGoBlFVN2JyNdnjCq8QIzCNqLi2tc6LclnawaO+q1LwJiJkMXJ28DwIncLZnw6i1fFB8yxUlYSjg==", "requires": { "@polymer/polymer": "3.5.2", - "@vaadin/icon": "24.6.0-alpha8" + "@vaadin/icon": "24.6.0-beta1" } }, "@vaadin/lit-renderer": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-24.6.0-alpha8.tgz", - "integrity": "sha512-qhucr9v4B6Kuz26YD5tmr2J7Ol286FXIopeVuReU+m67RN8dEe45g+ptz7bqxqYYhUR3wBZrZSoG3wwTX5zcoA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-24.6.0-beta1.tgz", + "integrity": "sha512-GKFwglatwKne1j52HVF6kFZLUnnaJO+EhH8M9Ge4IIWMTlJRJljt6iWJaip9fnQ0KsEVaQL76WhI1PodW+NoZw==", "requires": { "lit": "3.2.1" } }, "@vaadin/overlay": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.6.0-alpha8.tgz", - "integrity": "sha512-Pq2KeYFS4wCFzV1KvTsyD3Rbv6v0nuY9BVUBpWmBZIK2D4BlU/6KggEHpA835t6PJF4YK5GMQryCiABs6SUqKw==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/overlay/-/overlay-24.6.0-beta1.tgz", + "integrity": "sha512-ILnufqxXlAPWWSr/cz2XI0wvmTNTmC1qmBCIHDnRPT079GXxdH+u49mhfZYvqBKwOkpDwdihvcLvOU0BRcwkKg==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "3.5.2", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "3.2.1" } }, "@vaadin/polymer-legacy-adapter": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.6.0-alpha8.tgz", - "integrity": "sha512-OSE9WBuVQ3M7XP2Zd1gpyGTSi6pUXVSvPffuMLNck3iLe2O9hd4t98A+SQB6QfQjcJjmEk+4F2jgyxw62SYFyA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/polymer-legacy-adapter/-/polymer-legacy-adapter-24.6.0-beta1.tgz", + "integrity": "sha512-rn8kiRXl838X+N12l7LmlgohGCz698G2TkAfYoJjcBpfcbJtzxDmHwBuUgg+2yVTg0NGBICRFBITRaBR5Z6JGg==", "requires": { "@polymer/polymer": "3.5.2", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "3.2.1" } }, "@vaadin/popover": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/popover/-/popover-24.6.0-alpha8.tgz", - "integrity": "sha512-tKXvoodN67CZFKJgOwZKcJNXa41H55qDi76g+cdOYaRZ+KrfsSKjDFs1ZsBkymLYqVVOuyFaOFh7U/WtdyKf7g==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/popover/-/popover-24.6.0-beta1.tgz", + "integrity": "sha512-ZuwtLejdrqfGNAa6ViF4UxdLq4Vx80SkO5DreEDAcFRO5EjQQiQPiH0BK6lm8i5qhZQr7QWrDXm2hMVpwx6ADg==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/lit-renderer": "24.6.0-alpha8", - "@vaadin/overlay": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/lit-renderer": "24.6.0-beta1", + "@vaadin/overlay": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "3.2.1" } }, @@ -10668,19 +10680,19 @@ } }, "@vaadin/tooltip": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.6.0-alpha8.tgz", - "integrity": "sha512-5ZJu4bue9dMdp+R0xIaLEh2zyNwdJGyQ4a4osL1kZPiSE8gbhfAMuyOIzQmZ3Enhup0YVpMGqUI0+px/YpxnDg==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/tooltip/-/tooltip-24.6.0-beta1.tgz", + "integrity": "sha512-QS9mq/I2pVpsK++Wfitl0n9WQ/mz3ac1mH7DSpmKKzah7pIqCOmO1ap/XQ92ofST7GYxa65iQ4tSwAk2tLTBUg==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "3.5.2", - "@vaadin/a11y-base": "24.6.0-alpha8", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/overlay": "24.6.0-alpha8", - "@vaadin/popover": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-material-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/a11y-base": "24.6.0-beta1", + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/overlay": "24.6.0-beta1", + "@vaadin/popover": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-material-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "lit": "3.2.1" } }, @@ -10690,30 +10702,30 @@ "integrity": "sha512-N6a5nLT/ytEUlpPo+nvdCKIGoyNjPsj3rzPGvGYK8x9Ceg76OTe1xI/GtN71mRW9e2HUScR0kCNOkl1Z63YDjw==" }, "@vaadin/vaadin-lumo-styles": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.6.0-alpha8.tgz", - "integrity": "sha512-/XNt5Ago7TpZcYbxyIRVlX+3KhG7quV6ssOJ7oWHJelrWYEjLWy0ZTHaS5iTamvAq6lOapytuFbO5/sy+z/mUA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.6.0-beta1.tgz", + "integrity": "sha512-0o0lqHy9jP6ZakC4NXcw/fnsqVo56GSJsysIaQalb4KDThHl1XSUT+QeIgUvfqvVLnLzjF1CjoEK+K7NM0luuQ==", "requires": { "@polymer/polymer": "3.5.2", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/icon": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8" + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/icon": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1" } }, "@vaadin/vaadin-material-styles": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.6.0-alpha8.tgz", - "integrity": "sha512-ERNeJzZU4h2OjQg/nyU55jHfdMhdst0Sjcl+QTRLf/gNns0pdd7oCWoTZ9o5yNVwo5NAWa7UI3Ry+rOrl8hZ1g==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.6.0-beta1.tgz", + "integrity": "sha512-+TZ7AIKv6zT5FqKtcwoqjrvUk5Pfnt26wgVAFswUQf/sr0Ww+n+WVlPyE62lkRfWpXKPDTgsxOMlRAQcaROlog==", "requires": { "@polymer/polymer": "3.5.2", - "@vaadin/component-base": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8" + "@vaadin/component-base": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1" } }, "@vaadin/vaadin-themable-mixin": { - "version": "24.6.0-alpha8", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.6.0-alpha8.tgz", - "integrity": "sha512-qKtIYeeukUR5m3h1ASFhmFWHScLHjERPUmDPc66XTX7GWW5vYHv06yzKEzL7xEJx5AghUCQRHwWbE2Xo3EvqzA==", + "version": "24.6.0-beta1", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.6.0-beta1.tgz", + "integrity": "sha512-C/aGG+uA/esAFpswKM7yKIiNXn4Z65vJqV59XIHI1TANjhvmjjtIx9IdlmgV8FsqsgsnIYUPCJGhe4/QN5VPEw==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "3.2.1" diff --git a/packages/java/tests/spring/endpoints discovery/package.json b/packages/java/tests/spring/endpoints discovery/package.json index d9631e71c1..754fe97320 100644 --- a/packages/java/tests/spring/endpoints discovery/package.json +++ b/packages/java/tests/spring/endpoints discovery/package.json @@ -7,13 +7,13 @@ "@vaadin/common-frontend": "0.0.19", "@vaadin/hilla-frontend": "file:../../../../ts/frontend", "@vaadin/hilla-lit-form": "file:../../../../ts/lit-form", - "@vaadin/icon": "24.6.0-alpha8", - "@vaadin/icons": "24.6.0-alpha8", - "@vaadin/polymer-legacy-adapter": "24.6.0-alpha8", + "@vaadin/icon": "24.6.0-beta1", + "@vaadin/icons": "24.6.0-beta1", + "@vaadin/polymer-legacy-adapter": "24.6.0-beta1", "@vaadin/router": "2.0.0", - "@vaadin/tooltip": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/tooltip": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "construct-style-sheets-polyfill": "3.1.0", "lit": "3.2.1" }, @@ -52,13 +52,13 @@ "@vaadin/common-frontend": "0.0.19", "@vaadin/hilla-frontend": "24.6.0-alpha4", "@vaadin/hilla-lit-form": "24.6.0-alpha4", - "@vaadin/icon": "24.6.0-alpha8", - "@vaadin/icons": "24.6.0-alpha8", - "@vaadin/polymer-legacy-adapter": "24.6.0-alpha8", + "@vaadin/icon": "24.6.0-beta1", + "@vaadin/icons": "24.6.0-beta1", + "@vaadin/polymer-legacy-adapter": "24.6.0-beta1", "@vaadin/router": "2.0.0", - "@vaadin/tooltip": "24.6.0-alpha8", - "@vaadin/vaadin-lumo-styles": "24.6.0-alpha8", - "@vaadin/vaadin-themable-mixin": "24.6.0-alpha8", + "@vaadin/tooltip": "24.6.0-beta1", + "@vaadin/vaadin-lumo-styles": "24.6.0-beta1", + "@vaadin/vaadin-themable-mixin": "24.6.0-beta1", "construct-style-sheets-polyfill": "3.1.0", "lit": "3.2.1" }, @@ -91,7 +91,7 @@ "workbox-core": "7.3.0", "workbox-precaching": "7.3.0" }, - "hash": "bd667a5268f220bc586d8433e421ec5d7a075ee64a0988359dfe04d6fbc53be9" + "hash": "c2376a64930ba43ae3a818ee81208f6bcdb436844218a09ad707633d20a14f25" }, "overrides": { "@vaadin/common-frontend": "$@vaadin/common-frontend", diff --git a/packages/java/tests/spring/endpoints discovery/pom.xml b/packages/java/tests/spring/endpoints discovery/pom.xml index b413d0edfe..384da8a540 100644 --- a/packages/java/tests/spring/endpoints discovery/pom.xml +++ b/packages/java/tests/spring/endpoints discovery/pom.xml @@ -46,13 +46,13 @@ com.vaadin hilla-maven-plugin - - - com.example.application - com.invalid - com.example.library.unpublished - - + + + + + + +