Software /
code /
verse
Comparison
squishy @ 493:08e5c8637fea
squishy: Normalise Lua syntax
lua-format applied
Makes semi-automated merging with e.g. rockspec files easier.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 21 Jun 2023 15:22:17 +0200 |
parent | 492:22844ac3be4e |
child | 495:1ca531495c3d |
comparison
equal
deleted
inserted
replaced
492:22844ac3be4e | 493:08e5c8637fea |
---|---|
1 Output "verse.lua" | 1 Output "verse.lua" |
2 | 2 |
3 local VerseModule = Module | 3 local VerseModule = Module |
4 local function ProsodyModule(s) | 4 local function ProsodyModule(s) |
5 return VerseModule("prosody."..s) | 5 return VerseModule("prosody." .. s) |
6 end | 6 end |
7 | 7 |
8 function ProsodyModules() | 8 function ProsodyModules() |
9 local Module = ProsodyModule; | 9 local Module = ProsodyModule; |
10 -- Verse-specific versions of libraries | 10 -- Verse-specific versions of libraries |
11 Module "util.encodings" "libs/encodings.lua" | 11 Module "util.encodings" "libs/encodings.lua" |
12 Module "util.hashes" "libs/hashes.lua" | 12 Module "util.hashes" "libs/hashes.lua" |
13 Module "lib.adhoc" "libs/adhoc.lib.lua" | 13 Module "lib.adhoc" "libs/adhoc.lib.lua" |
14 Module "util.table" "libs/table.lua" | 14 Module "util.table" "libs/table.lua" |
15 | 15 |
16 -- Prosody libraries | 16 -- Prosody libraries |
17 if not GetOption("prosody") then | 17 if not GetOption("prosody") then |
18 AutoFetchURL "http://hg.prosody.im/0.10/raw-file/tip/?" | 18 AutoFetchURL "http://hg.prosody.im/0.10/raw-file/tip/?" |
19 else | 19 else |
20 AutoFetchURL(GetOption("prosody").."/?") | 20 AutoFetchURL(GetOption("prosody") .. "/?") |
21 end | 21 end |
22 | 22 |
23 Module "util.sha1" "util/sha1.lua" | 23 Module "util.sha1" "util/sha1.lua" |
24 Module "util.bit" "libs/bit.lua" | 24 Module "util.bit" "libs/bit.lua" |
25 | 25 |
26 Module "util.stanza" "util/stanza.lua" | 26 Module "util.stanza" "util/stanza.lua" |
27 Module "util.timer" "util/timer.lua" | 27 Module "util.timer" "util/timer.lua" |
28 Module "util.termcolours" "util/termcolours.lua" | 28 Module "util.termcolours" "util/termcolours.lua" |
29 Module "util.uuid" "util/uuid.lua" | 29 Module "util.uuid" "util/uuid.lua" |
30 Module "util.time" "libs/time.lua" | 30 Module "util.time" "libs/time.lua" |
31 Module "util.envload" "util/envload.lua" | 31 Module "util.envload" "util/envload.lua" |
32 Module "util.id" "util/id.lua" | 32 Module "util.id" "util/id.lua" |
33 Module "util.serialization" "util/serialization.lua" | 33 Module "util.serialization" "util/serialization.lua" |
34 Module "util.indexedbheap" "util/indexedbheap.lua" | 34 Module "util.indexedbheap" "util/indexedbheap.lua" |
35 Module "util.xpcall" "util/xpcall.lua" | 35 Module "util.xpcall" "util/xpcall.lua" |
36 Module "util.array" "util/array.lua" | 36 Module "util.array" "util/array.lua" |
37 Module "util.format" "util/format.lua" | 37 Module "util.format" "util/format.lua" |
38 Module "util.promise" "util/promise.lua" | 38 Module "util.promise" "util/promise.lua" |
39 Module "net.adns" "net/unbound.lua" | 39 Module "net.adns" "net/unbound.lua" |
40 Module "util.dns" "util/dns.lua" | 40 Module "util.dns" "util/dns.lua" |
41 Module "net.server_select" "net/server_select.lua" | 41 Module "net.server_select" "net/server_select.lua" |
42 Module "util.xmppstream" "util/xmppstream.lua" | 42 Module "util.xmppstream" "util/xmppstream.lua" |
43 Module "util.jid" "util/jid.lua" | 43 Module "util.jid" "util/jid.lua" |
44 Module "util.events" "util/events.lua" | 44 Module "util.events" "util/events.lua" |
45 Module "util.dataforms" "util/dataforms.lua" | 45 Module "util.dataforms" "util/dataforms.lua" |
46 Module "util.caps" "util/caps.lua" | 46 Module "util.caps" "util/caps.lua" |
47 Module "util.vcard" "util/vcard.lua" | 47 Module "util.vcard" "util/vcard.lua" |
48 Module "util.logger" "util/logger.lua" | 48 Module "util.logger" "util/logger.lua" |
49 Module "util.datetime" "util/datetime.lua" | 49 Module "util.datetime" "util/datetime.lua" |
50 Module "util.json" "util/json.lua" | 50 Module "util.json" "util/json.lua" |
51 Module "util.xml" "util/xml.lua" | 51 Module "util.xml" "util/xml.lua" |
52 Module "util.rsm" "util/rsm.lua" | 52 Module "util.rsm" "util/rsm.lua" |
53 Module "util.random" "util/random.lua" | 53 Module "util.random" "util/random.lua" |
54 Module "util.ip" "util/ip.lua" | 54 Module "util.ip" "util/ip.lua" |
55 Module "util.hex" "util/hex.lua" | 55 Module "util.hex" "util/hex.lua" |
56 Module "util.net" "libs/net.lua" | 56 Module "util.net" "libs/net.lua" |
57 Module "util.sslconfig" "util/sslconfig.lua" | 57 Module "util.sslconfig" "util/sslconfig.lua" |
58 Module "util.paths" "util/paths.lua" | 58 Module "util.paths" "util/paths.lua" |
59 Module "util.mathcompat" "util/mathcompat.lua" | 59 Module "util.mathcompat" "util/mathcompat.lua" |
60 Module "util.dnsregistry" "util/dnsregistry.lua" | 60 Module "util.dnsregistry" "util/dnsregistry.lua" |
61 Module "net.tls_luasec" "net/tls_luasec.lua" | 61 Module "net.tls_luasec" "net/tls_luasec.lua" |
62 | 62 |
63 Module "util.http" "util/http.lua" | 63 Module "util.http" "util/http.lua" |
64 Module "net.http.parser" "net/http/parser.lua" | 64 Module "net.http.parser" "net/http/parser.lua" |
65 Module "net.http" "net/http.lua" | 65 Module "net.http" "net/http.lua" |
66 Module "util.x509" "util/x509.lua" | 66 Module "util.x509" "util/x509.lua" |
73 ProsodyModules() | 73 ProsodyModules() |
74 | 74 |
75 -- Verse plugins | 75 -- Verse plugins |
76 plugins = { | 76 plugins = { |
77 -- Login | 77 -- Login |
78 "tls", "sasl", "bind", -- "session", "legacy", "compression"; | 78 "tls"; |
79 "sasl"; | |
80 "bind"; -- "session", "legacy", "compression"; | |
79 -- Reliability | 81 -- Reliability |
80 "smacks", "keepalive"; | 82 "smacks"; |
83 "keepalive"; | |
81 -- Queries | 84 -- Queries |
82 "disco", "version", "ping", "uptime", "time"; | 85 "disco"; |
86 "version"; | |
87 "ping"; | |
88 "uptime"; | |
89 "time"; | |
83 -- Privacy control | 90 -- Privacy control |
84 "blocking"; | 91 "blocking"; |
85 -- Jingle / file transfer | 92 -- Jingle / file transfer |
86 "jingle", "jingle_ft", "jingle_s5b", "proxy65", "jingle_ibb"; | 93 "jingle"; |
94 "jingle_ft"; | |
95 "jingle_s5b"; | |
96 "proxy65"; | |
97 "jingle_ibb"; | |
87 -- Pubsub | 98 -- Pubsub |
88 "pubsub", "pep"; | 99 "pubsub"; |
100 "pep"; | |
89 -- Command and control | 101 -- Command and control |
90 "adhoc"; | 102 "adhoc"; |
91 -- Basics | 103 -- Basics |
92 "presence", "private", "roster", "register"; | 104 "presence"; |
105 "private"; | |
106 "roster"; | |
107 "register"; | |
93 -- MUC | 108 -- MUC |
94 "groupchat"; | 109 "groupchat"; |
95 -- vCard | 110 -- vCard |
96 "vcard", "vcard_update"; | 111 "vcard"; |
112 "vcard_update"; | |
97 -- Carbons | 113 -- Carbons |
98 "carbons"; | 114 "carbons"; |
99 | 115 |
100 "archive"; | 116 "archive"; |
101 "browsing"; | 117 "browsing"; |
102 } | 118 } |
103 | 119 |
104 for _, plugin in ipairs(plugins) do | 120 for _, plugin in ipairs(plugins) do |
105 VerseModule("verse.plugins."..plugin)("plugins/"..plugin..".lua") | 121 VerseModule("verse.plugins." .. plugin)("plugins/" .. plugin .. ".lua") |
106 end | 122 end |
107 | 123 |
108 VerseModule "verse.server" "server.lua" | 124 VerseModule "verse.server" "server.lua" |
109 | 125 |
110 -- SASL client mechanisms | 126 -- SASL client mechanisms |
111 VerseModule "verse.util.sasl.scram" "util/sasl/scram.lua" | 127 VerseModule "verse.util.sasl.scram" "util/sasl/scram.lua" |
112 VerseModule "verse.util.sasl.plain" "util/sasl/plain.lua" | 128 VerseModule "verse.util.sasl.plain" "util/sasl/plain.lua" |
113 VerseModule "verse.util.sasl.anonymous" "util/sasl/anonymous.lua" | 129 VerseModule "verse.util.sasl.anonymous" "util/sasl/anonymous.lua" |
114 VerseModule "verse.util.sasl.oauthbearer" "util/sasl/oauthbearer.lua" | 130 VerseModule "verse.util.sasl.oauthbearer" "util/sasl/oauthbearer.lua" |
115 | 131 |
116 VerseModule "verse.client" "client.lua" | 132 VerseModule "verse.client" "client.lua" |
117 VerseModule "verse.component" "component.lua" | 133 VerseModule "verse.component" "component.lua" |
118 VerseModule "verse.bosh" "bosh.lua" | 134 VerseModule "verse.bosh" "bosh.lua" |
119 | 135 |
120 -- Main verse file | 136 -- Main verse file |
121 Main "init.lua" | 137 Main "init.lua" |