Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(engine-runtime): skip generating endpoints in prepare-frontend #2485

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static FrontendTools buildTools(Options options) {

@Override
public TaskGenerateEndpoint createTaskGenerateEndpoint(Options options) {
if (!options.isDevBundleBuild() && !options.isFrontendHotdeploy()
if (!options.isRunNpmInstall() && !options.isDevBundleBuild()
&& !options.isProductionMode()) {
// Skip for prepare-frontend phase and in production server
return new SkipTaskGenerateEndpoint();
Expand All @@ -69,7 +69,7 @@ public TaskGenerateEndpoint createTaskGenerateEndpoint(Options options) {

@Override
public TaskGenerateOpenAPI createTaskGenerateOpenAPI(Options options) {
if (!options.isDevBundleBuild() && !options.isFrontendHotdeploy()
if (!options.isRunNpmInstall() && !options.isDevBundleBuild()
&& !options.isProductionMode()) {
// Skip for prepare-frontend phase and in production server
return new SkipTaskGenerateOpenAPI();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void setUp() throws IOException {
.resolve(getFrontendDirectory()).toFile())
.withProductionMode(false)
.withBuildDirectory(getBuildDirectory())
.withFrontendHotdeploy(true).withRunNpmInstall(false)
.enablePackagesUpdate(false).enableImportsUpdate(false)
.withEmbeddableWebComponents(false)
.withFrontendGeneratedFolder(
Expand Down Expand Up @@ -80,7 +81,7 @@ public void should_GenerateEndpointFilesInProductionBuildTask()

@Test
public void should_GenerateEndpointFilesInDevServerTask() throws Exception {
options = options.withFrontendHotdeploy(true);
options = options.withRunNpmInstall(true);

new NodeTasks(options).execute();
assertEndpointFiles(true);
Expand Down
Loading