:3 added bindings for bootloader lib

This commit is contained in:
Gvidas Juknevičius 2024-08-25 23:44:09 +03:00
parent 2b744a5813
commit 85dac18494
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
3 changed files with 24 additions and 6 deletions

23
bindings.lua Normal file
View File

@ -0,0 +1,23 @@
--- @class Exports
--- @field log Logger
--- @field updater Updater
--- @field notifier Notifier
--- @field json JsonParser
--- @class Logger
--- @field error fun(...)
--- @field warn fun(...)
--- @field info fun(...)
--- @field debug fun(...)
--- @class Updater
--- @field addEntry fun(path: string, branch: string, url: string)
--- @class JsonParser
--- @field decode fun(s: string): table
--- @field encode fun(s: table): string
--- @class Notifier
--- @field notify fun(priority: "1"|"2"|"3"|"4"|"5", body: string)

View File

@ -10,11 +10,7 @@ if not __VERSION then
__VERSION = "DEV";
end
--- @class Exports
--- @field log Logger
--- @field updater Updater
--- @field notifier Notifier
--- @field json JsonParser
--- @param upd Updater

View File

@ -72,7 +72,6 @@ function updater:check(branch)
log.error("Updater:check: Could not get body of request: " .. berr);
return false;
end
local data = json.decode(body);
if self.curr_commit_hash == "" then
log.debug("No commit hash found, setting");