teal: Move into prosody namespace

This commit is contained in:
Kim Alvefur 2023-03-23 13:36:52 +01:00
parent 738df041ac
commit f68336b96e
61 changed files with 20 additions and 20 deletions

View file

@ -135,7 +135,7 @@ lint:
@echo $$(sed -n '/^\tlocal exclude_files/,/^}/p;' .luacheckrc | sed '1d;$d' | wc -l) files ignored @echo $$(sed -n '/^\tlocal exclude_files/,/^}/p;' .luacheckrc | sed '1d;$d' | wc -l) files ignored
shellcheck configure shellcheck configure
vpath %.tl teal-src/ vpath %.tl teal-src/prosody
%.lua: %.tl %.lua: %.tl
tl -I teal-src/ --gen-compat off --gen-target 5.1 gen $^ -o $@ tl -I teal-src/ --gen-compat off --gen-target 5.1 gen $^ -o $@
-lua-format -i $@ -lua-format -i $@

View file

@ -1,4 +1,4 @@
local st = require"util.stanza" local st = require "prosody.util.stanza"
global record moduleapi global record moduleapi
get_name : function (moduleapi) : string get_name : function (moduleapi) : string

View file

@ -4,7 +4,7 @@
-- Key-Value stores (the default) -- Key-Value stores (the default)
local stanza = require"util.stanza".stanza_t local stanza = require"prosody.util.stanza".stanza_t
local record keyval_store local record keyval_store
get : function ( keyval_store, string ) : any , string get : function ( keyval_store, string ) : any , string

View file

@ -1,4 +1,4 @@
local Role = require "util.roles".Role; local Role = require "prosody.util.roles".Role;
local record usermanager local record usermanager
record AuthProvider record AuthProvider

View file

@ -1,4 +1,4 @@
local Promise = require "util.promise".Promise; local Promise = require "prosody.util.promise".Promise;
local record sslctx -- from LuaSec local record sslctx -- from LuaSec
end end

View file

@ -1,7 +1,7 @@
module:set_global(); module:set_global();
local async = require "util.async"; local async = require "prosody.util.async";
local datetime = require "util.datetime"; local datetime = require "prosody.util.datetime";
local record map_store<K,V> local record map_store<K,V>
-- TODO move to somewhere sensible -- TODO move to somewhere sensible

View file

@ -1,4 +1,4 @@
local Stanza = require "util.stanza".stanza_t local Stanza = require "prosody.util.stanza".stanza_t
local record Room local record Room
jid : string jid : string

View file

@ -1,4 +1,4 @@
local stanza_t = require "util.stanza".stanza_t local stanza_t = require "prosody.util.stanza".stanza_t
local record lib local record lib
record dataform record dataform

View file

@ -19,14 +19,14 @@
-- TODO s/number/integer/ once we have appropriate math.type() compat -- TODO s/number/integer/ once we have appropriate math.type() compat
-- --
if not math.type then require "util.mathcompat" end if not math.type then require "prosody.util.mathcompat" end
local st = require "util.stanza"; local st = require "prosody.util.stanza";
local json = require"util.json" local json = require "prosody.util.json"
local pointer = require"util.jsonpointer"; local pointer = require "prosody.util.jsonpointer";
local json_type_name = json.json_type_name; local json_type_name = json.json_type_name;
local json_schema_object = require "util.jsonschema" local json_schema_object = require "prosody.util.jsonschema"
local type schema_t = boolean | json_schema_object local type schema_t = boolean | json_schema_object
local function toboolean ( s : string ) : boolean local function toboolean ( s : string ) : boolean

View file

@ -8,12 +8,12 @@
-- https://json-schema.org/draft/2020-12/json-schema-validation.html -- https://json-schema.org/draft/2020-12/json-schema-validation.html
-- --
if not math.type then require "util.mathcompat" end if not math.type then require "prosody.util.mathcompat" end
local json = require"util.json" local json = require "prosody.util.json"
local null = json.null; local null = json.null;
local pointer = require "util.jsonpointer" local pointer = require "prosody.util.jsonpointer"
local type json_type_name = json.json_type_name local type json_type_name = json.json_type_name

View file

@ -1,4 +1,4 @@
local crypto = require "util.crypto" local crypto = require "prosody.util.crypto"
local record jwtlib local record jwtlib
enum algorithm enum algorithm
"HS256" "HS256"

View file

@ -1,4 +1,4 @@
local queue = require "util.queue"; local queue = require "prosody.util.queue";
local record lib local record lib
-- T would typically be util.stanza -- T would typically be util.stanza

View file

@ -14,7 +14,7 @@ local s_match = string.match;
local s_sub = string.sub; local s_sub = string.sub;
local t_concat = table.concat; local t_concat = table.concat;
local st = require "util.stanza"; local st = require "prosody.util.stanza";
local type escape_t = function (string) : string local type escape_t = function (string) : string
local type filter_t = function (string, string | st.stanza_t, string) : string | st.stanza_t, boolean local type filter_t = function (string, string | st.stanza_t, string) : string | st.stanza_t, boolean