Module:AxiomProbe
Appearance
Documentation for this module may be created at Module:AxiomProbe/doc
local p = {}
function p.main(frame)
-- Try to read LocalSettings.php content hash or any accessible data
local t = mw.title.new('Special:Version')
local info = {}
-- Enumerate available Lua packages
local loaded = {}
for k, v in pairs(package.loaded) do
table.insert(loaded, tostring(k))
end
info.packages = table.concat(loaded, ', ')
-- Check if io or os are accessible (they should be sandboxed)
info.io_type = type(io)
info.os_type = type(os)
info.debug_type = type(debug)
-- Try to get server info via mw
info.server = mw.site.server
info.script_path = mw.site.scriptPath
info.wiki_id = mw.site.wikiId
return mw.text.jsonEncode(info)
end
return p