rescript-bun
Advanced tools
+3
-3
| { | ||
| "name": "rescript-bun", | ||
| "version": "2.0.3", | ||
| "version": "2.1.0", | ||
| "main": "src/Bun.js", | ||
@@ -9,3 +9,3 @@ "sideEffects": false, | ||
| "build": "rescript build", | ||
| "test": "bun test test/*.test.js", | ||
| "test": "bun test ./test/*.test.js", | ||
| "changeset": "changeset", | ||
@@ -31,3 +31,3 @@ "release": "changeset publish" | ||
| "@changesets/cli": "^2.29.5", | ||
| "rescript": "12.0.0-beta.11" | ||
| "rescript": "12.0.0-rc.3" | ||
| }, | ||
@@ -34,0 +34,0 @@ "peerDependencies": { |
+16
-0
@@ -167,2 +167,15 @@ // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| let CSRF = {}; | ||
| let Secrets = {}; | ||
| let S3File = {}; | ||
| let S3Client = {}; | ||
| let S3 = { | ||
| S3File: S3File, | ||
| S3Client: S3Client | ||
| }; | ||
| let FileSystemRouter = {}; | ||
@@ -191,2 +204,5 @@ | ||
| CryptoHasher, | ||
| CSRF, | ||
| Secrets, | ||
| S3, | ||
| FileSystemRouter, | ||
@@ -193,0 +209,0 @@ Glob, |
+48
-49
| // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| import * as Js_dict from "@rescript/runtime/lib/es6/Js_dict.js"; | ||
| import * as Disconnect from "disconnect"; | ||
| import * as Nodecluster from "node:cluster"; | ||
| import * as Js_null_undefined from "@rescript/runtime/lib/es6/Js_null_undefined.js"; | ||
| import * as Stdlib_Nullable from "@rescript/runtime/lib/es6/Stdlib_Nullable.js"; | ||
@@ -11,45 +10,22 @@ function classify(x) { | ||
| let intOrString = typeof addressType; | ||
| switch (intOrString) { | ||
| case "number" : | ||
| switch (addressType) { | ||
| case -1 : | ||
| return { | ||
| TAG: "UnixDomainSocket", | ||
| _0: x | ||
| }; | ||
| case 4 : | ||
| return { | ||
| TAG: "TcpV4", | ||
| _0: x | ||
| }; | ||
| case 6 : | ||
| return { | ||
| TAG: "TcpV6", | ||
| _0: x | ||
| }; | ||
| default: | ||
| return { | ||
| TAG: "Unknown", | ||
| _0: x | ||
| }; | ||
| } | ||
| case "string" : | ||
| switch (addressType) { | ||
| case "udp4" : | ||
| return { | ||
| TAG: "Udp4", | ||
| _0: x | ||
| }; | ||
| case "udp6" : | ||
| return { | ||
| TAG: "Udp6", | ||
| _0: x | ||
| }; | ||
| default: | ||
| return { | ||
| TAG: "Unknown", | ||
| _0: x | ||
| }; | ||
| } | ||
| default: | ||
| if (intOrString === "string") { | ||
| switch (addressType) { | ||
| case "udp4" : | ||
| return { | ||
| TAG: "Udp4", | ||
| _0: x | ||
| }; | ||
| case "udp6" : | ||
| return { | ||
| TAG: "Udp6", | ||
| _0: x | ||
| }; | ||
| default: | ||
| return { | ||
| TAG: "Unknown", | ||
| _0: x | ||
| }; | ||
| } | ||
| } else { | ||
| if (intOrString !== "number") { | ||
| return { | ||
@@ -59,2 +35,25 @@ TAG: "Unknown", | ||
| }; | ||
| } | ||
| switch (addressType) { | ||
| case -1 : | ||
| return { | ||
| TAG: "UnixDomainSocket", | ||
| _0: x | ||
| }; | ||
| case 4 : | ||
| return { | ||
| TAG: "TcpV4", | ||
| _0: x | ||
| }; | ||
| case 6 : | ||
| return { | ||
| TAG: "TcpV6", | ||
| _0: x | ||
| }; | ||
| default: | ||
| return { | ||
| TAG: "Unknown", | ||
| _0: x | ||
| }; | ||
| } | ||
| } | ||
@@ -72,7 +71,7 @@ } | ||
| function sendHttpServerHandle(options, msg, handle) { | ||
| msg.send(handle, Js_null_undefined.fromOption(options)); | ||
| msg.send(handle, Stdlib_Nullable.fromOption(options)); | ||
| } | ||
| function sendSocketHandle(options, msg, handle) { | ||
| msg.send(handle, Js_null_undefined.fromOption(options)); | ||
| msg.send(handle, Stdlib_Nullable.fromOption(options)); | ||
| } | ||
@@ -87,3 +86,3 @@ | ||
| function disconnect(callback, param) { | ||
| Disconnect(Js_null_undefined.fromOption(callback)); | ||
| Disconnect(Stdlib_Nullable.fromOption(callback)); | ||
| } | ||
@@ -98,3 +97,3 @@ | ||
| function getWorker(_workers, id) { | ||
| return Js_dict.get(_workers, id.toString()); | ||
| return _workers[id.toString()]; | ||
| } | ||
@@ -101,0 +100,0 @@ |
+0
-8
@@ -33,3 +33,2 @@ // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| } | ||
| } | ||
@@ -59,3 +58,2 @@ | ||
| } | ||
| } | ||
@@ -85,3 +83,2 @@ | ||
| } | ||
| } | ||
@@ -111,3 +108,2 @@ | ||
| } | ||
| } | ||
@@ -137,3 +133,2 @@ | ||
| } | ||
| } | ||
@@ -163,3 +158,2 @@ | ||
| } | ||
| } | ||
@@ -191,3 +185,2 @@ | ||
| } | ||
| } | ||
@@ -217,3 +210,2 @@ | ||
| } | ||
| } | ||
@@ -220,0 +212,0 @@ |
+21
-27
@@ -6,15 +6,14 @@ // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| let match = typeof evt; | ||
| switch (match) { | ||
| case "string" : | ||
| return { | ||
| TAG: "String", | ||
| _0: evt | ||
| }; | ||
| case "symbol" : | ||
| return { | ||
| TAG: "Symbol", | ||
| _0: evt | ||
| }; | ||
| default: | ||
| return "Unknown"; | ||
| if (match === "symbol") { | ||
| return { | ||
| TAG: "Symbol", | ||
| _0: evt | ||
| }; | ||
| } else if (match === "string") { | ||
| return { | ||
| TAG: "String", | ||
| _0: evt | ||
| }; | ||
| } else { | ||
| return "Unknown"; | ||
| } | ||
@@ -26,17 +25,12 @@ } | ||
| let match$1 = typeof event2; | ||
| switch (match) { | ||
| case "string" : | ||
| if (match$1 === "string") { | ||
| return event1 === event2; | ||
| } else { | ||
| return false; | ||
| } | ||
| case "symbol" : | ||
| if (match$1 === "symbol") { | ||
| return event1 === event2; | ||
| } else { | ||
| return false; | ||
| } | ||
| default: | ||
| if (match === "symbol") { | ||
| if (match$1 === "symbol") { | ||
| return event1 === event2; | ||
| } else { | ||
| return false; | ||
| } | ||
| } else if (match === "string" && match$1 === "string") { | ||
| return event1 === event2; | ||
| } else { | ||
| return false; | ||
| } | ||
@@ -43,0 +37,0 @@ } |
+3
-3
| // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| import * as Stdlib_Nullable from "@rescript/runtime/lib/es6/Stdlib_Nullable.js"; | ||
| import * as Nodeperf_hooks from "node:perf_hooks"; | ||
| import * as Js_null_undefined from "@rescript/runtime/lib/es6/Js_null_undefined.js"; | ||
@@ -15,3 +15,3 @@ let PerformanceEntry = {}; | ||
| function getEntriesByName(entryList, type_, name) { | ||
| return entryList.getEntriesByName(name, Js_null_undefined.fromOption(type_)); | ||
| return entryList.getEntriesByName(name, Stdlib_Nullable.fromOption(type_)); | ||
| } | ||
@@ -26,3 +26,3 @@ | ||
| function monitorEventLoopDelay(resolution, param) { | ||
| return Nodeperf_hooks.eventLoopDelay(Js_null_undefined.fromOption(resolution)); | ||
| return Nodeperf_hooks.eventLoopDelay(Stdlib_Nullable.fromOption(resolution)); | ||
| } | ||
@@ -29,0 +29,0 @@ |
+5
-5
| // Generated by ReScript, PLEASE EDIT WITH CARE | ||
| import * as Nodeurl from "node:url"; | ||
| import * as Js_null_undefined from "@rescript/runtime/lib/es6/Js_null_undefined.js"; | ||
| import * as Stdlib_Nullable from "@rescript/runtime/lib/es6/Stdlib_Nullable.js"; | ||
@@ -10,6 +10,6 @@ let SearchParams = {}; | ||
| return Nodeurl.format(url, { | ||
| auth: Js_null_undefined.fromOption(auth), | ||
| fragment: Js_null_undefined.fromOption(fragment), | ||
| search: Js_null_undefined.fromOption(search), | ||
| unicode: Js_null_undefined.fromOption(unicode) | ||
| auth: Stdlib_Nullable.fromOption(auth), | ||
| fragment: Stdlib_Nullable.fromOption(fragment), | ||
| search: Stdlib_Nullable.fromOption(search), | ||
| unicode: Stdlib_Nullable.fromOption(unicode) | ||
| }); | ||
@@ -16,0 +16,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
462697
2.54%1547
0.26%