diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-01 12:40:10 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:51:31 +0300 |
commit | 2b70116b944dec1a6946c4aa1a2c8aa0d07667a6 (patch) | |
tree | bdb4dbb203d5a5a8c6a14d1f4be758b890411b37 | |
parent | 17f3ebdcb213e64ea9081991b29f0dfc94b1f910 (diff) | |
download | luarocks-2b70116b944dec1a6946c4aa1a2c8aa0d07667a6.tar.gz luarocks-2b70116b944dec1a6946c4aa1a2c8aa0d07667a6.tar.bz2 luarocks-2b70116b944dec1a6946c4aa1a2c8aa0d07667a6.zip |
started api + slight changes to manifest and rockspec
-rw-r--r-- | src/luarocks/type/manifest.tl | 3 | ||||
-rw-r--r-- | src/luarocks/type/rockspec.tl | 3 | ||||
-rw-r--r-- | src/luarocks/upload/api.tl | 4 | ||||
-rw-r--r-- | src/luarocks/upload/multipart.tl | 8 | ||||
-rw-r--r-- | src/luarocks/vendor/dkjson.d.tl | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/src/luarocks/type/manifest.tl b/src/luarocks/type/manifest.tl index 043366ea..f8d53b42 100644 --- a/src/luarocks/type/manifest.tl +++ b/src/luarocks/type/manifest.tl | |||
@@ -1,4 +1,5 @@ | |||
1 | local type_manifest = {} | 1 | local record type_manifest |
2 | end | ||
2 | 3 | ||
3 | local type_check = require("luarocks.type_check") | 4 | local type_check = require("luarocks.type_check") |
4 | 5 | ||
diff --git a/src/luarocks/type/rockspec.tl b/src/luarocks/type/rockspec.tl index 0b3cf31f..8595f4a9 100644 --- a/src/luarocks/type/rockspec.tl +++ b/src/luarocks/type/rockspec.tl | |||
@@ -1,4 +1,5 @@ | |||
1 | local type_rockspec = {} | 1 | local record type_rockspec |
2 | end | ||
2 | 3 | ||
3 | local type_check = require("luarocks.type_check") | 4 | local type_check = require("luarocks.type_check") |
4 | 5 | ||
diff --git a/src/luarocks/upload/api.tl b/src/luarocks/upload/api.tl index 7c643c43..fd837fd8 100644 --- a/src/luarocks/upload/api.tl +++ b/src/luarocks/upload/api.tl | |||
@@ -90,9 +90,9 @@ function Api:method(...) | |||
90 | return res | 90 | return res |
91 | end | 91 | end |
92 | 92 | ||
93 | function Api.raw_method(self: Api, path, ...) --! path, ... type | 93 | function Api.raw_method(self: Api, path: string, ...) --! path, ... type |
94 | self:check_version() | 94 | self:check_version() |
95 | local url = tostring(self.config.server) .. "/api/" .. tostring(cfg.upload.api_version) .. "/" .. tostring(self.config.key) .. "/" .. tostring(path) | 95 | local url = tostring(self.config.server) .. "/api/" .. tostring(cfg.upload.api_version) .. "/" .. tostring(self.config.key) .. "/" .. path |
96 | return self:request(url, ...) | 96 | return self:request(url, ...) |
97 | end | 97 | end |
98 | 98 | ||
diff --git a/src/luarocks/upload/multipart.tl b/src/luarocks/upload/multipart.tl index 0ba8ab8a..d6a5c012 100644 --- a/src/luarocks/upload/multipart.tl +++ b/src/luarocks/upload/multipart.tl | |||
@@ -105,12 +105,12 @@ function multipart.encode(params: TableMap<string, string>): string, string --! | |||
105 | "\r\n", "--", boundary, "--", "\r\n" }), boundary | 105 | "\r\n", "--", boundary, "--", "\r\n" }), boundary |
106 | end | 106 | end |
107 | 107 | ||
108 | function multipart.new_file(fname, mime) | 108 | function multipart.new_file(fname: string, mime: string): File --! TEMP |
109 | local self = {} | 109 | local self: File = {} |
110 | setmetatable(self, { __index = File }) | 110 | setmetatable(self, { __index = File }) |
111 | self.__class = File | 111 | self.__class = File --! |
112 | self.fname = fname | 112 | self.fname = fname |
113 | self.mimetype = mime | 113 | self.mimetype = mime --TEMP |
114 | return self | 114 | return self |
115 | end | 115 | end |
116 | 116 | ||
diff --git a/src/luarocks/vendor/dkjson.d.tl b/src/luarocks/vendor/dkjson.d.tl index dbe94e70..4dee43d3 100644 --- a/src/luarocks/vendor/dkjson.d.tl +++ b/src/luarocks/vendor/dkjson.d.tl | |||
@@ -15,7 +15,7 @@ local record dkjson | |||
15 | end | 15 | end |
16 | encode: function({string:any}, JsonState): string | 16 | encode: function({string:any}, JsonState): string |
17 | 17 | ||
18 | decode: function(string, number, any, table): {string:any} | 18 | decode: function(string, ?number, ?any, ?table): {string:any} |
19 | 19 | ||
20 | null: table | 20 | null: table |
21 | 21 | ||