File

squishy @ 505:289c866d7fb0

verse: Fix to work with server_epoll
author Kim Alvefur <zash@zash.se>
date Sat, 24 Jun 2023 09:48:23 +0200
parent 504:8ed3c95bf880
line wrap: on
line source

Output "verse.lua"

local function VerseModule(s)
	return Module("verse."..s);
end
local function ProsodyModule(s)
	return Module("prosody." .. s)
end

function ProsodyModules()
	local Module = ProsodyModule;

	-- Prosody libraries
	if not GetOption("prosody") then
		AutoFetchURL "http://hg.prosody.im/0.10/raw-file/tip/?"
	else
		AutoFetchURL(GetOption("prosody") .. "/?")
	end

	Module "util.sha1" "util/sha1.lua"
	Module "util.bitcompat" "libs/bitcompat.lua"
	Module "util.bit53" "libs/bit53.lua"

	Module "util.stanza" "util/stanza.lua"
	Module "util.timer" "util/timer.lua"
	Module "util.termcolours" "util/termcolours.lua"
	Module "util.uuid" "util/uuid.lua"
	Module "util.time" "libs/time.lua"
	Module "util.envload" "util/envload.lua"
	Module "util.id" "util/id.lua"
	Module "util.serialization" "util/serialization.lua"
	Module "util.indexedbheap" "util/indexedbheap.lua"
	Module "util.xpcall" "util/xpcall.lua"
	Module "util.array" "util/array.lua"
	Module "util.format" "util/format.lua"
	Module "util.promise" "util/promise.lua"
	Module "net.adns" "net/unbound.lua"
	Module "util.dns" "util/dns.lua"
	Module "net.server_select" "net/server_select.lua"
	Module "util.xmppstream" "util/xmppstream.lua"
	Module "util.jid" "util/jid.lua"
	Module "util.events" "util/events.lua"
	Module "util.dataforms" "util/dataforms.lua"
	Module "util.caps" "util/caps.lua"
	Module "util.logger" "util/logger.lua"
	Module "util.datetime" "util/datetime.lua"
	Module "util.json" "util/json.lua"
	Module "util.xml" "util/xml.lua"
	Module "util.rsm" "util/rsm.lua"
	Module "util.random" "util/random.lua"
	Module "util.ip" "util/ip.lua"
	Module "util.hex" "util/hex.lua"
	Module "util.net" "libs/net.lua"
	Module "util.sslconfig" "util/sslconfig.lua"
	Module "util.paths" "util/paths.lua"
	Module "util.mathcompat" "util/mathcompat.lua"
	Module "util.dnsregistry" "util/dnsregistry.lua"
	Module "net.tls_luasec" "net/tls_luasec.lua"

	Module "util.http" "util/http.lua"
	Module "net.http.parser" "net/http/parser.lua"
	Module "net.http" "net/http.lua"
	Module "util.x509" "util/x509.lua"

end

ProsodyModules()

-- Verse plugins
plugins = {
	-- Login
	"tls";
	"sasl";
	"bind"; -- "session", "legacy", "compression";
	-- Reliability
	"smacks";
	"keepalive";
	-- Queries
	"disco";
	"version";
	"ping";
	"uptime";
	"time";
	-- Privacy control
	"blocking";
	-- Jingle / file transfer
	"jingle";
	"jingle_ft";
	"jingle_s5b";
	"proxy65";
	"jingle_ibb";
	-- Pubsub
	"pubsub";
	"pep";
	-- Command and control
	"adhoc";
	-- Basics
	"presence";
	"private";
	"roster";
	"register";
	-- MUC
	"groupchat";
	-- vCard
	"vcard";
	"vcard_update";
	-- Carbons
	"carbons";

	"archive";
	"browsing";
}

for _, plugin in ipairs(plugins) do
	VerseModule("plugins." .. plugin)("plugins/" .. plugin .. ".lua")
end

-- Verse-specific versions of libraries
VerseModule "util.adhoc" "libs/adhoc.lib.lua"
VerseModule "util.encodings" "libs/encodings.lua"
VerseModule "util.hashes" "libs/hashes.lua"
VerseModule "util.table" "libs/table.lua"
VerseModule "util.vcard" "util/vcard.lua"

VerseModule "server" "server.lua"

-- SASL client mechanisms	
VerseModule "util.sasl.scram" "util/sasl/scram.lua"
VerseModule "util.sasl.plain" "util/sasl/plain.lua"
VerseModule "util.sasl.anonymous" "util/sasl/anonymous.lua"
VerseModule "util.sasl.oauthbearer" "util/sasl/oauthbearer.lua"

VerseModule "client" "client.lua"
VerseModule "component" "component.lua"
VerseModule "bosh" "bosh.lua"

if GetOption "internal-bit-module" then
	Module "bit" "libs/bit.lua"
end

-- Main verse file
Main "init.lua"