Skip to content
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 @@ -2,7 +2,9 @@

import io.quarkus.code.model.CodeQuarkusExtension;
import io.quarkus.code.model.Preset;
import io.quarkus.code.model.ProjectDefinition;

import java.nio.file.Path;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
Expand All @@ -15,6 +17,8 @@ public interface PlatformOverride {

List<Preset> presets();

void onNewProject(ProjectDefinition projectDefinition, Path dir);

List<String> extensionTagsMapper(List<String> tags);

class DefaultPlatformOverride implements PlatformOverride {
Expand All @@ -32,6 +36,11 @@ public List<Preset> presets() {
return PlatformService.DEFAULT_PRESETS;
}

@Override
public void onNewProject(ProjectDefinition projectDefinition, Path dir) {

}

@Override
public List<String> extensionTagsMapper(List<String> tags) {
return tags.stream().filter(TAGS::contains).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.quarkus.registry.ExtensionCatalogResolver;
import io.quarkus.registry.catalog.PlatformRelease;
import io.quarkus.runtime.LaunchMode;
import io.smallrye.common.annotation.Blocking;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
Expand Down Expand Up @@ -106,6 +107,7 @@ public class PlatformService {
private final ExtensionCatalogResolver catalogResolver;
private final AtomicReference<PlatformServiceCache> platformServiceCacheRef = new AtomicReference<>();

@Blocking
public void onStart(@Observes StartupEvent e) {
reload();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import io.quarkus.devtools.project.QuarkusProjectHelper;

import io.quarkus.devtools.project.compress.QuarkusProjectCompress;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import java.io.IOException;
import java.io.OutputStream;
Expand All @@ -25,11 +27,15 @@
@Singleton
public class QuarkusProjectService {

@Inject
Instance<PlatformOverride> platformOverride;

public byte[] create(PlatformInfo platformInfo, ProjectDefinition projectDefinition)
throws IOException, QuarkusCommandException {
Path path = createTmp(platformInfo, projectDefinition);
long time = System.currentTimeMillis() - 24 * 3600000;
Path zipPath = Files.createTempDirectory("zipped-").resolve("project.zip");

QuarkusProjectCompress.zip(path, zipPath, true, time);
return Files.readAllBytes(zipPath);
}
Expand All @@ -54,6 +60,9 @@ public Path createTmp(
boolean silent) throws IOException, QuarkusCommandException {
Path location = Files.createTempDirectory("generated-").resolve(projectDefinition.artifactId());
createProject(platformInfo, projectDefinition, location, isGitHub, silent);
if (platformOverride != null && platformOverride.isResolvable()) {
platformOverride.get().onNewProject(projectDefinition, location);
}
return location;
}

Expand Down
9 changes: 3 additions & 6 deletions base/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ io.quarkus.code.git-commit-id=${git.commit.id}

# code.quarkus configuration
io.quarkus.code.ui.name=code.quarkus.io
io.quarkus.code.ui.id=community
io.quarkus.code.ui.id=community-app

io.quarkus.code.quarkus-platforms.reload-cron-expr=0 */5 * * * ?

# bundling
quarkus.web-bundler.dependencies.node-modules=node_modules
quarkus.web-bundler.bundle.app=false
quarkus.web-bundler.bundle.lib.key=${io.quarkus.code.ui.id}
quarkus.web-bundler.bundle.community-app.key=${io.quarkus.code.ui.id}
quarkus.web-bundler.bundle.lib=true
quarkus.web-bundler.bundle.lib.output=false

%dev.quarkus.web-bundler.bundle.lib=true
%dev.quarkus.web-bundler.bundle.community-app=true
%playwright.quarkus.web-bundler.bundle.lib=true
%playwright.quarkus.web-bundler.bundle.community-app=true


Expand Down
10 changes: 5 additions & 5 deletions base/src/main/resources/web/lib/components/code-quarkus.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "config";
@use "config" as config;

body {
margin: 0;
Expand Down Expand Up @@ -30,23 +30,23 @@ code {
.responsive-container {
max-width: 1200px;

@media screen and (max-width: $tabletWidth) {
@media screen and (max-width: config.$tabletWidth) {
max-width: 900px;
}

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
max-width: 100%;
}
}

.mobile-only {
@media screen and (min-width: $mobileWidth) {
@media screen and (min-width: config.$mobileWidth) {
display: none !important;
}
}

.desktop-only {
@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none !important;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

#extension-origin-platform-tooltip > .tooltip-inner {
max-width: 400px;
Expand Down Expand Up @@ -63,7 +63,7 @@

.extension-selector {

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}
}
Expand Down Expand Up @@ -104,7 +104,7 @@
height: 24px;
outline: none;
color: var(--extensionsPickerIdTextColor);
@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.search-bar {
margin: 0 auto;
Expand All @@ -18,7 +18,7 @@
gap: 5px;
background-color: var(--extensionsPickerSearchClearButtonBg);

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
span {
display: none;
}
Expand All @@ -41,7 +41,7 @@
margin-right: 5px !important;
}

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}

Expand All @@ -59,7 +59,7 @@
background-color: var(--extensionsPickerSearchBg);


@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
margin: 0 10px;
}

Expand Down Expand Up @@ -128,7 +128,7 @@
display: flex;
gap: 3px;

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;


.extensions-picker {
Expand Down Expand Up @@ -51,7 +51,7 @@
flex-basis: 350px;
order: 2;
flex-grow: 1;
@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
flex-basis: calc(100% - 32px);
}
}
Expand All @@ -75,7 +75,7 @@
z-index: 99;
padding-top: 20px;

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
top: 0;
}

Expand Down Expand Up @@ -108,7 +108,7 @@
flex-grow: 1;
overflow: hidden;

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
padding: 0px 0px 200px;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.header {
height: 70px;
Expand Down Expand Up @@ -64,7 +64,7 @@
width: auto;
}

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
margin-left: 10px;
img {
height: 20px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.header {
.enterprise-support {
Expand Down Expand Up @@ -66,7 +66,7 @@
}


@media screen and (max-width: $mobileWidth) {
@media screen and (max-width:config.$mobileWidth) {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.stream-picker {
z-index: 1500;
Expand Down Expand Up @@ -114,7 +114,7 @@
}
}

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.info-picker {
height: 118px;
Expand All @@ -15,7 +15,7 @@
padding: 0;
}

@media screen and (max-width: $tabletWidth) {
@media screen and (max-width: config.$tabletWidth) {
.extended-settings,
.toggle-button {
display: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import "../_config.scss";
@use "../_config.scss" as config;

.quarkus-project-edition-form {
padding-bottom: 30px;

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
margin: 0;
}

Expand All @@ -25,7 +25,7 @@
margin: 0 auto;
}

@media screen and (max-width: $mobileWidth) {
@media screen and (max-width: config.$mobileWidth) {
display: none;
}
}
Expand Down Expand Up @@ -69,7 +69,7 @@
color: var(--mainContainerTextColor);
text-align: center;
margin-top: 20px;
@media screen and (min-width: $mobileWidth) {
@media screen and (min-width: config.$mobileWidth) {
display: none;
}
}
Expand Down
1 change: 0 additions & 1 deletion community-app/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
quarkus.web-bundler.bundle.lib=true
quarkus.web-bundler.bundle.community-app=true
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<skipITs>true</skipITs>
<surefire-plugin.version>3.5.4</surefire-plugin.version>
<quarkus-web-bundler.version>1.9.3</quarkus-web-bundler.version>
<quarkus-web-bundler.version>2.0.0.CR8</quarkus-web-bundler.version>
<quarkus-playwright.version>2.2.1</quarkus-playwright.version>
<quarkus.qute-web.version>3.4.4</quarkus.qute-web.version>

Expand Down