From: Vsevolod Stakhov Date: Mon, 17 Nov 2025 15:31:52 +0000 (+0000) Subject: [Minor] Migrate lua_maps_expressions.lua from tableshape to lua_shape X-Git-Tag: 3.14.1~11^2~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfbb9fc29491b1c3be7863c84f75607c267c5a66;p=thirdparty%2Frspamd.git [Minor] Migrate lua_maps_expressions.lua from tableshape to lua_shape Replace tableshape with lua_shape for maps expressions schema: - Convert ts.shape to T.table - Convert ts.array_of to T.array - Keep reference to lua_maps.map_schema (will be migrated separately) No functional changes, luacheck passes. --- diff --git a/lualib/lua_maps_expressions.lua b/lualib/lua_maps_expressions.lua index 2ad9ad1d86..4b2935a25c 100644 --- a/lualib/lua_maps_expressions.lua +++ b/lualib/lua_maps_expressions.lua @@ -39,7 +39,7 @@ local lua_maps = require "lua_maps" local rspamd_expression = require "rspamd_expression" local rspamd_logger = require "rspamd_logger" local fun = require "fun" -local ts = require("tableshape").types +local T = require "lua_shape.core" local exports = {} @@ -86,15 +86,17 @@ local function process_func(elt, task) return nil end -exports.schema = ts.shape { - expression = ts.string, - rules = ts.array_of( - ts.shape { - selector = ts.string, - map = lua_maps.map_schema, - } +-- Schema for maps expressions configuration +-- Note: map field references lua_maps.map_schema which will be migrated separately +exports.schema = T.table({ + expression = T.string(), + rules = T.array( + T.table({ + selector = T.string(), + map = lua_maps.map_schema, -- References schema from lua_maps (to be migrated) + }) ) -} +}) --[[[ -- @function lua_maps_expression.create(config, object, module_name)