Matthew Wild
6767e771ff
modulemanager, util.pluginloader: Improve error message when load fails but some candidates were filtered
9 months ago
Matthew Wild
90fea186dd
modulemanager: Remove autoloading of per-platform module
...
We only support posix these days, and we moved it to the core startup process
to make it more deterministic and reliable.
11 months ago
Matthew Wild
bde66f9436
modulemanager: Allow modules to specify supported Lua versions in metadata
12 months ago
Matthew Wild
f6ed03a903
modulemanager: Handle multiple digits in Lua version number
...
Lua has a slow release cycle, but it would be nice if Prosody doesn't break
unnecessarily with 5.10 :)
12 months ago
Kim Alvefur
a696800291
core.modulemanager: Fix global flag on per-host instances of shared modules ( fix #1736 )
...
This flag is something of a shortcut for `module.host == "*"` and should
always be equal to that. Its absence on the proxy object made the
property of the global module instance visible, causing problems such as
with URL reporting in mod_http
4 years ago
Matthew Wild
8a38b5d0da
modulemanager: Allow modules to expose module.ready - to be called after init
...
This is a shortcut for module:on_ready() which exposes the functionality in an
idiomatic way consistent with module.load, module.unload, etc.
module.ready runs when the module is loaded and the server has finished
starting up.
2 years ago
Kim Alvefur
d47a7bb3bd
core: Prefix module imports with prosody namespace
3 years ago
Kim Alvefur
8648dd2191
core.modulemanager: Save module metadata for potential later use
...
Makes it reachable from the shell if nothing else
4 years ago
Matthew Wild
b917045785
modulemanager: Shorten metadata keys to improve readability and memorability
4 years ago
Matthew Wild
61d33dd364
modulemanager: Add plugin load filter that reads module metadata from source
...
Metadata in modules is added using lines formatted as:
--% key: value
Where key is a valid identifier string, and value is also a string (leading
and trailing whitespace are trimmed during parsing).
The initial supported keys are:
--% requires_core_features: feature1, feature2, ...
--% conflicts_core_features: feature1, feature2. ...
These 'features' map to features reported by the new core.features module.
A benefit of this load-time metadata approach compared to e.g. something like
module:requires()/module:conflicts() is that we can continue to look in module
search paths for a suitable module. Aborting an already-loaded module due to
a version conflict would be too late.
4 years ago
Matthew Wild
4bdff5a452
modulemanager, moduleapi: Switch to new pluginloader interface
4 years ago
Kim Alvefur
0736ecc63d
core.modulemanager: Remove compat for mod_console rename in 0.8
...
Should no longer be needed, especially since mod_admin_telnet morphed
into mod_admin_shell and mod_admin_socket
4 years ago
Kim Alvefur
e813cdf91b
core.modulemanager: Load mod_smacks on Components
...
Since it applies to s2s on Components as well as on VirtualHosts.
4 years ago
Kim Alvefur
4395895fef
core.modulemanager: Inherit mod_server_contact_info onto components #1270
5 years ago
Kim Alvefur
8f64eafaf7
core.modulemanager: Fix resource location compat with LuaRocks 2.x
...
The path doesn't include lua version, at least least on Debian, which
still has luarocks 2.x
5 years ago
Kim Alvefur
bb3948c857
core.modulemanager: Fix error if installer path missing
...
Happens if run outside prosody. Noticed because because the storage
tests fail.
5 years ago
Kim Alvefur
387a03e1d3
core.modulemanager: Add compat for LuaRocks 2.x
5 years ago
Kim Alvefur
915cebae96
core.modulemanager: Locate resources of LuaRocks-installed modules
...
Extra non-code files included with a `copy_directories` directive in a
LuaRocks manifest will be copied into a per-module and per-version
directory under /lib/luarocks/ and all this is there to dig that out so
it can be used in e.g. moduleapi :load_resource().
5 years ago
Kim Alvefur
3f89e9373b
core.modulemanager: Silence warning about unused err variable [luacheck]
6 years ago
Kim Alvefur
7ac5e467ba
core.modulemanager: Disable mod_vcard if mod_vcard_legacy is enabled to prevent conflict ( #1469 )
6 years ago
Kim Alvefur
2ad505a81f
core.modulemanager: Split lists across multiple lines for improved readability
...
Patches will also be easier to read.
6 years ago
Kim Alvefur
ef38f2d062
mod_s2s_bidi: Enables bi-directional streams via XEP-0288
6 years ago
Matthew Wild
d833e2c6d4
modulemanager: Fix issues introduced in previous commit acf74ad0b795 [thanks luacheck, scansion]
7 years ago
Matthew Wild
f5f6460b2e
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
7 years ago
Matthew Wild
06a10d3a77
modulemanager: Expose function to get the list of modules that should be loaded on a host
8 years ago
Kim Alvefur
77fbea8cdc
core: Use prosody.hosts instead of _G.hosts for consistency
8 years ago
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
8 years ago
Kim Alvefur
1ecc3a7918
core: Split some very long lines [luacheck]
9 years ago
Kim Alvefur
487f77d6ef
modulemanager: Silence log message about attempts to load already loaded modules for shared modules
10 years ago
Kim Alvefur
e349fb9c87
loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck]
10 years ago
Kim Alvefur
bad300a675
loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
10 years ago
Matthew Wild
428f9dc002
modulemanager: Add luacheck annotations
11 years ago
Matthew Wild
2553822831
modulemanager: Remove unused import of pcall #luacheck
11 years ago
Kim Alvefur
27265c20e2
core.*: Remove use of module() function
11 years ago
Kim Alvefur
b58d3248b7
core.module{manager,api}: Fix for 010b141e91ed (Thanks v1ct0r)
11 years ago
Kim Alvefur
93a297bc8f
core.modulemanager, core.moduleapi: Hack around dependency loop
11 years ago
Kim Alvefur
3dc45c1222
modulemanager: Reduce warning to debug level message about modules already being loaded, it's probably just module:depends()
12 years ago
Kim Alvefur
bd17040999
mod_s2s_auth_certs: Split PKIX based certificate checking from mod_s2s into new plugin
12 years ago
Kim Alvefur
461da4b3b6
modulemanager: Load mod_saslauth on components by default
12 years ago
Kim Alvefur
f73e31b9c2
modulemanager: Always load a platform-specific module, add stub modules for Windows and unknown platforms
12 years ago
Florian Zeitz
1d833bb807
Remove all trailing whitespace
13 years ago
Marco Cirillo
4453095de2
modulemanager: add missing ipairs import.
13 years ago
Marco Cirillo
a299b9096d
modulemanager: add function to retrieve module items from a specific host entity.
13 years ago
Kim Alvefur
1acfdf5914
core.*: Complete removal of all traces of the "core" section and section-related code.
13 years ago
Matthew Wild
565ea2bbe1
modulemanager: Set module.reloading when a module is reloading, and when loading make the saved state available in module.saved_state (if any)
13 years ago
Waqas Hussain
48a297e80c
hostmanager, modulemanager: Ensure hosts[*].modules always exists.
13 years ago
Matthew Wild
cf15c2a1e0
modulemanager: Set module status on successful or failed module load
7 years ago
Florian Zeitz
d49b9bc2ab
Eliminate direct setfenv usage
14 years ago
Matthew Wild
28e56af503
modulemanager, moduleapi: Turn module.event_handlers into a multitable and track object->event->handler associations correctly (thanks Zash)
14 years ago
Matthew Wild
0fe909f995
moduleapi, modulemanager: Re-structure module.event_handlers so that the same handler can harmlessly handle multiple events (thanks Zash)
14 years ago