Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 14:45:15 +0200] rev 13221
util.prosodyctl.check: Validate format of module list options
Should detect things like misplaced settings inside modules_enabled
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 14:03:13 +0200] rev 13220
util.prosodyctl.check: Get some config options via minimal moduleapi #896
The module API has certain coercion features that are useful.
Fixes traceback reported in #1812 and other duplicates
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 02:32:47 +0200] rev 13219
core.moduleapi: Fix min/maxinteger fallback for Lua 5.2
Maybe these should live in util.mathcompat?
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 02:26:16 +0200] rev 13218
mod_http: Fix passing minimum limits in wrong argument position
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 01:38:54 +0200] rev 13217
plugins: Use integer config API with interval specification where sensible
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 00:37:44 +0200] rev 13216
core.moduleapi: Add min/max range support to :get_option_period
To match :get_option_number etc, specifying the allowed interval.
Default is essentially (0, inf].
Kim Alvefur <zash@zash.se> [Mon, 17 Jul 2023 00:09:41 +0200] rev 13215
moduleapi: Add :get_option_integer()
Many options in Prosody that are treated as numbers don't make sense as
floats, e.g. sizes and limits measured in bytes.
Simplified implementation based on an earlier attempt dating back to 2020
Kim Alvefur <zash@zash.se> [Sun, 16 Jul 2023 21:21:37 +0200] rev 13214
util.human.io: Fix stray 'stty' error by only querying width of real ttys
This adds a dependency on a binary and *nix-specific module but then
stty is probably *nix-specific anyway so maybe that's fine.
Kim Alvefur <zash@zash.se> [Sun, 16 Jul 2023 20:49:33 +0200] rev 13213
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
Kim Alvefur <zash@zash.se> [Sun, 16 Jul 2023 21:04:42 +0200] rev 13212
core.moduleapi: Accept boolean false to disable period setting