@@ -80,7 +80,7 @@ export default function Home() {
'button button--outline button--secondary button--lg',
styles.getStarted,
)}
- to={useBaseUrl('docs/')}>
+ to={useBaseUrl('docs/intro')}>
Get Started
diff --git a/docs/static/CP4M/img/cp4m_logo.png b/docs/static/CP4M/img/cp4m_logo.png
new file mode 100644
index 0000000..4fdca21
Binary files /dev/null and b/docs/static/CP4M/img/cp4m_logo.png differ
diff --git a/docs/static/img/meta_opensource_logo.svg b/docs/static/CP4M/img/meta_opensource_logo.svg
similarity index 100%
rename from docs/static/img/meta_opensource_logo.svg
rename to docs/static/CP4M/img/meta_opensource_logo.svg
diff --git a/docs/static/img/meta_opensource_logo_negative.svg b/docs/static/CP4M/img/meta_opensource_logo_negative.svg
similarity index 100%
rename from docs/static/img/meta_opensource_logo_negative.svg
rename to docs/static/CP4M/img/meta_opensource_logo_negative.svg
diff --git a/docs/static/img/undraw_docusaurus_mountain.svg b/docs/static/CP4M/img/undraw_docusaurus_mountain.svg
similarity index 100%
rename from docs/static/img/undraw_docusaurus_mountain.svg
rename to docs/static/CP4M/img/undraw_docusaurus_mountain.svg
diff --git a/docs/static/img/undraw_docusaurus_react.svg b/docs/static/CP4M/img/undraw_docusaurus_react.svg
similarity index 100%
rename from docs/static/img/undraw_docusaurus_react.svg
rename to docs/static/CP4M/img/undraw_docusaurus_react.svg
diff --git a/docs/static/img/undraw_docusaurus_tree.svg b/docs/static/CP4M/img/undraw_docusaurus_tree.svg
similarity index 100%
rename from docs/static/img/undraw_docusaurus_tree.svg
rename to docs/static/CP4M/img/undraw_docusaurus_tree.svg
diff --git a/docs/static/img/docusaurus-social-card.jpg b/docs/static/img/docusaurus-social-card.jpg
deleted file mode 100644
index ffcb448..0000000
Binary files a/docs/static/img/docusaurus-social-card.jpg and /dev/null differ
diff --git a/docs/static/img/docusaurus.png b/docs/static/img/docusaurus.png
deleted file mode 100644
index f458149..0000000
Binary files a/docs/static/img/docusaurus.png and /dev/null differ
diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico
deleted file mode 100644
index c01d54b..0000000
Binary files a/docs/static/img/favicon.ico and /dev/null differ
diff --git a/docs/static/img/logo.svg b/docs/static/img/logo.svg
deleted file mode 100644
index 5d3da46..0000000
--- a/docs/static/img/logo.svg
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
diff --git a/pom.xml b/pom.xml
index 771b743..419f844 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,8 +17,8 @@
1.0-SNAPSHOT
- 20
- 20
+ 21
+ 21
UTF-8
2.15.2
5.10.0
@@ -81,7 +81,7 @@
io.javalin
javalin
- 5.6.2
+ 6.0.1
org.apache.httpcomponents.client5
@@ -132,6 +132,7 @@
shade
+ true
diff --git a/src/main/java/com/meta/cp4m/ServicesRunner.java b/src/main/java/com/meta/cp4m/ServicesRunner.java
index e70c5e4..dc9fce8 100644
--- a/src/main/java/com/meta/cp4m/ServicesRunner.java
+++ b/src/main/java/com/meta/cp4m/ServicesRunner.java
@@ -81,7 +81,7 @@ record RouteGroup(String path, HandlerType handlerType) {}
}
routeGroups.forEach(
(routeGroup, routes) ->
- app.addHandler(
+ app.addHttpHandler(
routeGroup.handlerType(),
routeGroup.path(),
ctx -> this.routeSelectorAndHandler(ctx, routes)));
@@ -125,6 +125,6 @@ public int port() {
@Override
public void close() {
- app.close();
+ app.stop();
}
}
diff --git a/src/test/java/com/meta/cp4m/DummyWebServer.java b/src/test/java/com/meta/cp4m/DummyWebServer.java
index c0621cb..5388145 100644
--- a/src/test/java/com/meta/cp4m/DummyWebServer.java
+++ b/src/test/java/com/meta/cp4m/DummyWebServer.java
@@ -24,7 +24,7 @@ public class DummyWebServer implements AutoCloseable {
private DummyWebServer() {
this.javalin =
Javalin.create()
- .addHandler(
+ .addHttpHandler(
HandlerType.GET,
"/",
ctx ->
@@ -35,7 +35,7 @@ private DummyWebServer() {
ctx.contentType(),
ctx.headerMap(),
ctx.queryParamMap())))
- .addHandler(
+ .addHttpHandler(
HandlerType.POST,
"/",
ctx ->
@@ -75,7 +75,7 @@ public Javalin javalin() {
@Override
public void close() {
- javalin.close();
+ javalin.stop();
}
public record ReceivedRequest(
diff --git a/src/test/java/com/meta/cp4m/message/ConfigParamTestSpec.java b/src/test/java/com/meta/cp4m/message/ConfigParamTestSpec.java
index f76c3cf..b2690cd 100644
--- a/src/test/java/com/meta/cp4m/message/ConfigParamTestSpec.java
+++ b/src/test/java/com/meta/cp4m/message/ConfigParamTestSpec.java
@@ -72,7 +72,8 @@ public boolean required() {
return required;
}
- public @NewInstance ConfigParamTestSpec validValues(H... validValues) {
+ @SafeVarargs
+ public final @NewInstance ConfigParamTestSpec validValues(final H... validValues) {
Collection newValidValues = new ArrayList<>(this.invalidValues);
Arrays.stream(validValues).map(ConfigParamTestSpec::toJsonNode).forEach(newValidValues::add);
return new ConfigParamTestSpec<>(
@@ -83,7 +84,8 @@ public Collection validValues() {
return validValues;
}
- public @NewInstance ConfigParamTestSpec invalidValues(H... invalidValues) {
+ @SafeVarargs
+ public final @NewInstance ConfigParamTestSpec invalidValues(final H... invalidValues) {
Collection newInvalidValues = new ArrayList<>(this.invalidValues);
Arrays.stream(invalidValues)
.map(ConfigParamTestSpec::toJsonNode)
diff --git a/src/test/java/com/meta/cp4m/message/FBMessageHandlerTest.java b/src/test/java/com/meta/cp4m/message/FBMessageHandlerTest.java
index aceb427..6933d5a 100644
--- a/src/test/java/com/meta/cp4m/message/FBMessageHandlerTest.java
+++ b/src/test/java/com/meta/cp4m/message/FBMessageHandlerTest.java
@@ -257,14 +257,14 @@ static Stream requestFactory() throws JsonProcessingException {
void setUp() {
app = Javalin.create();
- app.addHandler(
+ app.addHttpHandler(
HandlerType.GET, "*", ctx -> fail("the pipeline should only be sending post requests"));
- app.addHandler(
+ app.addHttpHandler(
HandlerType.DELETE, "*", ctx -> fail("the pipeline should only be sending post requests"));
- app.addHandler(
+ app.addHttpHandler(
HandlerType.PUT, "*", ctx -> fail("the pipeline should only be sending post requests"));
requests = new LinkedBlockingQueue<>();
- app.addHandler(
+ app.addHttpHandler(
HandlerType.POST,
"/",
ctx -> requests.add(new OutboundRequest(ctx.body(), ctx.headerMap(), ctx.queryParamMap())));
@@ -272,7 +272,7 @@ void setUp() {
@AfterEach
void tearDown() {
- app.close();
+ app.stop();
}
@Test