Skip to content

Commit bc78fa3

Browse files
committed
Upgrade entire stack to http4k v6
1 parent 2315599 commit bc78fa3

File tree

30 files changed

+124
-50
lines changed

30 files changed

+124
-50
lines changed

api-gateway/src/main/kotlin/hyperpyramid/ApiGateway.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import hyperpyramid.ApiGatewaySettings.SHOP_URL
55
import hyperpyramid.app.AppEvents
66
import hyperpyramid.app.AppIncomingHttp
77
import hyperpyramid.app.AppOutgoingHttp
8-
import org.http4k.cloudnative.env.Environment
8+
import org.http4k.config.Environment
99
import org.http4k.core.HttpHandler
1010
import org.http4k.core.then
1111
import org.http4k.events.Events
1212
import org.http4k.filter.ClientFilters.SetHostFrom
13-
import org.http4k.routing.Router.Companion.orElse
1413
import org.http4k.routing.bind
14+
import org.http4k.routing.orElse
1515
import org.http4k.routing.routes
1616
import java.time.Clock
1717

api-gateway/src/main/kotlin/hyperpyramid/ApiGatewaySettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package hyperpyramid
22

3-
import org.http4k.cloudnative.env.EnvironmentKey
3+
import org.http4k.config.EnvironmentKey
44
import org.http4k.lens.of
55
import org.http4k.lens.uri
66

api-gateway/src/main/kotlin/hyperpyramid/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package hyperpyramid
22

33
import hyperpyramid.util.Json
44
import org.http4k.client.JavaHttpClient
5-
import org.http4k.cloudnative.env.Environment
5+
import org.http4k.config.Environment
66
import org.http4k.events.AutoMarshallingEvents
77
import org.http4k.server.Undertow
88
import org.http4k.server.asServer

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.9.23"
4+
kotlin("jvm") version "2.1.20"
55
idea
66
`java-test-fixtures`
77
}

e2e/.generated/UniverseTests - views item, orders, receives confirmation - Sequence.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ database "db"
99
participant "image-cache.s3.eu-west-1.amazonaws.com"
1010
participant "dept-store"
1111
participant "email.eu-west-1.amazonaws.com"
12-
participant "event-stream"
12+
queue "event-stream"
1313
"Customer" -> "api-gateway": GET list
1414
activate "api-gateway"
1515
"api-gateway" -> "shop": GET list
@@ -51,7 +51,7 @@ activate "dept-store"
5151
deactivate "dept-store"
5252
"warehouse" -[#DarkGreen]> "shop": <color:DarkGreen> 202 Accepted
5353
deactivate "warehouse"
54-
"shop" -> "email.eu-west-1.amazonaws.com": POST
54+
"shop" -> "email.eu-west-1.amazonaws.com": POST v2/email/outbound-emails
5555
activate "email.eu-west-1.amazonaws.com"
5656

5757
"email.eu-west-1.amazonaws.com" -[#DarkGreen]> "shop": <color:DarkGreen> 200 OK

e2e/src/test/kotlin/hyperpyramid/env/LocalUniverseTestEnv.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import hyperpyramid.WarehouseSettings.STORE_API_PASSWORD
99
import hyperpyramid.WarehouseSettings.STORE_API_USER
1010
import hyperpyramid.WarehouseSettings.STORE_URL
1111
import hyperpyramid.dto.Email
12-
import org.http4k.cloudnative.env.Environment
12+
import org.http4k.config.Environment
1313
import org.http4k.connect.amazon.AWS_ACCESS_KEY_ID
1414
import org.http4k.connect.amazon.AWS_REGION
1515
import org.http4k.connect.amazon.AWS_SECRET_ACCESS_KEY

e2e/src/test/kotlin/hyperpyramid/env/UniverseTestEnv.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import hyperpyramid.WarehouseSettings.STORE_API_PASSWORD
99
import hyperpyramid.WarehouseSettings.STORE_API_USER
1010
import hyperpyramid.WarehouseSettings.STORE_URL
1111
import hyperpyramid.dto.Email
12-
import org.http4k.cloudnative.env.Environment
12+
import org.http4k.config.Environment
1313
import org.http4k.connect.amazon.AWS_ACCESS_KEY_ID
1414
import org.http4k.connect.amazon.AWS_REGION
1515
import org.http4k.connect.amazon.AWS_SECRET_ACCESS_KEY

e2e/src/testFixtures/kotlin/hyperpyramid/EcommerceSystem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import hyperpyramid.ApiGatewaySettings.SHOP_URL
66
import hyperpyramid.ShopApiSettings.WAREHOUSE_URL
77
import hyperpyramid.adapter.InMemoryInventory
88
import hyperpyramid.http.NetworkAccess
9-
import org.http4k.cloudnative.env.Environment
9+
import org.http4k.config.Environment
1010
import org.http4k.core.HttpHandler
1111
import org.http4k.core.Request
1212
import org.http4k.events.Events
13-
import org.http4k.routing.Router.Companion.orElse
1413
import org.http4k.routing.bind
14+
import org.http4k.routing.orElse
1515
import org.http4k.routing.reverseProxyRouting
1616
import org.http4k.routing.routes
1717
import java.time.Clock

e2e/src/testFixtures/kotlin/hyperpyramid/actors/HttpWebsiteCustomer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class HttpWebsiteCustomer(
2727
override fun hasEmailFor(orderId: OrderId, email: String): Boolean {
2828
return sentEmails.keySet()
2929
.flatMap { sentEmails[it] ?: emptyList() }
30-
.filter { it.to.contains(EmailAddress.of(email)) }
31-
.any { it.message.html?.value == "Please collect your order using the code: $orderId" }
30+
.filter { it.destination.toAddresses!!.contains(EmailAddress.of(email)) }
31+
.any { it.message?.body?.text?.data == "Please collect your order using the code: $orderId" }
3232
}
3333
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package hyperpyramid.setup
22

3-
import org.http4k.cloudnative.env.Environment
3+
import org.http4k.config.Environment
44

55
typealias CloudInfraSetup = (Environment) -> Environment

0 commit comments

Comments
 (0)