@ai-ecoverse/slicc-kernel 1.59.0 → 1.59.1
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/README.md +2 -2
- package/dist/index.js +25 -7
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +7 -2
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +1 -1
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +103 -24
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +1 -1
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
package/dist/kernel-worker.js
CHANGED
|
@@ -8779,6 +8779,11 @@ var TOKEN3 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
|
8779
8779
|
function message(e) {
|
|
8780
8780
|
return e instanceof Error ? e.message : String(e);
|
|
8781
8781
|
}
|
|
8782
|
+
var ERRNO = /^E[A-Z]+$|^EAI_[A-Z]+$/;
|
|
8783
|
+
function errnoOf(e) {
|
|
8784
|
+
const code = e?.code;
|
|
8785
|
+
return typeof code === "string" && ERRNO.test(code) ? code : "ECONNREFUSED";
|
|
8786
|
+
}
|
|
8782
8787
|
function fail(errno, text) {
|
|
8783
8788
|
return { ok: false, errno, message: text };
|
|
8784
8789
|
}
|
|
@@ -8822,13 +8827,13 @@ var WsHandles = class {
|
|
|
8822
8827
|
let socket;
|
|
8823
8828
|
try {
|
|
8824
8829
|
socket = await transport.websocket({
|
|
8825
|
-
url: req.url,
|
|
8830
|
+
url: toHostLoopback(req.url),
|
|
8826
8831
|
protocols: req.protocols,
|
|
8827
8832
|
headers: req.headers,
|
|
8828
8833
|
signal: entry.abort.signal
|
|
8829
8834
|
});
|
|
8830
8835
|
} catch (e) {
|
|
8831
|
-
return fail(
|
|
8836
|
+
return fail(errnoOf(e), message(e));
|
|
8832
8837
|
}
|
|
8833
8838
|
if (!this.open.has(handle)) {
|
|
8834
8839
|
socket.close(1001, "the program went away");
|