bump versions (kafka, ktor, hoplite, simple-syslog, factorio, tstl, typed-factorio, kotka, gradle-node) and update code to compile
This commit is contained in:
parent
c1542dcb42
commit
c9ae17d418
10 changed files with 50 additions and 40 deletions
|
|
@ -11,7 +11,7 @@ kotlin = "1.7.10"
|
||||||
## libs ##
|
## libs ##
|
||||||
camel-kafkaConnectors = "0.11.0"
|
camel-kafkaConnectors = "0.11.0"
|
||||||
http4k = "4.25.16.2"
|
http4k = "4.25.16.2"
|
||||||
kafka = "3.2.0" # https://kafka.apache.org/downloads
|
kafka = "3.2.1" # https://kafka.apache.org/downloads
|
||||||
kvision = "5.13.1"
|
kvision = "5.13.1"
|
||||||
log4j2 = "2.17.2"
|
log4j2 = "2.17.2"
|
||||||
okio = "3.2.0" # https://search.maven.org/artifact/com.squareup.okio/okio
|
okio = "3.2.0" # https://search.maven.org/artifact/com.squareup.okio/okio
|
||||||
|
|
@ -35,13 +35,14 @@ kotlinx-nodejs = "0.0.7"
|
||||||
|
|
||||||
kSvgDsl = "v2.2.0"
|
kSvgDsl = "v2.2.0"
|
||||||
|
|
||||||
ktor = "2.0.3" # https://github.com/ktorio/ktor/releases
|
ktor = "2.1.0" # https://github.com/ktorio/ktor/releases
|
||||||
|
|
||||||
hoplite = "2.3.1" # https://github.com/sksamuel/hoplite/releases
|
hoplite = "2.5.2" # https://github.com/sksamuel/hoplite/releases
|
||||||
|
|
||||||
simpleSyslogParser = "0.0.6" # https://search.maven.org/artifact/com.github.palindromicity/simple-syslog
|
#simpleSyslogParser = "0.0.6" # https://search.maven.org/artifact/com.github.palindromicity/simple-syslog
|
||||||
|
simpleSyslogParser = "cbf7d86559" # https://jitpack.io/#palindromicity/simple-syslog/
|
||||||
|
|
||||||
kotkaStreams = "dev-SNAPSHOT"
|
kotkaStreams = "22.08.06"
|
||||||
|
|
||||||
marykRocksDb = "7.3.1" # https://search.maven.org/artifact/io.maryk.rocksdb/rocksdb-multiplatform
|
marykRocksDb = "7.3.1" # https://search.maven.org/artifact/io.maryk.rocksdb/rocksdb-multiplatform
|
||||||
|
|
||||||
|
|
@ -61,14 +62,14 @@ mockk = "1.12.4"
|
||||||
|
|
||||||
|
|
||||||
## infra ##
|
## infra ##
|
||||||
factorio = "1.1.61"
|
factorio = "1.1.64"
|
||||||
confluent-kafkaConnect = "7.0.1"
|
confluent-kafkaConnect = "7.0.1"
|
||||||
grafana = "8.5.0"
|
grafana = "8.5.0"
|
||||||
prometheus = "v2.34.0"
|
prometheus = "v2.34.0"
|
||||||
|
|
||||||
|
|
||||||
## gradle plugins ##
|
## gradle plugins ##
|
||||||
gradleNodePlugin = "3.3.0" # https://github.com/node-gradle/gradle-node-plugin/releases
|
gradleNodePlugin = "3.4.0" # https://github.com/node-gradle/gradle-node-plugin/releases
|
||||||
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
|
|
@ -213,7 +214,6 @@ kafka-streamsTestUtils = { group = "org.apache.kafka", name = "kafka-streams-tes
|
||||||
# kafka helpers
|
# kafka helpers
|
||||||
#kotka = { group = "com.github.blueanvil", name = "kotka", version = "1.1.1" }
|
#kotka = { group = "com.github.blueanvil", name = "kotka", version = "1.1.1" }
|
||||||
|
|
||||||
#kafka-kotkaStreams = { group = "com.github.adamko-dev.kotka-streams", name = "kotka-streams", version.ref = "kotkaStreams" }
|
|
||||||
kafka-kotkaStreams = { group = "dev.adamko.kotka", name = "kotka-streams", version.ref = "kotkaStreams" }
|
kafka-kotkaStreams = { group = "dev.adamko.kotka", name = "kotka-streams", version.ref = "kotkaStreams" }
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -236,6 +236,7 @@ hoplite-datetime = { group = "com.sksamuel.hoplite", name = "hoplite-datetime",
|
||||||
hoplite-yaml = { group = "com.sksamuel.hoplite", name = "hoplite-yaml", version.ref = "hoplite" }
|
hoplite-yaml = { group = "com.sksamuel.hoplite", name = "hoplite-yaml", version.ref = "hoplite" }
|
||||||
|
|
||||||
|
|
||||||
|
#simpleSyslogParser = { group = "com.github.palindromicity", name = "simple-syslog", version.ref = "simpleSyslogParser" }
|
||||||
simpleSyslogParser = { group = "com.github.palindromicity", name = "simple-syslog", version.ref = "simpleSyslogParser" }
|
simpleSyslogParser = { group = "com.github.palindromicity", name = "simple-syslog", version.ref = "simpleSyslogParser" }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ sealed interface FactorioPrototype {
|
||||||
@Serializable
|
@Serializable
|
||||||
@SerialName("kafkatorio.prototype.EntityItemGroup")
|
@SerialName("kafkatorio.prototype.EntityItemGroup")
|
||||||
data class ItemGroup(
|
data class ItemGroup(
|
||||||
val name: String,
|
val name: String? = null,
|
||||||
val type: String,
|
val type: String? = null,
|
||||||
val parentName: String? = null,
|
val parentName: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1207,6 +1207,16 @@ local function __TS__InstanceOfObject(value)
|
||||||
return valueType == "table" or valueType == "function"
|
return valueType == "table" or valueType == "function"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function __TS__LuaIteratorSpread(self, state, firstKey)
|
||||||
|
local results = {}
|
||||||
|
local key, value = self(state, firstKey)
|
||||||
|
while key do
|
||||||
|
results[#results + 1] = {key, value}
|
||||||
|
key, value = self(state, key)
|
||||||
|
end
|
||||||
|
return __TS__Unpack(results)
|
||||||
|
end
|
||||||
|
|
||||||
local Map
|
local Map
|
||||||
do
|
do
|
||||||
Map = __TS__Class()
|
Map = __TS__Class()
|
||||||
|
|
@ -2448,6 +2458,7 @@ return {
|
||||||
__TS__InstanceOf = __TS__InstanceOf,
|
__TS__InstanceOf = __TS__InstanceOf,
|
||||||
__TS__InstanceOfObject = __TS__InstanceOfObject,
|
__TS__InstanceOfObject = __TS__InstanceOfObject,
|
||||||
__TS__Iterator = __TS__Iterator,
|
__TS__Iterator = __TS__Iterator,
|
||||||
|
__TS__LuaIteratorSpread = __TS__LuaIteratorSpread,
|
||||||
Map = Map,
|
Map = Map,
|
||||||
__TS__MathAtan2 = __TS__MathAtan2,
|
__TS__MathAtan2 = __TS__MathAtan2,
|
||||||
__TS__MathSign = __TS__MathSign,
|
__TS__MathSign = __TS__MathSign,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local ____exports = {}
|
local ____exports = {}
|
||||||
local emit, getMapTilePrototypes, getEntityPrototypes, convertItemGroup, convertItemSubgroup
|
local emit, getMapTilePrototypes, getEntityPrototypes, convertItemGroup
|
||||||
local ____kafkatorio_2Dschema = require("generated.kafkatorio-schema")
|
local ____kafkatorio_2Dschema = require("generated.kafkatorio-schema")
|
||||||
local FactorioPrototype = ____kafkatorio_2Dschema.FactorioPrototype
|
local FactorioPrototype = ____kafkatorio_2Dschema.FactorioPrototype
|
||||||
local KafkatorioPacketData = ____kafkatorio_2Dschema.KafkatorioPacketData
|
local KafkatorioPacketData = ____kafkatorio_2Dschema.KafkatorioPacketData
|
||||||
|
|
@ -30,7 +30,7 @@ end
|
||||||
function getEntityPrototypes()
|
function getEntityPrototypes()
|
||||||
local protos = {}
|
local protos = {}
|
||||||
for ____, entity in pairs(game.entity_prototypes) do
|
for ____, entity in pairs(game.entity_prototypes) do
|
||||||
local key = (((entity.group.name .. "/") .. entity.subgroup.name) .. "/") .. entity.type
|
local key = (((tostring(entity.group.name) .. "/") .. tostring(entity.subgroup.name)) .. "/") .. entity.type
|
||||||
if protos[key] == nil then
|
if protos[key] == nil then
|
||||||
protos[key] = {}
|
protos[key] = {}
|
||||||
end
|
end
|
||||||
|
|
@ -38,7 +38,7 @@ function getEntityPrototypes()
|
||||||
type = FactorioPrototype.Type.Entity,
|
type = FactorioPrototype.Type.Entity,
|
||||||
protoId = Converters.prototypeId(entity.type, entity.name),
|
protoId = Converters.prototypeId(entity.type, entity.name),
|
||||||
group = convertItemGroup(entity.group),
|
group = convertItemGroup(entity.group),
|
||||||
subgroup = convertItemSubgroup(entity.subgroup),
|
subgroup = convertItemGroup(entity.subgroup),
|
||||||
isBuilding = entity.is_building,
|
isBuilding = entity.is_building,
|
||||||
isEntityWithOwner = entity.is_entity_with_owner,
|
isEntityWithOwner = entity.is_entity_with_owner,
|
||||||
isMilitaryTarget = entity.is_military_target,
|
isMilitaryTarget = entity.is_military_target,
|
||||||
|
|
@ -62,16 +62,13 @@ function getEntityPrototypes()
|
||||||
return protos
|
return protos
|
||||||
end
|
end
|
||||||
function convertItemGroup(itemGroup)
|
function convertItemGroup(itemGroup)
|
||||||
return {name = itemGroup.name, type = itemGroup.type, parentName = nil}
|
|
||||||
end
|
|
||||||
function convertItemSubgroup(itemGroup)
|
|
||||||
local ____itemGroup_name_3 = itemGroup.name
|
local ____itemGroup_name_3 = itemGroup.name
|
||||||
local ____itemGroup_type_4 = itemGroup.type
|
local ____itemGroup_type_4 = itemGroup.type
|
||||||
local ____itemGroup_group_name_1 = itemGroup.group
|
local ____itemGroup_group_name_1 = itemGroup.group
|
||||||
if ____itemGroup_group_name_1 ~= nil then
|
if ____itemGroup_group_name_1 ~= nil then
|
||||||
____itemGroup_group_name_1 = ____itemGroup_group_name_1.name
|
____itemGroup_group_name_1 = ____itemGroup_group_name_1.name
|
||||||
end
|
end
|
||||||
return {name = ____itemGroup_name_3, type = ____itemGroup_type_4, parentName = ____itemGroup_group_name_1}
|
return {name = ____itemGroup_name_3, type = ____itemGroup_type_4, parentName = ____itemGroup_group_name_1 or nil}
|
||||||
end
|
end
|
||||||
function ____exports.emitPrototypes()
|
function ____exports.emitPrototypes()
|
||||||
local mapTileProtos = getMapTilePrototypes()
|
local mapTileProtos = getMapTilePrototypes()
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,8 @@ export type MapChunkPosition = [
|
||||||
];
|
];
|
||||||
|
|
||||||
export interface EntityItemGroup {
|
export interface EntityItemGroup {
|
||||||
name: string;
|
name?: string | null;
|
||||||
type: string;
|
type?: string | null;
|
||||||
parentName?: string | null;
|
parentName?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ export namespace Converters {
|
||||||
|
|
||||||
|
|
||||||
import floor = math.floor;
|
import floor = math.floor;
|
||||||
const mapEventIdToName = new LuaTable<defines.Events, DefinedEventName>()
|
const mapEventIdToName = new LuaTable<defines.events, DefinedEventName>()
|
||||||
for (const [eventName, eventId] of pairs(defines.events)) {
|
for (const [eventName, eventId] of pairs(defines.events)) {
|
||||||
mapEventIdToName.set(eventId, eventName)
|
mapEventIdToName.set(eventId, eventName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function eventNameString(event: defines.Events): EventName {
|
export function eventNameString(event: defines.events): EventName {
|
||||||
return mapEventIdToName.get(event) as EventName
|
return mapEventIdToName.get(event) as EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -165,7 +165,7 @@ export namespace Converters {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function collisionBox(collision_box: BoundingBoxRead): MapBoundingBox {
|
export function collisionBox(collision_box: BoundingBox): MapBoundingBox {
|
||||||
return {
|
return {
|
||||||
leftTop: Converters.entityPosition(collision_box.left_top),
|
leftTop: Converters.entityPosition(collision_box.left_top),
|
||||||
rightBottom: Converters.entityPosition(collision_box.right_bottom),
|
rightBottom: Converters.entityPosition(collision_box.right_bottom),
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ function getEntityPrototypes(): PrototypesByType<FactorioPrototype.Entity> {
|
||||||
protoId: Converters.prototypeId(entity.type, entity.name),
|
protoId: Converters.prototypeId(entity.type, entity.name),
|
||||||
|
|
||||||
group: convertItemGroup(entity.group),
|
group: convertItemGroup(entity.group),
|
||||||
subgroup: convertItemSubgroup(entity.subgroup),
|
subgroup: convertItemGroup(entity.subgroup),
|
||||||
|
|
||||||
isBuilding: entity.is_building,
|
isBuilding: entity.is_building,
|
||||||
isEntityWithOwner: entity.is_entity_with_owner,
|
isEntityWithOwner: entity.is_entity_with_owner,
|
||||||
|
|
@ -96,15 +96,6 @@ function convertItemGroup(itemGroup: LuaGroup): EntityItemGroup {
|
||||||
return {
|
return {
|
||||||
name: itemGroup.name,
|
name: itemGroup.name,
|
||||||
type: itemGroup.type,
|
type: itemGroup.type,
|
||||||
parentName: null,
|
parentName: itemGroup.group?.name ?? null,
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function convertItemSubgroup(itemGroup: LuaGroup): EntityItemGroup {
|
|
||||||
return {
|
|
||||||
name: itemGroup.name,
|
|
||||||
type: itemGroup.type,
|
|
||||||
parentName: itemGroup.group?.name,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package dev.adamko.kafkatorio.server.socket
|
package dev.adamko.kafkatorio.server.socket
|
||||||
|
|
||||||
import com.github.palindromicity.syslog.AllowableDeviations
|
import com.github.palindromicity.syslog.AllowableDeviations
|
||||||
|
import com.github.palindromicity.syslog.DefaultKeyProvider
|
||||||
|
import com.github.palindromicity.syslog.Flat5424MessageHandler
|
||||||
|
import com.github.palindromicity.syslog.NilPolicy
|
||||||
import com.github.palindromicity.syslog.SyslogParser
|
import com.github.palindromicity.syslog.SyslogParser
|
||||||
import com.github.palindromicity.syslog.SyslogParserBuilder
|
import com.github.palindromicity.syslog.SyslogParserBuilder
|
||||||
import com.github.palindromicity.syslog.SyslogSpecification
|
import com.github.palindromicity.syslog.SyslogSpecification
|
||||||
|
|
@ -38,10 +41,17 @@ class SyslogSocketServer(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
private val syslogParser: SyslogParser = SyslogParserBuilder()
|
private val syslogParser: SyslogParser<Map<String, String>> =
|
||||||
.withDeviations(EnumSet.of(AllowableDeviations.PRIORITY, AllowableDeviations.VERSION))
|
SyslogParserBuilder<Map<String, String>>()
|
||||||
.forSpecification(SyslogSpecification.RFC_5424)
|
.forSpecification(SyslogSpecification.RFC_5424)
|
||||||
.build()
|
.withSyslogBuilder(
|
||||||
|
Flat5424MessageHandler(
|
||||||
|
DefaultKeyProvider(),
|
||||||
|
NilPolicy.OMIT,
|
||||||
|
EnumSet.of(AllowableDeviations.PRIORITY, AllowableDeviations.VERSION),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
|
||||||
private val _messages: MutableSharedFlow<SyslogMsg> = MutableSharedFlow()
|
private val _messages: MutableSharedFlow<SyslogMsg> = MutableSharedFlow()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Do not edit manually. This file was created with task 'dockerEnvUpdate'
|
# Do not edit manually. This file was created with task 'dockerEnvUpdate'
|
||||||
COMPOSE_PROJECT_NAME=kafkatorio
|
COMPOSE_PROJECT_NAME=kafkatorio
|
||||||
FACTORIO_VERSION=1.1.61
|
FACTORIO_VERSION=1.1.64
|
||||||
KAFKATORIO_VERSION=0.8.0
|
KAFKATORIO_VERSION=0.8.0
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@
|
||||||
COMPOSE_PROJECT_NAME=kafkatorio
|
COMPOSE_PROJECT_NAME=kafkatorio
|
||||||
GRAFANA_VERSION=8.5.0
|
GRAFANA_VERSION=8.5.0
|
||||||
KAFKATORIO_VERSION=0.8.0
|
KAFKATORIO_VERSION=0.8.0
|
||||||
KAFKA_DL_URL=https\://dlcdn.apache.org/kafka/3.2.0/kafka_2.13-3.2.0.tgz
|
KAFKA_DL_URL=https\://dlcdn.apache.org/kafka/3.2.1/kafka_2.13-3.2.1.tgz
|
||||||
KAFKA_VERSION=3.2.0
|
KAFKA_VERSION=3.2.1
|
||||||
PROMETHEUS_VERSION=v2.34.0
|
PROMETHEUS_VERSION=v2.34.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue