@aresdefencelabs/wasm-http-runtime 0.1.3 → 0.1.6

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.
@@ -0,0 +1,59 @@
1
+ addToLibrary({
2
+ abi_log__deps: ['$UTF8ToString'],
3
+ abi_log: function (messagePtr) {
4
+ if (typeof Module.__aresAbiLog !== 'function') {
5
+ throw new Error('Module.__aresAbiLog is not set');
6
+ }
7
+ Module.__aresAbiLog(messagePtr);
8
+ },
9
+
10
+ abi_http_get_user_agent_name: function () {
11
+ if (typeof Module.__aresAbiHttpGetUserAgentName !== 'function') {
12
+ throw new Error('Module.__aresAbiHttpGetUserAgentName is not set');
13
+ }
14
+ return Module.__aresAbiHttpGetUserAgentName() >>> 0;
15
+ },
16
+
17
+ abi_http_response_get_status: function (responseId) {
18
+ if (typeof Module.__aresAbiHttpResponseGetStatus !== 'function') {
19
+ throw new Error('Module.__aresAbiHttpResponseGetStatus is not set');
20
+ }
21
+ return Module.__aresAbiHttpResponseGetStatus(responseId) >>> 0;
22
+ },
23
+
24
+ abi_http_response_get_body_len: function (responseId) {
25
+ if (typeof Module.__aresAbiHttpResponseGetBodyLen !== 'function') {
26
+ throw new Error('Module.__aresAbiHttpResponseGetBodyLen is not set');
27
+ }
28
+ return Module.__aresAbiHttpResponseGetBodyLen(responseId) >>> 0;
29
+ },
30
+
31
+ abi_http_response_copy_body: function (responseId, outPtr, maxLen) {
32
+ if (typeof Module.__aresAbiHttpResponseCopyBody !== 'function') {
33
+ throw new Error('Module.__aresAbiHttpResponseCopyBody is not set');
34
+ }
35
+ return Module.__aresAbiHttpResponseCopyBody(responseId, outPtr, maxLen) >>> 0;
36
+ },
37
+
38
+ abi_http_response_copy_header: function (responseId, keyPtr, outPtr, maxLen) {
39
+ if (typeof Module.__aresAbiHttpResponseCopyHeader !== 'function') {
40
+ throw new Error('Module.__aresAbiHttpResponseCopyHeader is not set');
41
+ }
42
+ return Module.__aresAbiHttpResponseCopyHeader(responseId, keyPtr, outPtr, maxLen) >>> 0;
43
+ },
44
+
45
+ abi_http_response_free: function (responseId) {
46
+ if (typeof Module.__aresAbiHttpResponseFree !== 'function') {
47
+ throw new Error('Module.__aresAbiHttpResponseFree is not set');
48
+ }
49
+ Module.__aresAbiHttpResponseFree(responseId);
50
+ },
51
+
52
+ abi_http_fetch_blocking_async__async: 'auto',
53
+ abi_http_fetch_blocking_async: async function (requestJsonCstrPtr) {
54
+ if (typeof Module.__aresAbiHttpFetchBlockingAsync !== 'function') {
55
+ throw new Error('Module.__aresAbiHttpFetchBlockingAsync is not set');
56
+ }
57
+ return (await Module.__aresAbiHttpFetchBlockingAsync(requestJsonCstrPtr)) >>> 0;
58
+ },
59
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aresdefencelabs/wasm-http-runtime",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "Runtime adapter that connects C++ WebAssembly workers to the Cloudflare Workers runtime via an ABI bridge.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -36,5 +36,5 @@
36
36
  },
37
37
  "main": "./dist/index.js",
38
38
  "types": "./dist/index.d.ts",
39
- "files": ["dist"]
39
+ "files": ["dist", "emscripten"]
40
40
  }