Annotate

squishy @ 492:22844ac3be4e

server: Import one of Prosodys net.server implementations Wraps up this behavior in a new module.
author Kim Alvefur <zash@zash.se>
date Wed, 21 Jun 2023 12:21:09 +0200
parent 491:edf078a58f25
child 493:08e5c8637fea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
6c5fab6c11cf Rename verse2 -> verse
Matthew Wild <mwild1@gmail.com>
parents: 24
diff changeset
1 Output "verse.lua"
0
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
3 local VerseModule = Module
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
4 local function ProsodyModule(s)
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
5 return VerseModule("prosody."..s)
158
068176069dfa squishy: Add --prosody option to specify a path to a Prosody checkout to use when squishing
Matthew Wild <mwild1@gmail.com>
parents: 157
diff changeset
6 end
0
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
8 function ProsodyModules()
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
9 local Module = ProsodyModule;
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
10 -- Verse-specific versions of libraries
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
11 Module "util.encodings" "libs/encodings.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
12 Module "util.hashes" "libs/hashes.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
13 Module "lib.adhoc" "libs/adhoc.lib.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
14 Module "util.table" "libs/table.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
15
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
16 -- Prosody libraries
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
17 if not GetOption("prosody") then
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
18 AutoFetchURL "http://hg.prosody.im/0.10/raw-file/tip/?"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
19 else
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
20 AutoFetchURL(GetOption("prosody").."/?")
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
21 end
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
22
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
23 Module "util.sha1" "util/sha1.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
24 Module "util.bit" "libs/bit.lua"
486
6416ea3fff86 Fix sha1 support when no binary dependencies available
Matthew Wild <mwild1@gmail.com>
parents: 482
diff changeset
25
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
26 Module "util.stanza" "util/stanza.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
27 Module "util.timer" "util/timer.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
28 Module "util.termcolours" "util/termcolours.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
29 Module "util.uuid" "util/uuid.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
30 Module "util.time" "libs/time.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
31 Module "util.envload" "util/envload.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
32 Module "util.id" "util/id.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
33 Module "util.serialization" "util/serialization.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
34 Module "util.indexedbheap" "util/indexedbheap.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
35 Module "util.xpcall" "util/xpcall.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
36 Module "util.array" "util/array.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
37 Module "util.format" "util/format.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
38 Module "util.promise" "util/promise.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
39 Module "net.adns" "net/unbound.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
40 Module "util.dns" "util/dns.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
41 Module "net.server_select" "net/server_select.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
42 Module "util.xmppstream" "util/xmppstream.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
43 Module "util.jid" "util/jid.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
44 Module "util.events" "util/events.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
45 Module "util.dataforms" "util/dataforms.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
46 Module "util.caps" "util/caps.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
47 Module "util.vcard" "util/vcard.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
48 Module "util.logger" "util/logger.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
49 Module "util.datetime" "util/datetime.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
50 Module "util.json" "util/json.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
51 Module "util.xml" "util/xml.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
52 Module "util.rsm" "util/rsm.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
53 Module "util.random" "util/random.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
54 Module "util.ip" "util/ip.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
55 Module "util.hex" "util/hex.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
56 Module "util.net" "libs/net.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
57 Module "util.sslconfig" "util/sslconfig.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
58 Module "util.paths" "util/paths.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
59 Module "util.mathcompat" "util/mathcompat.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
60 Module "util.dnsregistry" "util/dnsregistry.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
61 Module "net.tls_luasec" "net/tls_luasec.lua"
116
151c8cc776df verse.plugins.adhoc: XEP-0050 Ad-hoc commands plugin
Matthew Wild <mwild1@gmail.com>
parents: 114
diff changeset
62
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
63 Module "util.http" "util/http.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
64 Module "net.http.parser" "net/http/parser.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
65 Module "net.http" "net/http.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
66 Module "util.x509" "util/x509.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
67
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
68 if GetOption "internal-bit-module" then
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
69 Module "bit" "libs/bit.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
70 end
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
71 end
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
72
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
73 ProsodyModules()
357
ed12e00991b1 squishy: Add sasl mechs
Kim Alvefur <zash@zash.se>
parents: 304
diff changeset
74
14
53246b2b933b squish: Add plugins
Matthew Wild <mwild1@gmail.com>
parents: 7
diff changeset
75 -- Verse plugins
233
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
76 plugins = {
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
77 -- Login
482
4c4f3dd62c54 squishy: Comment legacy protocol plugins by default
Matthew Wild <mwild1@gmail.com>
parents: 481
diff changeset
78 "tls", "sasl", "bind", -- "session", "legacy", "compression";
233
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
79 -- Reliability
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
80 "smacks", "keepalive";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
81 -- Queries
480
a48a4723aa2a Add time query plugin
Matthew Wild <mwild1@gmail.com>
parents: 479
diff changeset
82 "disco", "version", "ping", "uptime", "time";
233
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
83 -- Privacy control
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
84 "blocking";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
85 -- Jingle / file transfer
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
86 "jingle", "jingle_ft", "jingle_s5b", "proxy65", "jingle_ibb";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
87 -- Pubsub
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
88 "pubsub", "pep";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
89 -- Command and control
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
90 "adhoc";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
91 -- Basics
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
92 "presence", "private", "roster", "register";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
93 -- MUC
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
94 "groupchat";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
95 -- vCard
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
96 "vcard", "vcard_update";
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
97 -- Carbons
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
98 "carbons";
273
c5b7a4c717a6 plugins.archive: Experimental implementation of the Message Archive Management ProtoXEP
Kim Alvefur <zash@zash.se>
parents: 238
diff changeset
99
c5b7a4c717a6 plugins.archive: Experimental implementation of the Message Archive Management ProtoXEP
Kim Alvefur <zash@zash.se>
parents: 238
diff changeset
100 "archive";
481
6fc84e9bd03e squishy: Add browsing plugin
Matthew Wild <mwild1@gmail.com>
parents: 480
diff changeset
101 "browsing";
233
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
102 }
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
103
b5fd3292bdbd squishy: Rewrite in an attempt to curb the unbounded growth of the plugin list
Matthew Wild <mwild1@gmail.com>
parents: 227
diff changeset
104 for _, plugin in ipairs(plugins) do
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
105 VerseModule("verse.plugins."..plugin)("plugins/"..plugin..".lua")
134
2101acbb27c4 squishy: Use --internal-bit-module to squish with the pure-Lua bit library
Matthew Wild <mwild1@gmail.com>
parents: 131
diff changeset
106 end
2101acbb27c4 squishy: Use --internal-bit-module to squish with the pure-Lua bit library
Matthew Wild <mwild1@gmail.com>
parents: 131
diff changeset
107
492
22844ac3be4e server: Import one of Prosodys net.server implementations
Kim Alvefur <zash@zash.se>
parents: 491
diff changeset
108 VerseModule "verse.server" "server.lua"
22844ac3be4e server: Import one of Prosodys net.server implementations
Kim Alvefur <zash@zash.se>
parents: 491
diff changeset
109
491
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
110 -- SASL client mechanisms
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
111 VerseModule "verse.util.sasl.scram" "util/sasl/scram.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
112 VerseModule "verse.util.sasl.plain" "util/sasl/plain.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
113 VerseModule "verse.util.sasl.anonymous" "util/sasl/anonymous.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
114 VerseModule "verse.util.sasl.oauthbearer" "util/sasl/oauthbearer.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
115
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
116 VerseModule "verse.client" "client.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
117 VerseModule "verse.component" "component.lua"
edf078a58f25 squishy: Update for prosody.* namespace
Matthew Wild <mwild1@gmail.com>
parents: 490
diff changeset
118 VerseModule "verse.bosh" "bosh.lua"
0
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
119
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
120 -- Main verse file
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
121 Main "init.lua"