poe-code 11.0.11 → 11.0.12

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
@@ -142791,10 +142791,22 @@ function createObjectArrayGlobals(options) {
142791
142791
  }),
142792
142792
  fromEntries: createSandboxClosure({
142793
142793
  sandbox: true,
142794
- call: ([value]) => allocateProducedSandboxValue(
142795
- Object.setPrototypeOf(Reflect.apply(Object.fromEntries, Object, [value]), null),
142796
- options.budget
142797
- ),
142794
+ call: ([value]) => {
142795
+ const iterator = getSandboxIterator(value);
142796
+ if (iterator === void 0) {
142797
+ throw new TypeError("Object.fromEntries requires an iterable.");
142798
+ }
142799
+ if (!iterator.generator) {
142800
+ return allocateProducedSandboxValue(
142801
+ Object.setPrototypeOf(
142802
+ Reflect.apply(Object.fromEntries, Object, [{ [Symbol.iterator]: () => iterator }]),
142803
+ null
142804
+ ),
142805
+ options.budget
142806
+ );
142807
+ }
142808
+ return objectFromSandboxEntries(iterator, options.budget);
142809
+ },
142798
142810
  name: "fromEntries"
142799
142811
  }),
142800
142812
  freeze: createSandboxClosure({
@@ -142915,6 +142927,38 @@ function createObjectArrayGlobals(options) {
142915
142927
  })
142916
142928
  };
142917
142929
  }
142930
+ async function objectFromSandboxEntries(iterator, budget) {
142931
+ const object = /* @__PURE__ */ Object.create(null);
142932
+ try {
142933
+ while (true) {
142934
+ const result = await iterator.next();
142935
+ if (typeof result !== "object" && typeof result !== "function" || result === null) {
142936
+ throw new TypeError("Iterator result must be an object.");
142937
+ }
142938
+ if (result.done) break;
142939
+ const entry = result.value;
142940
+ if (typeof entry !== "object" && typeof entry !== "function" || entry === null) {
142941
+ throw new TypeError("Object.fromEntries requires entry objects.");
142942
+ }
142943
+ const key3 = entry[0];
142944
+ const value = entry[1];
142945
+ Object.defineProperty(object, key3, {
142946
+ configurable: true,
142947
+ enumerable: true,
142948
+ value,
142949
+ writable: true
142950
+ });
142951
+ }
142952
+ } catch (error3) {
142953
+ try {
142954
+ await iterator.return?.();
142955
+ } catch {
142956
+ throw error3;
142957
+ }
142958
+ throw error3;
142959
+ }
142960
+ return allocateProducedSandboxValue(object, budget);
142961
+ }
142918
142962
  function assignSandboxValues(target, sources) {
142919
142963
  if (target === null || target === void 0) {
142920
142964
  throw new TypeError("Object.assign(target, ...sources) requires a non-null target.");
@@ -155565,7 +155609,7 @@ var init_package2 = __esm({
155565
155609
  "package.json"() {
155566
155610
  package_default2 = {
155567
155611
  name: "poe-code",
155568
- version: "11.0.11",
155612
+ version: "11.0.12",
155569
155613
  description: "CLI tool to configure Poe API for developer workflows.",
155570
155614
  license: "MIT",
155571
155615
  type: "module",