@ai-ecoverse/slicc-kernel 1.112.0 → 1.113.0

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.
@@ -5295,7 +5295,7 @@ var KERNEL_VERSION, OS_RELEASE;
5295
5295
  var init_version = __esm({
5296
5296
  "src/version.ts"() {
5297
5297
  "use strict";
5298
- KERNEL_VERSION = true ? "1.112.0" : "0.0.0-dev";
5298
+ KERNEL_VERSION = true ? "1.113.0" : "0.0.0-dev";
5299
5299
  OS_RELEASE = "6.0.0-slicc";
5300
5300
  }
5301
5301
  });
@@ -6883,7 +6883,23 @@ function netOps(kernel, io) {
6883
6883
  }
6884
6884
  };
6885
6885
  };
6886
+ const lookup2 = async (name3, options = {}) => {
6887
+ const family = options.family ?? 0;
6888
+ if (family !== 0 && family !== 4 && family !== 6) {
6889
+ throw new JsCallError("EAI_FAMILY", `resolve ${name3}`);
6890
+ }
6891
+ const signal = options.signal ?? NEVER;
6892
+ signal.throwIfAborted();
6893
+ const req = { op: "sock-resolve", name: String(name3), family };
6894
+ const r = await kernel.blocking(req, signal).catch((err) => {
6895
+ signal.throwIfAborted();
6896
+ if (err.code !== "ENOENT") throw err;
6897
+ throw new JsCallError("ENOTFOUND", `resolve ${name3}`);
6898
+ });
6899
+ return [...r.ok && r.kind === "json" ? r.json : []];
6900
+ };
6886
6901
  return {
6902
+ resolve: lookup2,
6887
6903
  listen: (options = {}) => opened2(async (fd) => {
6888
6904
  const addr = {
6889
6905
  family: "inet",