poe-code 11.0.30 → 11.0.32

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/index.js CHANGED
@@ -137931,27 +137931,38 @@ function stableStringify(value) {
137931
137931
  return JSON.stringify(normalize2(value, seen));
137932
137932
  }
137933
137933
  function normalize2(value, seen) {
137934
- if (value === void 0) return { $type: "undefined" };
137934
+ if (typeof value === "function") return void 0;
137935
+ if (typeof value === "bigint") throw new TypeError("Do not know how to serialize a BigInt");
137936
+ if (value === void 0) return Object.assign(/* @__PURE__ */ Object.create(null), { $type: "undefined" });
137935
137937
  if (typeof value === "number" && !Number.isFinite(value))
137936
- return { $type: "number", value: String(value) };
137938
+ return Object.assign(/* @__PURE__ */ Object.create(null), { $type: "number", value: String(value) });
137937
137939
  if (value === null || typeof value !== "object") return value;
137938
137940
  if (seen.has(value)) throw new TypeError("Host call arguments cannot contain cycles.");
137939
137941
  seen.add(value);
137940
137942
  try {
137941
137943
  if (Array.isArray(value)) {
137942
- const normalized = new Array(value.length);
137944
+ const normalized2 = new Array(value.length);
137945
+ Object.setPrototypeOf(normalized2, null);
137943
137946
  for (const [key3, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
137944
137947
  if (!isArrayIndexKey(key3)) continue;
137945
137948
  if (!("value" in descriptor)) {
137946
137949
  throw new TypeError("Host call arguments cannot contain accessor properties.");
137947
137950
  }
137948
- defineOwnDataProperty(normalized, key3, normalize2(descriptor.value, seen));
137951
+ defineOwnDataProperty(normalized2, key3, normalize2(descriptor.value, seen));
137949
137952
  }
137950
- return normalized;
137953
+ return normalized2;
137951
137954
  }
137952
- return Object.fromEntries(
137953
- Object.keys(value).sort().map((key3) => [key3, normalize2(value[key3], seen)])
137954
- );
137955
+ const normalized = /* @__PURE__ */ Object.create(null);
137956
+ const descriptors = Object.getOwnPropertyDescriptors(value);
137957
+ for (const key3 of Object.keys(descriptors).sort()) {
137958
+ const descriptor = descriptors[key3];
137959
+ if (!descriptor.enumerable) continue;
137960
+ if (!("value" in descriptor)) {
137961
+ throw new TypeError("Host call arguments cannot contain accessor properties.");
137962
+ }
137963
+ defineOwnDataProperty(normalized, key3, normalize2(descriptor.value, seen));
137964
+ }
137965
+ return normalized;
137955
137966
  } finally {
137956
137967
  seen.delete(value);
137957
137968
  }
@@ -141949,6 +141960,8 @@ function wrapSandboxClosureForHost(closure, stackFrames, budget, callbacks) {
141949
141960
  );
141950
141961
  return pending;
141951
141962
  };
141963
+ if (closure.length !== void 0)
141964
+ Object.defineProperty(wrapped, "length", { value: closure.length });
141952
141965
  callbacks?.seen.set(closure, wrapped);
141953
141966
  callbacks?.entries.set(id, invoke2);
141954
141967
  callbacks?.hostFunctions.set(id, wrapped);
@@ -155823,7 +155836,7 @@ var init_package2 = __esm({
155823
155836
  "package.json"() {
155824
155837
  package_default2 = {
155825
155838
  name: "poe-code",
155826
- version: "11.0.30",
155839
+ version: "11.0.32",
155827
155840
  description: "CLI tool to configure Poe API for developer workflows.",
155828
155841
  license: "MIT",
155829
155842
  type: "module",