@noita-ts/pollnet 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.lua +1 -1
- package/dist/dll.d.ts +11 -0
- package/dist/dll.lua +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.lua +1 -1
- package/package.json +2 -1
package/dist/api.lua
CHANGED
|
@@ -46,7 +46,7 @@ void pollnet_sleep_ms(uint32_t milliseconds);
|
|
|
46
46
|
]]
|
|
47
47
|
|
|
48
48
|
--- @noita-ts-include ./pollnet.dll
|
|
49
|
-
local pollnet =
|
|
49
|
+
local pollnet = require("dll").default
|
|
50
50
|
|
|
51
51
|
local POLLNET_VERSION = ffi.string(pollnet.pollnet_version())
|
|
52
52
|
|
package/dist/dll.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
/**
|
|
3
|
+
* The pollnet library, loaded from the folder of the mod that ships it.
|
|
4
|
+
*
|
|
5
|
+
* `api.lua` cannot load it on its own: it is plain Lua, so it cannot reach
|
|
6
|
+
* across packages for the lookup that a mod installed from the Steam Workshop
|
|
7
|
+
* needs. The `@noita-ts-include` of the DLL itself stays in `api.lua`, next to
|
|
8
|
+
* the declarations of what it exports.
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: Record<string, any>;
|
|
11
|
+
export default _default;
|
package/dist/dll.lua
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local ____mods = require("@noita-ts/ffi/mods")
|
|
4
|
+
local MOD_CONTEXT = ____mods.default
|
|
5
|
+
____exports.default = MOD_CONTEXT:loadDll("lua_modules/@noita-ts/pollnet/dist/pollnet.dll")
|
|
6
|
+
return ____exports
|
package/dist/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class HttpClient {
|
|
|
37
37
|
post(url: string, headers?: Record<string, string | string[]> | string, body?: string): Promise<HttpResponse>;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Async WebSocket client built on top of
|
|
40
|
+
* Async WebSocket client built on top of a {@link Scheduler}.
|
|
41
41
|
* Messages are delivered via the `onmessage` callback, and errors via
|
|
42
42
|
* `onerror`.
|
|
43
43
|
* Call {@link send} to send a message, and {@link close} to close the
|
package/dist/index.lua
CHANGED
|
@@ -74,7 +74,7 @@ end
|
|
|
74
74
|
function HttpClient.prototype.post(self, url, headers, body)
|
|
75
75
|
return self.scheduler:spawn(function() return ____exports.HttpResponse:read(pollnet.http_post(url, headers, body, false)) end)
|
|
76
76
|
end
|
|
77
|
-
--- Async WebSocket client built on top of
|
|
77
|
+
--- Async WebSocket client built on top of a {@link Scheduler}.
|
|
78
78
|
-- Messages are delivered via the `onmessage` callback, and errors via
|
|
79
79
|
-- `onerror`.
|
|
80
80
|
-- Call {@link send} to send a message, and {@link close} to close the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noita-ts/pollnet",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*.{lua,dll,d.ts}",
|
|
6
6
|
"LICENSE-pollnet"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"prepublishOnly": "rm -rf dist && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@noita-ts/ffi": "^0.6.3",
|
|
26
27
|
"@typescript-to-lua/language-extensions": "^1.19.0",
|
|
27
28
|
"lua-types": "^2.13.1"
|
|
28
29
|
},
|